Instructions to use WhirlwindAI/Translate-25T with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use WhirlwindAI/Translate-25T 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="WhirlwindAI/Translate-25T")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("WhirlwindAI/Translate-25T") model = AutoModelForSeq2SeqLM.from_pretrained("WhirlwindAI/Translate-25T") - Notebooks
- Google Colab
- Kaggle
Evaluation on all 26 language pairs with BLEU, speed, radar
Browse files- .gitattributes +1 -0
- README.md +73 -0
- images/bleu_scores.png +0 -0
- images/radar.png +3 -0
- images/speed.png +0 -0
.gitattributes
CHANGED
|
@@ -34,3 +34,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
images/radar.png filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- multilingual
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
library_name: transformers
|
| 6 |
+
tags:
|
| 7 |
+
- translation
|
| 8 |
+
- mt5
|
| 9 |
+
- multilingual
|
| 10 |
+
- whirlwindai
|
| 11 |
+
pipeline_tag: translation
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# 🌪️ WhirlwindAI/Translate-25L
|
| 15 |
+
|
| 16 |
+
A multilingual translation model fine-tuned from `google/mt5-small`, covering 25+ language pairs sourced from OPUS-100.
|
| 17 |
+
|
| 18 |
+
## 🚀 Usage
|
| 19 |
+
|
| 20 |
+
```python
|
| 21 |
+
from transformers import MT5ForConditionalGeneration, AutoTokenizer
|
| 22 |
+
|
| 23 |
+
model = MT5ForConditionalGeneration.from_pretrained("WhirlwindAI/Translate-25L")
|
| 24 |
+
tokenizer = AutoTokenizer.from_pretrained("WhirlwindAI/Translate-25L")
|
| 25 |
+
|
| 26 |
+
def translate(text, src, tgt):
|
| 27 |
+
prompt = f"translate {src} to {tgt}: {text}"
|
| 28 |
+
inputs = tokenizer(prompt, return_tensors="pt", truncation=True)
|
| 29 |
+
outputs = model.generate(**inputs, max_new_tokens=128, num_beams=4)
|
| 30 |
+
return tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 31 |
+
|
| 32 |
+
print(translate("Hello, how are you?", "en", "fr"))
|
| 33 |
+
```
|
| 34 |
+
|
| 35 |
+
## 📊 Evaluation (on OPUS-100 test, 50 examples per pair)
|
| 36 |
+
|
| 37 |
+
### BLEU Scores
|
| 38 |
+

|
| 39 |
+
|
| 40 |
+
### Inference Speed
|
| 41 |
+

|
| 42 |
+
|
| 43 |
+
### Radar Comparison
|
| 44 |
+

|
| 45 |
+
|
| 46 |
+
### Sample Translation (French → English)
|
| 47 |
+
| Input (French) | Output (English) |
|
| 48 |
+
|----------------|------------------|
|
| 49 |
+
| `Bonjour, comment allez-vous aujourd'hui ?` | `Hello, how are you here now?` |
|
| 50 |
+
|
| 51 |
+
## 📋 Model Details
|
| 52 |
+
|
| 53 |
+
| Property | Value |
|
| 54 |
+
|---|---|
|
| 55 |
+
| Base model | google/mt5-small |
|
| 56 |
+
| Parameters | 300M |
|
| 57 |
+
| Training data | OPUS-100 |
|
| 58 |
+
| Languages | 25+ |
|
| 59 |
+
| License | Apache 2.0 |
|
| 60 |
+
|
| 61 |
+
## 🏆 Highlights
|
| 62 |
+
|
| 63 |
+
- Up to **41.2** BLEU on en→fr
|
| 64 |
+
- **52.2** tokens/sec average inference speed
|
| 65 |
+
- Lightweight (300M params), fast, and multilingual
|
| 66 |
+
|
| 67 |
+
## 🙏 Acknowledgments
|
| 68 |
+
|
| 69 |
+
Built by WhirlwindAI. Fine‑tuned on OPUS-100, powered by Hugging Face.
|
| 70 |
+
|
| 71 |
+
---
|
| 72 |
+
|
| 73 |
+
*Translate the world, 25 languages at a time.* 🌍
|
images/bleu_scores.png
ADDED
|
images/radar.png
ADDED
|
Git LFS Details
|
images/speed.png
ADDED
|