File size: 2,318 Bytes
b2627f3 de15210 b2627f3 c46d53b b2627f3 f2baf12 b2627f3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
---
license: apache-2.0
language:
- en
- is
library_name: fairseq
tags:
- translation
- wmt
---
## Model description
This is a translation model which translates text from English to Icelandic. It follows the architecture of the transformer model described in [Attention is All You Need](https://arxiv.org/pdf/1706.03762) and was trained with [fairseq](https://github.com/facebookresearch/fairseq) for [WMT24](https://www2.statmt.org/wmt24/).
This is the base version of our model. See also: [wmt24-en-is-transformer-base](https://huggingface.co/arnastofnun/wmt24-en-is-transformer-base), [wmt24-en-is-transformer-base-deep](https://huggingface.co/arnastofnun/wmt24-en-is-transformer-base-deep), [wmt24-en-is-transformer-big](https://huggingface.co/arnastofnun/wmt24-en-is-transformer-big).
| model | d_model | d_ff | h | N_enc | N_dec |
|:---------------|:----------------------|:-------------------|:--------------|:--------------------|:--------------------|
| Base | 512 | 2048 | 8 | 6 | 6 |
| Base_deep | 512 | 2048 | 8 | 36 | 12 |
| Big | 1024 | 4096 | 16 | 6 | 6 |
| Big_deep | 1024 | 4096 | 16 | 36 | 12 |
#### How to use
```python
from fairseq.models.transformer import TransformerModel
TRANSLATION_MODEL_NAME = 'checkpoint_best.pt'
TRANSLATION_MODEL = TransformerModel.from_pretrained('path/to/model', checkpoint_file=TRANSLATION_MODEL_NAME, bpe='sentencepiece', sentencepiece_model='sentencepiece.bpe.model')
src_sentences = ['This is a test sentence.', 'This is another test sentence.']
translated_sentences = TRANSLATION_MODEL.translate(src_sentences)
print(translated_sentences)
```
## Eval results
We evaluated our data on the [WMT21 test set](https://github.com/wmt-conference/wmt21-news-systems/). These are the chrF scores for our published models:
| model | chrF |
|:---------------|:------|
| Base | 56.8 |
| Base_deep | 57.1 |
| Big | 57.7 |
| Big_deep | 57.7 |
## BibTeX entry and citation info
```bibtex
@inproceedings{jasonarson2024cogsinamachine,
year={2024},
title={Cogs in a Machine, Doing What They’re Meant to Do \\– The AMI Submission to the WMT24 General Translation Task},
author={Atli Jasonarson, Hinrik Hafsteinsson, Bjarki Ármannsson, Steinþór Steingrímsson},
organization={The Árni Magnússon Institute for Icelandic Studies}
}
``` |