Created
April 22, 2020 09:48
-
-
Save Akashdesarda/e3aae7e25a4290075f234aa912c8146f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from transformers import DistilBertTokenizer, RobertaTokenizer, | |
distil_bert = 'distilbert-base-uncased' # Pick any desired pre-trained model | |
roberta = 'roberta-base-uncase' | |
# Defining DistilBERT tokonizer | |
tokenizer = DistilBertTokenizer.from_pretrained(distil_bert, do_lower_case=True, add_special_tokens=True, | |
max_length=128, pad_to_max_length=True) | |
# Defining RoBERTa tokinizer | |
tokenizer = RobertaTokenizer.from_pretrained(roberta, do_lower_case=True, add_special_tokens=True, | |
max_length=128, pad_to_max_length=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment