Run this model with HF Jobs
Run google/madlad400-7b-mt on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/google/madlad400-7b-mt. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/google/madlad400-7b-mt on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use google/madlad400-7b-mt with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use google/madlad400-7b-mt with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "translation" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # pip install "transformers<5.0.0" from transformers import pipeline pipe = pipeline("translation", model="google/madlad400-7b-mt")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("google/madlad400-7b-mt") model = AutoModelForSeq2SeqLM.from_pretrained("google/madlad400-7b-mt", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit History
8 days ago
-
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, which matters for translating documents: | 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`, `\n`, `line`, `▁two` | `▁line`, `▁one`, `▁line`, `▁two` | `▁line`, `▁one`, `\n`, `line`, `▁two` | | `two spaces` | `▁two`, `▁`, `▁space`, `s` | `▁two`, `▁space`, `s` | `▁two`, `▁`, `▁space`, `s` | 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 …93c2a57
-
Duplicate from jbochi/madlad400-7b-mt
Co-authored-by: J Bochi <jbochi@users.noreply.huggingface.co>1ff63ce