Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Add torchscriptify API in tokenizer and tensorizer #1055

Closed

Conversation

chenyangyu1988
Copy link
Contributor

Summary: Add torchscriptify API in tokenizer and tensorizer

Differential Revision: D17943029

Summary:
implement BertTensoriimplement BertTensorizer and RoBERTaTensorizer in TorchScript.
ScriptTensorizer have two APIs
1. numberize: process a single line of input (single string for classification and a pair of string for pair classification), the output will be
a list of token ids (e.g token index in the vocab)
2. tensorize: process multiple of line of input, calling numberize and batch all the result together, generate the output tensor as the model input

Differential Revision: D17941983

fbshipit-source-id: 56904c232ff3478c97a31736be20f5d464489e59
Summary: Add torchscriptify API in tokenizer and tensorizer

Differential Revision: D17943029

fbshipit-source-id: 1d5883028a0e23f4c7f48803ad59fb2128dd941a
@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Oct 16, 2019
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D17943029

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 6d2bc1e.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed Do not delete this pull request or issue due to inactivity. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants