Instructions to use google/umt5-xl with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use google/umt5-xl with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForSeq2SeqLM model = AutoModelForSeq2SeqLM.from_pretrained("google/umt5-xl", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit History
Today
-
Use PreTrainedTokenizerFast so the fix also applies on transformers v4, and regenerate with legacy=True
Verified signature9fc2e0d -
Regenerate the tokenizer.json pipeline from spiece.model
Verified signature`spiece.model` keeps whitespace (`remove_extra_whitespaces: false`) and uses byte fallback, but `tokenizer.json` collapses repeated spaces and has `byte_fallback: false`, and `transformers` v5 additionally rebuilds the T5 pipeline with a whitespace split. Tabs and newlines are lost: | text | `spiece.model` | current (`transformers` v5) | with this PR | |---|---|---|---| | `a\tb` | `▁a`, `<0x09>`, `b` | `▁a`, `▁b` | `▁a`, `<0x09>`, `b` | | `line one\nline two` | `▁line`, `▁one`, `<0x0A>`, `line`, `▁two` | `▁line`, `▁one`, `▁line`, `▁two` | `▁line`, `▁one`, `<0x0A>`, `line`, `▁two` | | `two spaces` | `▁two`, `▁`, `▁spaces` | `▁two`, `▁spaces` | `▁two`, `▁`, `▁spaces` | This PR replaces the normalizer, pre-tokenizer and decoder in `tokenizer.json` with the ones `transformers` generates from `spiece.model`, turns on `byte_fallback`, and sets `"tokenizer_class": "TokenizersBackend"` in `tokenizer_config.json`, as suggested by the transformers maintainers in huggingface/transformers#51269…dfe5985
-
Upload tokenizer
e3c9758