Instructions to use google/madlad400-10b-mt with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use google/madlad400-10b-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-10b-mt")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("google/madlad400-10b-mt") model = AutoModelForSeq2SeqLM.from_pretrained("google/madlad400-10b-mt", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -436,7 +436,7 @@ widget:
|
|
| 436 |
|
| 437 |
---
|
| 438 |
|
| 439 |
-
# Model Card for MADLAD-400-
|
| 440 |
|
| 441 |
# Table of Contents
|
| 442 |
|
|
@@ -491,7 +491,7 @@ First, install the Python packages that are required:
|
|
| 491 |
```python
|
| 492 |
from transformers import T5ForConditionalGeneration, T5Tokenizer
|
| 493 |
|
| 494 |
-
model_name = '
|
| 495 |
model = T5ForConditionalGeneration.from_pretrained(model_name, device_map="auto")
|
| 496 |
tokenizer = T5Tokenizer.from_pretrained(model_name)
|
| 497 |
|
|
@@ -514,7 +514,7 @@ Usage with [candle](https://github.com/huggingface/candle):
|
|
| 514 |
|
| 515 |
```bash
|
| 516 |
$ cargo run --example t5 --release -- \
|
| 517 |
-
--model-id "
|
| 518 |
--prompt "<2de> How are you, my friend?" \
|
| 519 |
--decode --temperature 0
|
| 520 |
```
|
|
|
|
| 436 |
|
| 437 |
---
|
| 438 |
|
| 439 |
+
# Model Card for MADLAD-400-10B-MT
|
| 440 |
|
| 441 |
# Table of Contents
|
| 442 |
|
|
|
|
| 491 |
```python
|
| 492 |
from transformers import T5ForConditionalGeneration, T5Tokenizer
|
| 493 |
|
| 494 |
+
model_name = 'google/madlad400-10b-mt'
|
| 495 |
model = T5ForConditionalGeneration.from_pretrained(model_name, device_map="auto")
|
| 496 |
tokenizer = T5Tokenizer.from_pretrained(model_name)
|
| 497 |
|
|
|
|
| 514 |
|
| 515 |
```bash
|
| 516 |
$ cargo run --example t5 --release -- \
|
| 517 |
+
--model-id "google/madlad400-10b-mt" \
|
| 518 |
--prompt "<2de> How are you, my friend?" \
|
| 519 |
--decode --temperature 0
|
| 520 |
```
|