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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
- es
|
| 5 |
+
- fr
|
| 6 |
+
- de
|
| 7 |
+
- it
|
| 8 |
+
- pt
|
| 9 |
+
- nl
|
| 10 |
+
- ru
|
| 11 |
+
- zh
|
| 12 |
+
- ja
|
| 13 |
+
- ko
|
| 14 |
+
- ar
|
| 15 |
+
- hi
|
| 16 |
+
- tr
|
| 17 |
+
- vi
|
| 18 |
+
|
| 19 |
+
license: apache-2.0
|
| 20 |
+
|
| 21 |
+
pipeline_tag: translation
|
| 22 |
+
|
| 23 |
+
tags:
|
| 24 |
+
- translation
|
| 25 |
+
- multilingual
|
| 26 |
+
- t5
|
| 27 |
+
- opus100
|
| 28 |
+
- whirlwindai
|
| 29 |
+
---
|
| 30 |
+
|
| 31 |
+
<p align="center">
|
| 32 |
+
|
| 33 |
+
<img src="https://capsule-render.vercel.app/api?type=venom&height=230&text=&animation=fadeIn&color=gradient&customColorList=12,20,24,30"/>
|
| 34 |
+
|
| 35 |
+
<img src="https://readme-typing-svg.demolab.com?font=Space+Grotesk&weight=700&size=28&pause=2500&color=00E7FF¢er=true&vCenter=true&width=760&lines=Translate-15L;15+Languages.;Powered+by+WhirlwindAI"/>
|
| 36 |
+
|
| 37 |
+
</p>
|
| 38 |
+
|
| 39 |
+
<img src="https://img.shields.io/badge/Parameters-60M-4FC3F7?style=for-the-badge">
|
| 40 |
+
<img src="https://img.shields.io/badge/Languages-15-8B5CF6?style=for-the-badge">
|
| 41 |
+
<img src="https://img.shields.io/badge/Framework-Transformers-06B6D4?style=for-the-badge">
|
| 42 |
+
<img src="https://img.shields.io/badge/License-Apache--2.0-10B981?style=for-the-badge">
|
| 43 |
+
|
| 44 |
+
</div>
|
| 45 |
+
|
| 46 |
+
---
|
| 47 |
+
|
| 48 |
+
# Overview
|
| 49 |
+
|
| 50 |
+
Translate-15L is a lightweight multilingual translation model trained on OPUS100.
|
| 51 |
+
|
| 52 |
+
Rather than maximizing parameter count, the model focuses on providing practical multilingual translation with fast inference and a compact footprint.
|
| 53 |
+
|
| 54 |
+
It supports translation between **English** and **14 additional languages** in both directions.
|
| 55 |
+
|
| 56 |
+
---
|
| 57 |
+
|
| 58 |
+
# Quick Start
|
| 59 |
+
|
| 60 |
+
```python
|
| 61 |
+
from transformers import AutoTokenizer, T5ForConditionalGeneration
|
| 62 |
+
|
| 63 |
+
model = T5ForConditionalGeneration.from_pretrained(
|
| 64 |
+
"WhirlwindAI/Translate-15L"
|
| 65 |
+
)
|
| 66 |
+
|
| 67 |
+
tokenizer = AutoTokenizer.from_pretrained(
|
| 68 |
+
"WhirlwindAI/Translate-15L"
|
| 69 |
+
)
|
| 70 |
+
|
| 71 |
+
text = "Hello, how are you?"
|
| 72 |
+
|
| 73 |
+
prompt = f"translate en to fr: {text}"
|
| 74 |
+
|
| 75 |
+
inputs = tokenizer(prompt, return_tensors="pt")
|
| 76 |
+
|
| 77 |
+
outputs = model.generate(
|
| 78 |
+
**inputs,
|
| 79 |
+
max_new_tokens=50,
|
| 80 |
+
num_beams=4
|
| 81 |
+
)
|
| 82 |
+
|
| 83 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
---
|
| 87 |
+
|
| 88 |
+
# Supported Languages
|
| 89 |
+
|
| 90 |
+
| Code | Language |
|
| 91 |
+
|------|----------|
|
| 92 |
+
| ๐ฌ๐ง en | English |
|
| 93 |
+
| ๐ช๐ธ es | Spanish |
|
| 94 |
+
| ๐ซ๐ท fr | French |
|
| 95 |
+
| ๐ฉ๐ช de | German |
|
| 96 |
+
| ๐ฎ๐น it | Italian |
|
| 97 |
+
| ๐ต๐น pt | Portuguese |
|
| 98 |
+
| ๐ณ๐ฑ nl | Dutch |
|
| 99 |
+
| ๐ท๐บ ru | Russian |
|
| 100 |
+
| ๐จ๐ณ zh | Chinese |
|
| 101 |
+
| ๐ฏ๐ต ja | Japanese |
|
| 102 |
+
| ๐ฐ๐ท ko | Korean |
|
| 103 |
+
| ๐ธ๐ฆ ar | Arabic |
|
| 104 |
+
| ๐ฎ๐ณ hi | Hindi |
|
| 105 |
+
| ๐น๐ท tr | Turkish |
|
| 106 |
+
| ๐ป๐ณ vi | Vietnamese |
|
| 107 |
+
|
| 108 |
+
---
|
| 109 |
+
|
| 110 |
+
# Performance
|
| 111 |
+
|
| 112 |
+
<div align="center">
|
| 113 |
+
|
| 114 |
+
## BLEU Evaluation
|
| 115 |
+
|
| 116 |
+
<img src="bleu_separate.png" width="96%">
|
| 117 |
+
|
| 118 |
+
<br><br>
|
| 119 |
+
|
| 120 |
+
## Language Overview
|
| 121 |
+
|
| 122 |
+
<img src="radar_chart.png" width="70%">
|
| 123 |
+
|
| 124 |
+
</div>
|
| 125 |
+
|
| 126 |
+
---
|
| 127 |
+
|
| 128 |
+
# Highlights
|
| 129 |
+
|
| 130 |
+
| Direction | BLEU |
|
| 131 |
+
|-----------|------:|
|
| 132 |
+
| ๐ฌ๐ง โ ๐ซ๐ท | **32.43** |
|
| 133 |
+
| ๐ฉ๐ช โ ๐ฌ๐ง | **16.93** |
|
| 134 |
+
| ๐ฌ๐ง โ ๐ช๐ธ | 6.51 |
|
| 135 |
+
| ๐ซ๐ท โ ๐ฌ๐ง | 5.13 |
|
| 136 |
+
| ๐ฌ๐ง โ ๐ต๐น | 5.05 |
|
| 137 |
+
| ๐ฌ๐ง โ ๐ฎ๐น | 4.15 |
|
| 138 |
+
|
| 139 |
+
---
|
| 140 |
+
|
| 141 |
+
# Speed
|
| 142 |
+
|
| 143 |
+
<div align="center">
|
| 144 |
+
|
| 145 |
+
# โก ~8,151 Tokens / Second
|
| 146 |
+
|
| 147 |
+
Fast enough for lightweight multilingual applications while remaining compact.
|
| 148 |
+
|
| 149 |
+
See **speed.txt** for the complete benchmark.
|
| 150 |
+
|
| 151 |
+
</div>
|
| 152 |
+
|
| 153 |
+
---
|
| 154 |
+
|
| 155 |
+
# Examples
|
| 156 |
+
|
| 157 |
+
<div align="center">
|
| 158 |
+
|
| 159 |
+
<img src="download.png" width="48%">
|
| 160 |
+
<img src="download (1).png" width="48%">
|
| 161 |
+
|
| 162 |
+
</div>
|
| 163 |
+
|
| 164 |
+
---
|
| 165 |
+
|
| 166 |
+
# Notes
|
| 167 |
+
|
| 168 |
+
- English โ 14 Languages
|
| 169 |
+
- Optimized for compact deployment
|
| 170 |
+
- Trained on OPUS100
|
| 171 |
+
- Best performance on high-resource European languages
|
| 172 |
+
- Performance on low-resource languages remains limited
|
| 173 |
+
|
| 174 |
+
---
|
| 175 |
+
|
| 176 |
+
<div align="center">
|
| 177 |
+
|
| 178 |
+
### Built by WhirlwindAI
|
| 179 |
+
|
| 180 |
+
Efficient AI โข Practical Research โข Open Models
|
| 181 |
+
|
| 182 |
+
</div>
|