Skip to content

Commit

Permalink
Add the import script for the T5 tokenizer. (huggingface#2399)
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentMazare authored Aug 5, 2024
1 parent dfdce2b commit 59bbc0d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions candle-examples/examples/flux/t5_tokenizer.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from transformers import AutoModelForCausalLM, AutoTokenizer

BASE_MODEL = "google/t5-v1_1-xxl"
tokenizer = AutoTokenizer.from_pretrained(BASE_MODEL)
# The tokenizer will be saved in /tmp/tokenizer/tokenizer.json
tokenizer.save_pretrained("/tmp/tokenizer/")

0 comments on commit 59bbc0d

Please sign in to comment.