Upload 10 files
Browse filesAdd CTranslate2 model files
- README.md +119 -53
- config.json +10 -0
- generation_config.json +11 -0
- model.bin +3 -0
- muna_manifest.json +6 -0
- sentencepiece.bpe.model +3 -0
- shared_vocabulary.json +0 -0
- special_tokens_map.json +1 -0
- tokenizer_config.json +1 -0
- vocab.json +0 -0
README.md
CHANGED
|
@@ -1,77 +1,143 @@
|
|
| 1 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
license: mit
|
| 3 |
-
base_model:
|
| 4 |
-
- facebook/m2m100_418M
|
| 5 |
-
pipeline_tag: translation
|
| 6 |
tags:
|
| 7 |
-
-
|
| 8 |
-
-
|
| 9 |
-
-
|
| 10 |
-
-
|
| 11 |
-
-
|
| 12 |
-
|
|
|
|
|
|
|
| 13 |
---
|
| 14 |
|
| 15 |
-
# MynaLuna
|
| 16 |
-
|
| 17 |
-
This repository contains an INT8-quantized CTranslate2 conversion of **Facebook M2M100 418M**, prepared for use with the MynaLuna application.
|
| 18 |
|
| 19 |
-
|
| 20 |
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
This repository is maintained to provide a stable download source for the MynaLuna application.
|
| 24 |
-
|
| 25 |
-
It helps ensure that users can continue downloading the required model even if the original distribution source changes or becomes unavailable.
|
| 26 |
|
| 27 |
## Model details
|
| 28 |
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
| Conversion | CTranslate2 INT8 by MynaLuna |
|
| 36 |
-
| Format | CTranslate2 |
|
| 37 |
-
| Quantization | INT8 |
|
| 38 |
-
| Model size | ~468 MB |
|
| 39 |
|
| 40 |
## Files
|
| 41 |
|
| 42 |
-
```
|
| 43 |
-
model.bin — INT8 quantized weights
|
| 44 |
-
shared_vocabulary.json —
|
| 45 |
-
vocab.json —
|
| 46 |
-
sentencepiece.bpe.model — SentencePiece tokenizer
|
| 47 |
-
tokenizer_config.json —
|
| 48 |
-
config.json —
|
| 49 |
-
special_tokens_map.json —
|
| 50 |
-
generation_config.json —
|
| 51 |
```
|
| 52 |
|
| 53 |
-
##
|
| 54 |
-
|
| 55 |
-
The original Facebook M2M100 418M model was converted to the CTranslate2 format and quantized to INT8 for efficient local inference.
|
| 56 |
-
|
| 57 |
-
## Attribution
|
| 58 |
|
| 59 |
-
|
|
|
|
|
|
|
| 60 |
|
| 61 |
-
|
|
|
|
| 62 |
|
| 63 |
-
|
|
|
|
| 64 |
|
| 65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
|
| 67 |
## License
|
| 68 |
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
The original model is licensed under the **MIT License**.
|
| 72 |
-
|
| 73 |
-
Please refer to the original repository for licensing details:
|
| 74 |
|
| 75 |
-
|
| 76 |
|
| 77 |
-
-
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
language:
|
| 3 |
+
- af
|
| 4 |
+
- am
|
| 5 |
+
- ar
|
| 6 |
+
- az
|
| 7 |
+
- be
|
| 8 |
+
- bg
|
| 9 |
+
- bn
|
| 10 |
+
- ca
|
| 11 |
+
- cs
|
| 12 |
+
- cy
|
| 13 |
+
- da
|
| 14 |
+
- de
|
| 15 |
+
- el
|
| 16 |
+
- en
|
| 17 |
+
- es
|
| 18 |
+
- et
|
| 19 |
+
- fa
|
| 20 |
+
- fi
|
| 21 |
+
- fr
|
| 22 |
+
- ga
|
| 23 |
+
- gl
|
| 24 |
+
- gu
|
| 25 |
+
- ha
|
| 26 |
+
- he
|
| 27 |
+
- hi
|
| 28 |
+
- hr
|
| 29 |
+
- hu
|
| 30 |
+
- hy
|
| 31 |
+
- id
|
| 32 |
+
- ig
|
| 33 |
+
- is
|
| 34 |
+
- it
|
| 35 |
+
- ja
|
| 36 |
+
- ka
|
| 37 |
+
- kk
|
| 38 |
+
- km
|
| 39 |
+
- ko
|
| 40 |
+
- lt
|
| 41 |
+
- lv
|
| 42 |
+
- mk
|
| 43 |
+
- ml
|
| 44 |
+
- mn
|
| 45 |
+
- mr
|
| 46 |
+
- ms
|
| 47 |
+
- mt
|
| 48 |
+
- my
|
| 49 |
+
- ne
|
| 50 |
+
- nl
|
| 51 |
+
- no
|
| 52 |
+
- pl
|
| 53 |
+
- pt
|
| 54 |
+
- ro
|
| 55 |
+
- ru
|
| 56 |
+
- si
|
| 57 |
+
- sk
|
| 58 |
+
- sl
|
| 59 |
+
- so
|
| 60 |
+
- sq
|
| 61 |
+
- sr
|
| 62 |
+
- sv
|
| 63 |
+
- sw
|
| 64 |
+
- ta
|
| 65 |
+
- te
|
| 66 |
+
- th
|
| 67 |
+
- tl
|
| 68 |
+
- tr
|
| 69 |
+
- uk
|
| 70 |
+
- ur
|
| 71 |
+
- uz
|
| 72 |
+
- vi
|
| 73 |
+
- xh
|
| 74 |
+
- yo
|
| 75 |
+
- zh
|
| 76 |
+
- zu
|
| 77 |
license: mit
|
|
|
|
|
|
|
|
|
|
| 78 |
tags:
|
| 79 |
+
- translation
|
| 80 |
+
- multilingual
|
| 81 |
+
- onnx
|
| 82 |
+
- int8
|
| 83 |
+
- ctranslate2
|
| 84 |
+
- m2m100
|
| 85 |
+
- facebook
|
| 86 |
+
pipeline_tag: translation
|
| 87 |
---
|
| 88 |
|
| 89 |
+
# MynaLuna-Translation
|
|
|
|
|
|
|
| 90 |
|
| 91 |
+
INT8-quantized [CTranslate2](https://github.com/OpenNMT/CTranslate2) export of **Facebook M2M100 418M**, packaged for use in the [MynaLuna](https://github.com/siatoslav/MynaLuna) desktop voice assistant.
|
| 92 |
|
| 93 |
+
Supports **100 languages** with direct any-to-any translation — no pivot through English required.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 94 |
|
| 95 |
## Model details
|
| 96 |
|
| 97 |
+
- **Base model:** [facebook/m2m100_418M](https://huggingface.co/facebook/m2m100_418M)
|
| 98 |
+
- **Architecture:** M2M100 (Many-to-Many Multilingual)
|
| 99 |
+
- **Parameters:** 418M
|
| 100 |
+
- **Quantization:** INT8
|
| 101 |
+
- **Runtime:** CTranslate2
|
| 102 |
+
- **Model size:** ~468 MB
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
|
| 104 |
## Files
|
| 105 |
|
| 106 |
+
```
|
| 107 |
+
model.bin — INT8 quantized weights (CTranslate2 format)
|
| 108 |
+
shared_vocabulary.json — shared source/target vocabulary
|
| 109 |
+
vocab.json — full vocabulary with token IDs
|
| 110 |
+
sentencepiece.bpe.model — SentencePiece BPE tokenizer
|
| 111 |
+
tokenizer_config.json — tokenizer configuration
|
| 112 |
+
config.json — model configuration
|
| 113 |
+
special_tokens_map.json — special token mappings
|
| 114 |
+
generation_config.json — default generation parameters
|
| 115 |
```
|
| 116 |
|
| 117 |
+
## Usage with CTranslate2
|
|
|
|
|
|
|
|
|
|
|
|
|
| 118 |
|
| 119 |
+
```python
|
| 120 |
+
import ctranslate2
|
| 121 |
+
import sentencepiece as spm
|
| 122 |
|
| 123 |
+
sp = spm.SentencePieceProcessor("sentencepiece.bpe.model")
|
| 124 |
+
translator = ctranslate2.Translator(".", inter_threads=1)
|
| 125 |
|
| 126 |
+
src_lang = "en"
|
| 127 |
+
tgt_lang = "uk"
|
| 128 |
|
| 129 |
+
tokens = sp.encode(f"__{src_lang}__ Hello, world!", out_type=str)
|
| 130 |
+
results = translator.translate_batch([tokens], target_prefix=[[f"__{tgt_lang}__"]])
|
| 131 |
+
output = sp.decode(results[0].hypotheses[0][1:])
|
| 132 |
+
print(output) # Привіт, світе!
|
| 133 |
+
```
|
| 134 |
|
| 135 |
## License
|
| 136 |
|
| 137 |
+
MIT — same as the original M2M100 model.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 138 |
|
| 139 |
+
## Credits
|
| 140 |
|
| 141 |
+
- Original model: [facebook/m2m100_418M](https://huggingface.co/facebook/m2m100_418M)
|
| 142 |
+
- CTranslate2 runtime: [OpenNMT/CTranslate2](https://github.com/OpenNMT/CTranslate2)
|
| 143 |
+
- Repackaged for MynaLuna by [Siatoslav Petrov](https://github.com/siatoslav)
|
config.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_source_bos": false,
|
| 3 |
+
"add_source_eos": false,
|
| 4 |
+
"bos_token": "<s>",
|
| 5 |
+
"decoder_start_token": "</s>",
|
| 6 |
+
"eos_token": "</s>",
|
| 7 |
+
"layer_norm_epsilon": null,
|
| 8 |
+
"multi_query_attention": false,
|
| 9 |
+
"unk_token": "<unk>"
|
| 10 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 0,
|
| 4 |
+
"decoder_start_token_id": 2,
|
| 5 |
+
"early_stopping": true,
|
| 6 |
+
"eos_token_id": 2,
|
| 7 |
+
"max_length": 200,
|
| 8 |
+
"num_beams": 5,
|
| 9 |
+
"pad_token_id": 1,
|
| 10 |
+
"transformers_version": "4.27.0.dev0"
|
| 11 |
+
}
|
model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a1826980fc5c037e69c7ac94fcb56c03001a66f380eb71863cc0a3879e71421b
|
| 3 |
+
size 490667752
|
muna_manifest.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model": "facebook/m2m100_418M",
|
| 3 |
+
"runtime": "ctranslate2",
|
| 4 |
+
"compute_type": "int8",
|
| 5 |
+
"installed_by": "_translation_model.py"
|
| 6 |
+
}
|
sentencepiece.bpe.model
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d8f7c76ed2a5e0822be39f0a4f95a55eb19c78f4593ce609e2edbc2aea4d380a
|
| 3 |
+
size 2423393
|
shared_vocabulary.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"bos_token": "<s>", "eos_token": "</s>", "unk_token": "<unk>", "sep_token": "</s>", "pad_token": "<pad>", "additional_special_tokens": ["__af__", "__am__", "__ar__", "__ast__", "__az__", "__ba__", "__be__", "__bg__", "__bn__", "__br__", "__bs__", "__ca__", "__ceb__", "__cs__", "__cy__", "__da__", "__de__", "__el__", "__en__", "__es__", "__et__", "__fa__", "__ff__", "__fi__", "__fr__", "__fy__", "__ga__", "__gd__", "__gl__", "__gu__", "__ha__", "__he__", "__hi__", "__hr__", "__ht__", "__hu__", "__hy__", "__id__", "__ig__", "__ilo__", "__is__", "__it__", "__ja__", "__jv__", "__ka__", "__kk__", "__km__", "__kn__", "__ko__", "__lb__", "__lg__", "__ln__", "__lo__", "__lt__", "__lv__", "__mg__", "__mk__", "__ml__", "__mn__", "__mr__", "__ms__", "__my__", "__ne__", "__nl__", "__no__", "__ns__", "__oc__", "__or__", "__pa__", "__pl__", "__ps__", "__pt__", "__ro__", "__ru__", "__sd__", "__si__", "__sk__", "__sl__", "__so__", "__sq__", "__sr__", "__ss__", "__su__", "__sv__", "__sw__", "__ta__", "__th__", "__tl__", "__tn__", "__tr__", "__uk__", "__ur__", "__uz__", "__vi__", "__wo__", "__xh__", "__yi__", "__yo__", "__zh__", "__zu__"]}
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"src_lang": null, "tgt_lang": null, "bos_token": "<s>", "eos_token": "</s>", "sep_token": "</s>", "unk_token": "<unk>", "pad_token": "<pad>", "special_tokens_map_file": "m2m_100_1.2B_v2/special_tokens_map.json", "tokenizer_file": null, "name_or_path": "m2m_100_1.2B_v2/", "model_max_length": 1024}
|
vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|