Skip to content

Instantly share code, notes, and snippets.

@RayWilliam46
Created January 27, 2021 06:38
Show Gist options
  • Save RayWilliam46/747a2058e2ff6dad9492927aeff9f1a4 to your computer and use it in GitHub Desktop.
Save RayWilliam46/747a2058e2ff6dad9492927aeff9f1a4 to your computer and use it in GitHub Desktop.
Instantiate DistilBERT tokenizer
from transformers import DistilBertTokenizerFast
# Instantiate DistilBERT tokenizer...we use the Fast version to optimize runtime
tokenizer = DistilBertTokenizerFast.from_pretrained('distilbert-base-uncased')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment