hudaiapa88 commited on
Commit
5cace4c
·
verified ·
1 Parent(s): 86d3d40

Upload 8 files

Browse files
en-tr/README.md ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # English to Turkish Translation Model
2
+
3
+ **Source:** Helsinki-NLP/opus-tatoeba-en-tr
4
+ **Format:** ONNX (Mobile Optimized for onnx_translation package)
5
+ **Package:** onnx_translation ^0.1.2
6
+
7
+ ## Files
8
+
9
+ ### Required by onnx_translation:
10
+ - `encoder_model.onnx` (50.17 MB) - Encoder model
11
+ - `decoder_model.onnx` (87.73 MB) - Decoder model
12
+ - `vocab.json` (1.65 MB) - Tokenizer vocabulary
13
+ - `tokenizer_config.json` (888 B) - Tokenizer configuration
14
+ - `generation_config.json` (304 B) - Generation parameters
15
+
16
+ ### Additional:
17
+ - `special_tokens_map.json` (439 B) - Special tokens
18
+ - `config.json` (1 KB) - Model configuration
19
+
20
+ **Total Size:** ~140 MB (optimized for Flutter)
21
+
22
+ ## Usage in Flutter
23
+
24
+ ```dart
25
+ import 'package:onnx_translation/onnx_translation.dart';
26
+
27
+ final model = OnnxModel();
28
+ await model.init(modelBasePath: 'assets/onnx_models/en-tr');
29
+
30
+ // Translate
31
+ final translated = await model.runModel(
32
+ "Hello, how are you?",
33
+ initialLangToken: '>>tr<<' // Target Turkish
34
+ );
35
+ print(translated); // "Merhaba, nasılsın?"
36
+ ```
37
+
38
+ ## Test Translations
39
+
40
+ ```
41
+ ✅ "Hello, how are you?" → "Merhaba, nasılsın?"
42
+ ✅ "Good morning" → "Günaydın"
43
+ ✅ "Thank you" → "Teşekkür ederim"
44
+ ```
45
+
46
+ ## pubspec.yaml
47
+
48
+ ```yaml
49
+ dependencies:
50
+ onnx_translation: ^0.1.2
51
+ onnxruntime: ^1.4.1
52
+ ffi: ^2.0.0
53
+
54
+ flutter:
55
+ assets:
56
+ - assets/onnx_models/en-tr/
57
+ ```
58
+
59
+ ---
60
+
61
+ *Generated by scripts/final_cleanup.py*
62
+ *Last updated: 2025-11-01*
en-tr/config.json ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "activation_dropout": 0.0,
3
+ "activation_function": "swish",
4
+ "architectures": [
5
+ "MarianMTModel"
6
+ ],
7
+ "attention_dropout": 0.0,
8
+ "bos_token_id": 0,
9
+ "classifier_dropout": 0.0,
10
+ "d_model": 512,
11
+ "decoder_attention_heads": 8,
12
+ "decoder_ffn_dim": 2048,
13
+ "decoder_layerdrop": 0.0,
14
+ "decoder_layers": 6,
15
+ "decoder_start_token_id": 59993,
16
+ "decoder_vocab_size": 59994,
17
+ "dropout": 0.1,
18
+ "encoder_attention_heads": 8,
19
+ "encoder_ffn_dim": 2048,
20
+ "encoder_layerdrop": 0.0,
21
+ "encoder_layers": 6,
22
+ "eos_token_id": 0,
23
+ "forced_eos_token_id": 0,
24
+ "init_std": 0.02,
25
+ "is_encoder_decoder": true,
26
+ "max_length": null,
27
+ "max_position_embeddings": 512,
28
+ "model_type": "marian",
29
+ "normalize_embedding": false,
30
+ "num_beams": null,
31
+ "num_hidden_layers": 6,
32
+ "pad_token_id": 59993,
33
+ "scale_embedding": true,
34
+ "share_encoder_decoder_embeddings": true,
35
+ "static_position_embeddings": true,
36
+ "torch_dtype": "float32",
37
+ "transformers_version": "4.55.4",
38
+ "use_cache": true,
39
+ "vocab_size": 59994
40
+ }
en-tr/decoder_model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e1e371996f18cfac238960fa3ecccb6c1259301294de63c3bb46e8297e9c8d38
3
+ size 87727677
en-tr/encoder_model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1a27670c8e8c4705d3dd63bbb49b181c13635755d1a86fd53f5a96a527dec335
3
+ size 50172960
en-tr/generation_config.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bad_words_ids": [
3
+ [
4
+ 59993
5
+ ]
6
+ ],
7
+ "bos_token_id": 0,
8
+ "decoder_start_token_id": 59993,
9
+ "eos_token_id": 0,
10
+ "forced_eos_token_id": 0,
11
+ "max_length": 512,
12
+ "num_beams": 6,
13
+ "pad_token_id": 59993,
14
+ "renormalize_logits": true,
15
+ "transformers_version": "4.55.4"
16
+ }
en-tr/special_tokens_map.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "eos_token": {
3
+ "content": "</s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "pad_token": {
10
+ "content": "<pad>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "unk_token": {
17
+ "content": "<unk>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ }
23
+ }
en-tr/tokenizer_config.json ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "</s>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "<unk>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "59993": {
20
+ "content": "<pad>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ }
27
+ },
28
+ "clean_up_tokenization_spaces": false,
29
+ "eos_token": "</s>",
30
+ "extra_special_tokens": {},
31
+ "model_max_length": 512,
32
+ "pad_token": "<pad>",
33
+ "separate_vocabs": false,
34
+ "source_lang": "eng",
35
+ "sp_model_kwargs": {},
36
+ "target_lang": "tur",
37
+ "tokenizer_class": "MarianTokenizer",
38
+ "unk_token": "<unk>"
39
+ }
en-tr/vocab.json ADDED
The diff for this file is too large to render. See raw diff