RTG 500-to-English for Kidi

Translate from 500 languages into English with the RTG Many-to-English v1 model. This 539M-parameter BF16 version runs locally using Kidi on CPU or Apple Metal. See the supported-language inventory.

This package requires Kidi. It does not load with Hugging Face Transformers or the Hub inference widget.

Model Details

Property Value
Task Translation from 500 source languages to English
Parameters 539,328,256 (539.33M)
Architecture Encoder-decoder Transformer
Encoder / decoder layers 9 / 6
Hidden / feed-forward width 768 / 2,048
Attention heads 12
Activation GELU
Source / target vocabulary 512,000 / 64,000 BPE tokens
Precision BF16 weights; FP32 biases and LayerNorm parameters
Download size Approximately 1.08 GB, including tokenizers
Input limit 160 source tokens per sentence
License Apache-2.0

Get Started

Follow the Kidi build instructions and put the kidi executable on PATH. Download the complete model directory with the Hugging Face CLI:

hf download thammegowda/rtg-500eng-v1 --local-dir rtg-500eng-v1

If repository access requires authentication, run hf auth login first. Keep the configuration and both tokenizers alongside the weights. Kidi reads the compressed tokenizers directly; do not unpack them.

Translate on CPU:

printf '%s\n' 'Comment allez @-@ vous ?' 'Bonjour le monde !' |
  kidi predict --model rtg-500eng-v1 --backend ynnpack --threads 8 --beam-size 1

Example output:

How are you ?
Hello , world !

On macOS with a Metal-enabled build, replace --backend ynnpack with --backend mps.

Input and output must be Moses-tokenized text, one sentence per line. Normalize and tokenize raw input first, then detokenize the translation for natural spacing. The included BPE tokenizers do not perform this preprocessing. See the upstream preprocessing instructions. English is the fixed target; no target-language prefix is needed.

The example uses greedy decoding. Omit --beam-size 1 to use the default beam size of 4. The default length penalty is 0.6, with at most 50 extra target tokens. For file input, add --in source.tok --out translation.tok.

You can verify a download with shasum -a 256 -c SHA256SUMS from inside the model directory. Runtime memory usage is higher than download size.

Provenance

Converted to BF16 from the RTG Many-to-English v1 release, checkpoint rtg500eng-tfm9L6L768d-bsz720k-stp200k-ens05, without further training. The original model averages five checkpoints ending at training step 199,922. For the training data, language coverage, and original evaluation, see the project and paper.

Limitations

Translation quality varies by language and domain. Low-resource languages may have substantially lower quality. Training data can contain bias, and translations can omit, distort, or fabricate content. Use human review for consequential use.

This conversion has been tested on CPU and Apple Metal, not reevaluated across all 500 languages. BF16 precision and backend arithmetic can change translations relative to the original FP32 model. CUDA and Qualcomm execution are not supported by this package's current Kidi runtime.

Citation

@inproceedings{gowda-etal-2021-many,
  title = "Many-to-{E}nglish Machine Translation Tools, Data, and Pretrained Models",
  author = "Gowda, Thamme and Zhang, Zhao and Mattmann, Chris and May, Jonathan",
  booktitle = "Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing: System Demonstrations",
  year = "2021",
  publisher = "Association for Computational Linguistics",
  url = "https://aclanthology.org/2021.acl-demo.37/",
  doi = "10.18653/v1/2021.acl-demo.37",
  pages = "306--316"
}
Downloads last month

-

Downloads are not tracked for this model. How to track
Safetensors
Model size
0.5B params
Tensor type
F32
·
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support