naklitechie commited on
Commit
6b85466
·
verified ·
1 Parent(s): 1210f41

Add ONNX export of ai4bharat/indic-parler-tts (parity verified vs PyTorch).

Browse files
.gitattributes CHANGED
@@ -33,3 +33,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ decoder_model.onnx.data filter=lfs diff=lfs merge=lfs -text
37
+ decoder_with_past_model.onnx.data filter=lfs diff=lfs merge=lfs -text
38
+ text_encoder.onnx.data filter=lfs diff=lfs merge=lfs -text
NOTICE.md ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Notice
2
+
3
+ This repository contains an ONNX re-export of `ai4bharat/indic-parler-tts`.
4
+
5
+ ## Provenance
6
+
7
+ - **Upstream model**: [`ai4bharat/indic-parler-tts`](https://huggingface.co/ai4bharat/indic-parler-tts) by AI4Bharat
8
+ - **Upstream framework**: [`huggingface/parler-tts`](https://github.com/huggingface/parler-tts) by Yoach Lacombe, Vaibhav Srivastav, and Sanchit Gandhi
9
+ - **License**: Apache 2.0 (preserved verbatim from upstream)
10
+
11
+ ## What we did
12
+
13
+ - Loaded the upstream Safetensors weights via `parler_tts.ParlerTTSForConditionalGeneration.from_pretrained`.
14
+ - Forced `_attn_implementation = "eager"` on every nested config (text_encoder, decoder, audio_encoder) to make `torch.export.export` succeed — SDPA's data-dependent branching is incompatible with dynamo tracing.
15
+ - Wrapped the text encoder, decoder (no-past), and decoder-with-past as three thin `nn.Module`s and exported each via `torch.onnx.export(..., dynamo=True, external_data=True)`.
16
+ - Verified per-graph parity vs PyTorch eager forward (max abs diff `4.72e-6` for text encoder, `1.91e-5` for decoder step 1, `1.68e-4` for decoder step 2).
17
+
18
+ No model surgery, no quantisation, no weight modification — these ONNX files run the same arithmetic as the upstream Safetensors model in float32.
19
+
20
+ ## What we did NOT include
21
+
22
+ - The DAC vocoder is bundled inside the upstream model as the `audio_encoder` submodule, but for the browser we consume [`onnx-community/dac_44khz-ONNX`](https://huggingface.co/onnx-community/dac_44khz-ONNX) separately. This avoids duplicate weights in the bundle.
23
+ - The `apply_delay_pattern_mask` autoregressive helper is left out of the ONNX graph (it's stateful in a way that doesn't trace cleanly). Consumers port that ~30-line function to JS — see the upstream `parler_tts/modeling_parler_tts.py` for reference.
24
+
25
+ ## Citation
26
+
27
+ Please credit AI4Bharat and the Parler-TTS authors as described in the upstream model card.
README.md ADDED
@@ -0,0 +1,185 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - hi
4
+ - ta
5
+ - te
6
+ - bn
7
+ - mr
8
+ - gu
9
+ - kn
10
+ - ml
11
+ - or
12
+ - pa
13
+ - as
14
+ - ur
15
+ - ne
16
+ - sa
17
+ - mai
18
+ - sd
19
+ - kok
20
+ - mni
21
+ - sat
22
+ license: apache-2.0
23
+ library_name: transformers.js
24
+ pipeline_tag: text-to-audio
25
+ tags:
26
+ - onnx
27
+ - text-to-speech
28
+ - tts
29
+ - indic
30
+ - parler-tts
31
+ - onnxruntime-web
32
+ base_model: ai4bharat/indic-parler-tts
33
+ ---
34
+
35
+ # Indic Parler-TTS — ONNX
36
+
37
+ This is a verbatim ONNX export of [`ai4bharat/indic-parler-tts`](https://huggingface.co/ai4bharat/indic-parler-tts) for in-browser inference via [onnxruntime-web](https://onnxruntime.ai/) or [transformers.js](https://huggingface.co/docs/transformers.js).
38
+
39
+ The upstream model is the multilingual Indic-language fine-tune of Parler-TTS ([huggingface/parler-tts](https://github.com/huggingface/parler-tts)) by AI4Bharat. This repo re-exports the same weights as ONNX graphs so they can be loaded into a browser without a Python runtime.
40
+
41
+ ## Files
42
+
43
+ | File | Size | Purpose |
44
+ |---|---|---|
45
+ | `text_encoder.onnx` + `.data` | 1.30 GB | T5 (flan-t5-large) description encoder |
46
+ | `decoder_model.onnx` + `.data` | 1.98 GB | First AR step — codec embed + prompt prefix + cross-attn + 24-layer decoder + fused 9-codebook lm-head |
47
+ | `decoder_with_past_model.onnx` + `.data` | 1.25 GB | Subsequent AR steps with past KV cache |
48
+ | `tokenizer.json`, `tokenizer.model`, `tokenizer_config.json` | 12 MB | LlamaTokenizerFast, vocab 90,714 — used for both description AND prompt |
49
+ | `config.json`, `generation_config.json`, `special_tokens_map.json` | small | Model + generation config |
50
+
51
+ **Total bundle: ~4.5 GB fp32.** The DAC 44.1 kHz vocoder ([`onnx-community/dac_44khz-ONNX`](https://huggingface.co/onnx-community/dac_44khz-ONNX), referenced separately) is needed to turn the decoder's codec tokens into audio waveform.
52
+
53
+ ## Architecture facts (consumer cheat sheet)
54
+
55
+ - **Single tokenizer** for description + prompt (the upstream README's mention of a `prompt_tokenizer/` subfolder is a documentation artifact — both inputs use the same `LlamaTokenizerFast`, vocab 90,714).
56
+ - **`prompt_cross_attention=False`** — prompt embeddings are *prefixed* to the decoder's input embeddings, not cross-attended. The decoder's self-attention KV cache region therefore covers `(prompt_len + codec_len)` positions after step 1.
57
+ - **Decoder**: 24 layers × 16 heads × 64 head_dim (1024 hidden), 9 codebooks, vocab 1088 per codebook, max position 4096.
58
+ - **Fused lm_head**: a single `Linear: 1024 → 9 × 1088` projection (not 9 separate heads), reshape + transpose inside the graph.
59
+ - **PAD/BOS/EOS/START**: 1024 / 1025 / 1024 / 1025.
60
+ - **Sample rate**: 44100 Hz from DAC. ~10 ms per codec token end-to-end.
61
+
62
+ ## I/O signatures
63
+
64
+ ### `text_encoder.onnx`
65
+
66
+ | Input | Shape | Type |
67
+ |---|---|---|
68
+ | `input_ids` | `[B, S]` | int64 |
69
+ | `attention_mask` | `[B, S]` | int64 |
70
+
71
+ | Output | Shape | Type |
72
+ |---|---|---|
73
+ | `last_hidden_state` | `[B, S, 1024]` | float32 |
74
+
75
+ ### `decoder_model.onnx` (first AR step)
76
+
77
+ | Input | Shape | Type |
78
+ |---|---|---|
79
+ | `codec_input_ids` | `[B, 9, T]` | int64 |
80
+ | `prompt_input_ids` | `[B, P]` | int64 |
81
+ | `prompt_attention_mask` | `[B, P]` | int64 |
82
+ | `encoder_hidden_states` | `[B, S, 1024]` | float32 |
83
+ | `encoder_attention_mask` | `[B, S]` | int64 |
84
+
85
+ | Output | Shape | Type |
86
+ |---|---|---|
87
+ | `logits` | `[9*B, P+T, 1088]` | float32 |
88
+ | `present.{i}.{decoder.key,decoder.value,encoder.key,encoder.value}` × 24 layers | `[B, 16, P+T or S, 64]` | float32 |
89
+
90
+ ### `decoder_with_past_model.onnx` (subsequent AR steps)
91
+
92
+ | Input | Shape | Type |
93
+ |---|---|---|
94
+ | `codec_input_ids` | `[B, 9, 1]` | int64 |
95
+ | `attention_mask` | `[B, full_t]` | int64 — covers prompt + prior codec + new |
96
+ | `encoder_attention_mask` | `[B, S]` | int64 |
97
+ | `cache_position` | `[1]` | int64 — `past_kv_length` scalar |
98
+ | `past_key_values.{i}.{decoder.key,decoder.value,encoder.key,encoder.value}` × 24 layers | as in `present` above | float32 |
99
+
100
+ | Output | Shape | Type |
101
+ |---|---|---|
102
+ | `logits` | `[9*B, 1, 1088]` | float32 |
103
+ | `present.{i}.{...}` × 24 layers | shifted by 1 in self-attn time dim | float32 |
104
+
105
+ KV layout per layer: `(decoder_self.key, decoder_self.value, encoder_cross.key, encoder_cross.value)` — IT2-compatible.
106
+
107
+ ## End-to-end inference (sketch)
108
+
109
+ ```js
110
+ // 1. Encode description
111
+ const encOut = await sessText.run({ input_ids, attention_mask });
112
+ const enc_h = encOut.last_hidden_state;
113
+
114
+ // 2. Build initial codec — [B, 9, 1] all START_ID=1025
115
+ const codec0 = new BigInt64Array(B * 9 * 1).fill(1025n);
116
+
117
+ // 3. Build delay-pattern mask (port of parler_tts.build_delay_pattern_mask)
118
+ const { initialIds, patternMask } = buildDelayPatternMask({
119
+ bos: 1025, pad: 1024, maxLen: 256, numCodebooks: 9,
120
+ });
121
+
122
+ // 4. First step
123
+ let { logits, ...present } = await sessDecNoPast.run({
124
+ codec_input_ids: initialIds, // [B, 9, T_init]
125
+ prompt_input_ids,
126
+ prompt_attention_mask,
127
+ encoder_hidden_states: enc_h,
128
+ encoder_attention_mask: attention_mask,
129
+ });
130
+
131
+ // 5. Greedy AR loop — apply delay pattern between steps
132
+ for (let step = 1; step < maxSteps; step++) {
133
+ const next = applyDelayPatternMask(argmaxLogits(logits), patternMask, step);
134
+ ({ logits, ...present } = await sessDecWithPast.run({
135
+ codec_input_ids: next,
136
+ attention_mask: buildFullAttnMask(promptLen + step),
137
+ encoder_attention_mask,
138
+ cache_position: BigInt(promptLen + step),
139
+ ...present, // re-feed all 96 KV tensors
140
+ }));
141
+ }
142
+
143
+ // 6. Decode codec tokens → audio via DAC
144
+ // use onnx-community/dac_44khz-ONNX decoder
145
+ ```
146
+
147
+ The `apply_delay_pattern_mask` and `build_delay_pattern_mask` functions need porting to JS — reference the Python source in [`parler_tts/modeling_parler_tts.py`](https://github.com/huggingface/parler-tts/blob/main/parler_tts/modeling_parler_tts.py).
148
+
149
+ ## Validated parity vs PyTorch
150
+
151
+ - Text encoder: max abs diff `4.72e-6`
152
+ - Decoder step 1 (no-past): max abs diff `1.91e-5`
153
+ - Decoder step 2 (with-past): max abs diff `1.68e-4`
154
+
155
+ All well below the typical fp32-sufficient `1e-3` tolerance.
156
+
157
+ ## Citation
158
+
159
+ If you use this in research or production, please cite the original AI4Bharat work:
160
+
161
+ ```bibtex
162
+ @misc{indic-parler-tts,
163
+ title = {Indic Parler-TTS},
164
+ author = {AI4Bharat},
165
+ year = {2024},
166
+ url = {https://huggingface.co/ai4bharat/indic-parler-tts}
167
+ }
168
+ ```
169
+
170
+ And the upstream Parler-TTS:
171
+
172
+ ```bibtex
173
+ @misc{lacombe-etal-2024-parler-tts,
174
+ author = {Yoach Lacombe and Vaibhav Srivastav and Sanchit Gandhi},
175
+ title = {Parler-TTS},
176
+ year = {2024},
177
+ publisher = {GitHub},
178
+ journal = {GitHub repository},
179
+ howpublished = {\url{https://github.com/huggingface/parler-tts}}
180
+ }
181
+ ```
182
+
183
+ ## License
184
+
185
+ Apache 2.0 — same as the upstream `ai4bharat/indic-parler-tts`. See [`NOTICE.md`](NOTICE.md) for attribution.
config.json ADDED
@@ -0,0 +1,274 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "/fsx/yoach/tmp/artefacts/training-multilingual-mini-indic-finetuning-on-base/",
3
+ "architectures": [
4
+ "ParlerTTSForConditionalGeneration"
5
+ ],
6
+ "audio_encoder": {
7
+ "_name_or_path": "ylacombe/dac_44khz",
8
+ "add_cross_attention": false,
9
+ "architectures": [
10
+ "DacModel"
11
+ ],
12
+ "bad_words_ids": null,
13
+ "begin_suppress_tokens": null,
14
+ "bos_token_id": null,
15
+ "chunk_size_feed_forward": 0,
16
+ "codebook_dim": 8,
17
+ "codebook_loss_weight": 1.0,
18
+ "codebook_size": 1024,
19
+ "commitment_loss_weight": 0.25,
20
+ "cross_attention_hidden_size": null,
21
+ "decoder_hidden_size": 1536,
22
+ "decoder_start_token_id": null,
23
+ "diversity_penalty": 0.0,
24
+ "do_sample": false,
25
+ "downsampling_ratios": [
26
+ 2,
27
+ 4,
28
+ 8,
29
+ 8
30
+ ],
31
+ "early_stopping": false,
32
+ "encoder_hidden_size": 64,
33
+ "encoder_no_repeat_ngram_size": 0,
34
+ "eos_token_id": null,
35
+ "exponential_decay_length_penalty": null,
36
+ "finetuning_task": null,
37
+ "forced_bos_token_id": null,
38
+ "forced_eos_token_id": null,
39
+ "hidden_size": 1024,
40
+ "hop_length": 512,
41
+ "id2label": {
42
+ "0": "LABEL_0",
43
+ "1": "LABEL_1"
44
+ },
45
+ "is_decoder": false,
46
+ "is_encoder_decoder": false,
47
+ "label2id": {
48
+ "LABEL_0": 0,
49
+ "LABEL_1": 1
50
+ },
51
+ "length_penalty": 1.0,
52
+ "max_length": 20,
53
+ "min_length": 0,
54
+ "model_type": "dac",
55
+ "n_codebooks": 9,
56
+ "no_repeat_ngram_size": 0,
57
+ "num_beam_groups": 1,
58
+ "num_beams": 1,
59
+ "num_return_sequences": 1,
60
+ "output_attentions": false,
61
+ "output_hidden_states": false,
62
+ "output_scores": false,
63
+ "pad_token_id": null,
64
+ "prefix": null,
65
+ "problem_type": null,
66
+ "pruned_heads": {},
67
+ "quantizer_dropout": 0.0,
68
+ "remove_invalid_values": false,
69
+ "repetition_penalty": 1.0,
70
+ "return_dict": true,
71
+ "return_dict_in_generate": false,
72
+ "sampling_rate": 44100,
73
+ "sep_token_id": null,
74
+ "suppress_tokens": null,
75
+ "task_specific_params": null,
76
+ "temperature": 1.0,
77
+ "tf_legacy_loss": false,
78
+ "tie_encoder_decoder": false,
79
+ "tie_word_embeddings": true,
80
+ "tokenizer_class": null,
81
+ "top_k": 50,
82
+ "top_p": 1.0,
83
+ "torch_dtype": "float32",
84
+ "torchscript": false,
85
+ "typical_p": 1.0,
86
+ "upsampling_ratios": [
87
+ 8,
88
+ 8,
89
+ 4,
90
+ 2
91
+ ],
92
+ "use_bfloat16": false
93
+ },
94
+ "decoder": {
95
+ "_name_or_path": "/fsx/yoach/tmp/artefacts/parler-tts-mini-v2-empty/decoder",
96
+ "activation_dropout": 0.0,
97
+ "activation_function": "gelu",
98
+ "add_cross_attention": true,
99
+ "architectures": [
100
+ "ParlerTTSForCausalLM"
101
+ ],
102
+ "attention_dropout": 0.0,
103
+ "bad_words_ids": null,
104
+ "begin_suppress_tokens": null,
105
+ "bos_token_id": 1025,
106
+ "chunk_size_feed_forward": 0,
107
+ "codebook_weights": null,
108
+ "cross_attention_hidden_size": null,
109
+ "cross_attention_implementation_strategy": null,
110
+ "decoder_start_token_id": null,
111
+ "delay_strategy": "delay",
112
+ "diversity_penalty": 0.0,
113
+ "do_sample": false,
114
+ "dropout": 0.1,
115
+ "early_stopping": false,
116
+ "encoder_no_repeat_ngram_size": 0,
117
+ "eos_token_id": 1024,
118
+ "exponential_decay_length_penalty": null,
119
+ "ffn_dim": 4096,
120
+ "finetuning_task": null,
121
+ "forced_bos_token_id": null,
122
+ "forced_eos_token_id": null,
123
+ "hidden_size": 1024,
124
+ "id2label": {
125
+ "0": "LABEL_0",
126
+ "1": "LABEL_1"
127
+ },
128
+ "initializer_factor": 0.02,
129
+ "is_decoder": true,
130
+ "is_encoder_decoder": false,
131
+ "label2id": {
132
+ "LABEL_0": 0,
133
+ "LABEL_1": 1
134
+ },
135
+ "layerdrop": 0.0,
136
+ "length_penalty": 1.0,
137
+ "max_length": 20,
138
+ "max_position_embeddings": 4096,
139
+ "min_length": 0,
140
+ "model_type": "parler_tts_decoder",
141
+ "no_repeat_ngram_size": 0,
142
+ "num_attention_heads": 16,
143
+ "num_beam_groups": 1,
144
+ "num_beams": 1,
145
+ "num_codebooks": 9,
146
+ "num_cross_attention_key_value_heads": 16,
147
+ "num_hidden_layers": 24,
148
+ "num_key_value_heads": 16,
149
+ "num_return_sequences": 1,
150
+ "output_attentions": false,
151
+ "output_hidden_states": false,
152
+ "output_scores": false,
153
+ "pad_token_id": 1024,
154
+ "prefix": null,
155
+ "problem_type": null,
156
+ "pruned_heads": {},
157
+ "remove_invalid_values": false,
158
+ "repetition_penalty": 1.0,
159
+ "return_dict": true,
160
+ "return_dict_in_generate": false,
161
+ "rope_embeddings": false,
162
+ "rope_theta": 10000.0,
163
+ "scale_embedding": false,
164
+ "sep_token_id": null,
165
+ "suppress_tokens": null,
166
+ "task_specific_params": null,
167
+ "temperature": 1.0,
168
+ "tf_legacy_loss": false,
169
+ "tie_encoder_decoder": false,
170
+ "tie_word_embeddings": false,
171
+ "tokenizer_class": null,
172
+ "top_k": 50,
173
+ "top_p": 1.0,
174
+ "torch_dtype": "float32",
175
+ "torchscript": false,
176
+ "typical_p": 1.0,
177
+ "use_bfloat16": false,
178
+ "use_cache": true,
179
+ "use_fused_lm_heads": true,
180
+ "vocab_size": 1088
181
+ },
182
+ "decoder_start_token_id": 1025,
183
+ "is_encoder_decoder": true,
184
+ "model_type": "parler_tts",
185
+ "pad_token_id": 1024,
186
+ "prompt_cross_attention": false,
187
+ "text_encoder": {
188
+ "_name_or_path": "google/flan-t5-large",
189
+ "add_cross_attention": false,
190
+ "architectures": [
191
+ "T5ForConditionalGeneration"
192
+ ],
193
+ "bad_words_ids": null,
194
+ "begin_suppress_tokens": null,
195
+ "bos_token_id": null,
196
+ "chunk_size_feed_forward": 0,
197
+ "classifier_dropout": 0.0,
198
+ "cross_attention_hidden_size": null,
199
+ "d_ff": 2816,
200
+ "d_kv": 64,
201
+ "d_model": 1024,
202
+ "decoder_start_token_id": 0,
203
+ "dense_act_fn": "gelu_new",
204
+ "diversity_penalty": 0.0,
205
+ "do_sample": false,
206
+ "dropout_rate": 0.1,
207
+ "early_stopping": false,
208
+ "encoder_no_repeat_ngram_size": 0,
209
+ "eos_token_id": 1,
210
+ "exponential_decay_length_penalty": null,
211
+ "feed_forward_proj": "gated-gelu",
212
+ "finetuning_task": null,
213
+ "forced_bos_token_id": null,
214
+ "forced_eos_token_id": null,
215
+ "id2label": {
216
+ "0": "LABEL_0",
217
+ "1": "LABEL_1"
218
+ },
219
+ "initializer_factor": 1.0,
220
+ "is_decoder": false,
221
+ "is_encoder_decoder": true,
222
+ "is_gated_act": true,
223
+ "label2id": {
224
+ "LABEL_0": 0,
225
+ "LABEL_1": 1
226
+ },
227
+ "layer_norm_epsilon": 1e-06,
228
+ "length_penalty": 1.0,
229
+ "max_length": 20,
230
+ "min_length": 0,
231
+ "model_type": "t5",
232
+ "n_positions": 512,
233
+ "no_repeat_ngram_size": 0,
234
+ "num_beam_groups": 1,
235
+ "num_beams": 1,
236
+ "num_decoder_layers": 24,
237
+ "num_heads": 16,
238
+ "num_layers": 24,
239
+ "num_return_sequences": 1,
240
+ "output_attentions": false,
241
+ "output_hidden_states": false,
242
+ "output_past": true,
243
+ "output_scores": false,
244
+ "pad_token_id": 0,
245
+ "prefix": null,
246
+ "problem_type": null,
247
+ "pruned_heads": {},
248
+ "relative_attention_max_distance": 128,
249
+ "relative_attention_num_buckets": 32,
250
+ "remove_invalid_values": false,
251
+ "repetition_penalty": 1.0,
252
+ "return_dict": true,
253
+ "return_dict_in_generate": false,
254
+ "sep_token_id": null,
255
+ "suppress_tokens": null,
256
+ "task_specific_params": null,
257
+ "temperature": 1.0,
258
+ "tf_legacy_loss": false,
259
+ "tie_encoder_decoder": false,
260
+ "tie_word_embeddings": false,
261
+ "tokenizer_class": null,
262
+ "top_k": 50,
263
+ "top_p": 1.0,
264
+ "torch_dtype": null,
265
+ "torchscript": false,
266
+ "typical_p": 1.0,
267
+ "use_bfloat16": false,
268
+ "use_cache": true,
269
+ "vocab_size": 32128
270
+ },
271
+ "torch_dtype": "float32",
272
+ "transformers_version": "4.46.0.dev0",
273
+ "vocab_size": 90714
274
+ }
decoder_model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:45e9d50f483015207dba00e0373d1dfb255a5bceb6002e5756c86fe6962700da
3
+ size 3401863
decoder_model.onnx.data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:029c8a9fd562e0fd4ff0513df3d7cea951277becc759ff497aed0c15d3774c53
3
+ size 2080415744
decoder_with_past_model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9504153915896e9e0ae7d20e8ae7bc558c71606c4f185f5dd13904a5c3350ebf
3
+ size 2246622
decoder_with_past_model.onnx.data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:26b7597ba133486e0c3223b47154b8955f491d6214071c72404039c43e663e2d
3
+ size 1306001408
generation_config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 1025,
4
+ "decoder_start_token_id": 1025,
5
+ "do_sample": true,
6
+ "eos_token_id": 1024,
7
+ "max_length": 2610,
8
+ "pad_token_id": 1024,
9
+ "transformers_version": "4.46.0.dev0"
10
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "</s>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "<unk>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "unk_token": {
24
+ "content": "<unk>",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ }
30
+ }
text_encoder.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:200187fa4148ddbd6b6a3edeb82cf7b4812fece9302a5a1934b3082bb5093bf5
3
+ size 2476571
text_encoder.onnx.data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1fffdcffc587047ce0fd69b6e3577087097decd2b98d7e994d29b9928a206e94
3
+ size 1364983808
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bc8fa773221597d09cfadb23a2b1bd717488a0481505469ea56d42cb044de9b5
3
+ size 1795391
tokenizer_config.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": true,
3
+ "add_eos_token": false,
4
+ "add_prefix_space": true,
5
+ "added_tokens_decoder": {
6
+ "0": {
7
+ "content": "<unk>",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false,
12
+ "special": true
13
+ },
14
+ "1": {
15
+ "content": "<s>",
16
+ "lstrip": false,
17
+ "normalized": false,
18
+ "rstrip": false,
19
+ "single_word": false,
20
+ "special": true
21
+ },
22
+ "2": {
23
+ "content": "</s>",
24
+ "lstrip": false,
25
+ "normalized": false,
26
+ "rstrip": false,
27
+ "single_word": false,
28
+ "special": true
29
+ }
30
+ },
31
+ "bos_token": "<s>",
32
+ "clean_up_tokenization_spaces": false,
33
+ "eos_token": "</s>",
34
+ "legacy": false,
35
+ "model_max_length": 1000000000000000019884624838656,
36
+ "pad_token": "<unk>",
37
+ "padding_side": "left",
38
+ "sp_model_kwargs": {},
39
+ "spaces_between_special_tokens": false,
40
+ "tokenizer_class": "LlamaTokenizer",
41
+ "unk_token": "<unk>",
42
+ "use_default_system_prompt": false
43
+ }