Translation
Transformers
Safetensors
PyTorch
marian
text2text-generation
mt
sentence-piece
multilingual
allegro
laniqo
Instructions to use allegro/BiDi-pol-slk with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use allegro/BiDi-pol-slk 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="allegro/BiDi-pol-slk")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("allegro/BiDi-pol-slk") model = AutoModelForSeq2SeqLM.from_pretrained("allegro/BiDi-pol-slk", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Add paper link and pipeline tag
#1
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,5 +1,4 @@
|
|
| 1 |
---
|
| 2 |
-
license: cc-by-4.0
|
| 3 |
language:
|
| 4 |
- cs
|
| 5 |
- pl
|
|
@@ -7,6 +6,8 @@ language:
|
|
| 7 |
- sl
|
| 8 |
- en
|
| 9 |
library_name: transformers
|
|
|
|
|
|
|
| 10 |
tags:
|
| 11 |
- translation
|
| 12 |
- mt
|
|
@@ -20,6 +21,7 @@ tags:
|
|
| 20 |
|
| 21 |
# MultiSlav BiDi Models
|
| 22 |
|
|
|
|
| 23 |
|
| 24 |
<p align="center">
|
| 25 |
<a href="https://ml.allegro.tech/"><img src="allegro-title.svg" alt="MLR @ Allegro.com"></a>
|
|
@@ -129,11 +131,11 @@ All training parameters are listed in table below.
|
|
| 129 |
| Batch Size | mini batch fit to VRAM |
|
| 130 |
| Training Accelerators | 4x A100 40GB |
|
| 131 |
| Max Length | 100 tokens |
|
| 132 |
-
| Optimizer | Adam
|
| 133 |
-
| Warmup steps | 8000
|
| 134 |
-
| Context | Sentence-level MT
|
| 135 |
| Languages Supported | See [Bi-Di models available](#Bi-Di-models-available) |
|
| 136 |
-
| Precision | float16
|
| 137 |
| Validation Freq | 3000 steps |
|
| 138 |
| Stop Metric | ChrF |
|
| 139 |
| Stop Criterion | 20 Validation steps |
|
|
@@ -220,44 +222,4 @@ Evaluation of the models was performed on [Flores200](https://huggingface.co/dat
|
|
| 220 |
The table below compares performance of the open-source models and all applicable models from our collection.
|
| 221 |
Metric used: Unbabel/wmt22-comet-da.
|
| 222 |
|
| 223 |
-
| **Direction**
|
| 224 |
-
|----------------------------------------------------|--------------:|--------------:|--------------:|--------------:|--------------:|--------------:|--------------:|--------------:|--------------:|--------------:|--------------:|--------------:|--------------:|--------------:|--------------:|--------------:|--------------:|--------------:|--------------:|--------------:|
|
| 225 |
-
| **M2M-100** | 87.0 | 89.0 | 92.1 | 89.7 | 88.6 | 86.4 | 88.4 | 87.3 | 89.6 | 84.6 | 89.4 | 88.4 | 92.7 | 86.8 | 89.1 | 89.6 | 90.3 | 86.4 | 88.7 | 90.1 |
|
| 226 |
-
| **NLLB-200** | 88.1 | 88.9 | 91.2 | 88.6 | 90.4 | __88.5__ | 90.1 | 88.8 | 89.4 | __85.8__ | 88.9 | 87.7 | 91.8 | 88.2 | 88.9 | 88.8 | 90.0 | __87.5__ | 88.6 | 89.4 |
|
| 227 |
-
| **Seamless-M4T** | 87.5 | 80.9 | 90.8 | 82.0 | __90.7__ | __88.5__ | __90.6__ | __89.6__ | 79.6 | 85.4 | 80.0 | 76.4 | 91.5 | 87.2 | 81.2 | 82.9 | 80.9 | 87.3 | 76.7 | 81.0 |
|
| 228 |
-
| **OPUS-MT Sla-Sla** | __88.2__ | 82.8 | - | 83.4 | 89.1 | 85.6 | - | 84.5 | 82.9 | 82.2 | - | 81.2 | - | - | - | - | 83.5 | 84.1 | 80.8 | - |
|
| 229 |
-
| **OPUS-MT SK-EN** | - | - | - | - | - | - | 89.5 | - | - | - | - | - | - | __88.4__ | - | - | - | - | - | - |
|
| 230 |
-
| _Our contributions:_ | | | | | | | | | | | | | | | | | | | | |
|
| 231 |
-
| **BiDi Models**<span style="color:green;">*</span> | 87.5 | 89.4 | 92.4 | 89.8 | 87.8 | 86.2 | 87.2 | 86.6 | 90.0 | 85.0 | 89.1 | 88.4 | 92.9 | 87.3 | 88.8 | 89.4 | 90.0 | 86.9 | 88.1 | 89.1 |
|
| 232 |
-
| **P4-pol**<span style="color:red;">◊</span> | - | 89.6 | 90.8 | 88.7 | - | - | - | - | 90.2 | - | 89.8 | 88.7 | 91.0 | - | 89.3 | 88.4 | 89.3 | - | 88.7 | 88.5 |
|
| 233 |
-
| **P5-eng**<span style="color:red;">◊</span> | 88.0 | 89.0 | 90.7 | 89.0 | 88.8 | 87.3 | 88.4 | 87.5 | 89.0 | 85.7 | 88.5 | 87.8 | 91.0 | 88.2 | 88.6 | 88.5 | 89.6 | 87.2 | 88.4 | 88.9 |
|
| 234 |
-
| **P5-ces**<span style="color:red;">◊</span> | 87.9 | 89.6 | __92.5__ | 89.9 | 88.4 | 85.0 | 87.9 | 85.9 | 90.3 | 84.5 | 89.5 | 88.0 | __93.0__ | 87.8 | 89.4 | 89.8 | 90.3 | 85.7 | 87.9 | 89.8 |
|
| 235 |
-
| **MultiSlav-4slav** | - | 89.7 | __92.5__ | 90.0 | - | - | - | - | 90.2 | - | 89.6 | 88.7 | 92.9 | - | 89.4 | 90.1 | __90.6__ | - | 88.9 | __90.2__ |
|
| 236 |
-
| **MultiSlav-5lang** | 87.8 | __89.8__ | __92.5__ | __90.1__ | 88.9 | 86.9 | 88.0 | 87.3 | __90.4__ | 85.4 | 89.8 | __88.9__ | 92.9 | 87.8 | __89.6__ | __90.2__ | __90.6__ | 87.0 | __89.2__ | __90.2__ |
|
| 237 |
-
|
| 238 |
-
<span style="color:red;">◊</span> system of 2 models *Many2XXX* and *XXX2Many*, see [P5-ces2many](https://huggingface.co/allegro/p5-ces2many)
|
| 239 |
-
|
| 240 |
-
<span style="color:green;">*</span> results combined for all bi-directional models; each values for applicable model
|
| 241 |
-
|
| 242 |
-
## Limitations and Biases
|
| 243 |
-
|
| 244 |
-
We did not evaluate inherent bias contained in training datasets. It is advised to validate bias of our models in perspective domain. This might be especially problematic in translation from English to Slavic languages, which require explicitly indicated gender and might hallucinate based on bias present in training data.
|
| 245 |
-
|
| 246 |
-
## License
|
| 247 |
-
|
| 248 |
-
The model is licensed under CC BY 4.0, which allows for commercial use.
|
| 249 |
-
|
| 250 |
-
## Citation
|
| 251 |
-
TO BE UPDATED SOON 🤗
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
## Contact Options
|
| 256 |
-
|
| 257 |
-
Authors:
|
| 258 |
-
- MLR @ Allegro: [Artur Kot](https://linkedin.com/in/arturkot), [Mikołaj Koszowski](https://linkedin.com/in/mkoszowski), [Wojciech Chojnowski](https://linkedin.com/in/wojciech-chojnowski-744702348), [Mieszko Rutkowski](https://linkedin.com/in/mieszko-rutkowski)
|
| 259 |
-
- Laniqo.com: [Artur Nowakowski](https://linkedin.com/in/artur-nowakowski-mt), [Kamil Guttmann](https://linkedin.com/in/kamil-guttmann), [Mikołaj Pokrywka](https://linkedin.com/in/mikolaj-pokrywka)
|
| 260 |
-
|
| 261 |
-
Please don't hesitate to contact authors if you have any questions or suggestions:
|
| 262 |
-
- e-mail: artur.kot@allegro.com or mikolaj.koszowski@allegro.com
|
| 263 |
-
- LinkedIn: [Artur Kot](https://linkedin.com/in/arturkot) or [Mikołaj Koszowski](https://linkedin.com/in/mkoszowski)
|
|
|
|
| 1 |
---
|
|
|
|
| 2 |
language:
|
| 3 |
- cs
|
| 4 |
- pl
|
|
|
|
| 6 |
- sl
|
| 7 |
- en
|
| 8 |
library_name: transformers
|
| 9 |
+
license: cc-by-4.0
|
| 10 |
+
pipeline_tag: translation
|
| 11 |
tags:
|
| 12 |
- translation
|
| 13 |
- mt
|
|
|
|
| 21 |
|
| 22 |
# MultiSlav BiDi Models
|
| 23 |
|
| 24 |
+
[Paper](https://hf.co/papers/2502.14509)
|
| 25 |
|
| 26 |
<p align="center">
|
| 27 |
<a href="https://ml.allegro.tech/"><img src="allegro-title.svg" alt="MLR @ Allegro.com"></a>
|
|
|
|
| 131 |
| Batch Size | mini batch fit to VRAM |
|
| 132 |
| Training Accelerators | 4x A100 40GB |
|
| 133 |
| Max Length | 100 tokens |
|
| 134 |
+
| Optimizer | Adam |
|
| 135 |
+
| Warmup steps | 8000 |
|
| 136 |
+
| Context | Sentence-level MT |
|
| 137 |
| Languages Supported | See [Bi-Di models available](#Bi-Di-models-available) |
|
| 138 |
+
| Precision | float16 |
|
| 139 |
| Validation Freq | 3000 steps |
|
| 140 |
| Stop Metric | ChrF |
|
| 141 |
| Stop Criterion | 20 Validation steps |
|
|
|
|
| 222 |
The table below compares performance of the open-source models and all applicable models from our collection.
|
| 223 |
Metric used: Unbabel/wmt22-comet-da.
|
| 224 |
|
| 225 |
+
| **Direction**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|