t8star commited on
Commit
d1bb22f
·
verified ·
1 Parent(s): cea129d

Copy files from models/t8star/Index-Translate-Comfy

Browse files
.gitattributes CHANGED
@@ -36,3 +36,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
36
  2B/tokenizer.json filter=lfs diff=lfs merge=lfs -text
37
  9B/Index_Translate_Series_Technical_Report.pdf filter=lfs diff=lfs merge=lfs -text
38
  9B/tokenizer.json filter=lfs diff=lfs merge=lfs -text
 
 
36
  2B/tokenizer.json filter=lfs diff=lfs merge=lfs -text
37
  9B/Index_Translate_Series_Technical_Report.pdf filter=lfs diff=lfs merge=lfs -text
38
  9B/tokenizer.json filter=lfs diff=lfs merge=lfs -text
39
+ Index-Translate-2B/tokenizer.json filter=lfs diff=lfs merge=lfs -text
Index-Translate-2B/.gitattributes ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz 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
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
Index-Translate-2B/README.md ADDED
@@ -0,0 +1,257 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - translation
5
+ - index
6
+ ---
7
+
8
+ # Index-Translate-2B
9
+
10
+ <p><a style="display:inline" href="https://index-translate.bilibili.com/">🌐 Online demo</a> · <a style="display:inline" href="https://github.com/bilibili/Index-Translate"><img src="https://raw.githubusercontent.com/bilibili/Index-Translate/main/docs/assets/github.svg" width="16" height="16" alt="" style="display:inline;vertical-align:middle;margin:0"> GitHub</a> · <a style="display:inline" href="https://arxiv.org/abs/2609.40181">📚 Technical report</a> · <a style="display:inline" href="https://huggingface.co/collections/IndexTeam/index-translate">🤗 Hugging Face collection</a> · <a style="display:inline" href="https://www.modelscope.cn/collections/IndexTeam/Index-Translate"><img src="https://raw.githubusercontent.com/bilibili/Index-Translate/main/docs/assets/modelscope.svg" width="16" height="16" alt="" style="display:inline;vertical-align:middle;margin:0"> ModelScope collection</a></p>
11
+
12
+ **Index-Translate-2B** is the compact 2B-parameter multilingual text model of the **Index-Translate** family, built on Qwen3.5. It supports text translation across **150 languages** and follows translation instructions involving terminology, formatting, style, structure, context, and output length.
13
+
14
+ ## Capabilities
15
+
16
+ - **General multilingual translation:** translate sentences, articles, subtitles, and other text across the supported language inventory.
17
+ - **Translation with instructions:** preserve specified terms, JSON or other structures, code and placeholders; adapt style and resolve meaning from context.
18
+ - **Social and cultural translation:** interpret community aliases, playful spelling, memes, and nonliteral expressions with attention to their intended meaning.
19
+ - Outperforms Hy-MT2-1.8B on every main translation metric reported for both models in the technical report.
20
+ - Scores **0.7569 instTrans IFscore** and **0.6443 MEME**, combining instruction adherence with contextual translation of community expressions.
21
+ - On low-resource instruction translation, scores **0.3050 quality / 0.6586 IFscore**, with **3.97% off-target outputs**.
22
+
23
+ Language coverage is documented in the technical report's language inventory. The speech and long-document models have their own packaged interfaces and language coverage.
24
+
25
+ ## Training
26
+
27
+ The technical report describes a shared multilingual mid-training recipe, followed by task-specific post-training:
28
+
29
+ 1. **Multilingual mid-training:** general text replay, monolingual text, ordinary parallel translations, and pivot-organized multilingual groups. The constant stage uses general / parallel / monolingual data at **1:1:1**; decay uses general / core-pivot / full-pivot data at **1:4:2**. The shared recipe totals **167.77B tokens**.
30
+ 2. **Specialist SFT and RL:** general translation, instruction following, and meme translation specialists receive task-specific supervision. General translation RL combines XCOMET-XXL with language-validity and adequacy judgments; instruction RL uses Rubric-as-Reward with hard checks and graded constraints. RIVAL provides adaptive judge supervision.
31
+ 3. **Expert integration and targeted distillation:** parameter interpolation combines complementary specialists, then multi-teacher on-policy distillation (**MOPD**) addresses task types that remain weak after merging.
32
+
33
+ The evaluated 2B and 9B models combine the general, instruction, and meme specialists with weights **0.8 / 0.1 / 0.1**, then receive targeted MOPD. Reported training-stage ablations use separate configurations; they are not the final model scores below.
34
+
35
+ ## Evaluation
36
+
37
+ Results below reproduce the latest technical report. Comparisons apply to the report's evaluation data and settings, and metric scales differ. Higher is better except for off-target rates. These are individual benchmark scores, separate from the demo's normalized radar categories.
38
+
39
+ The tables compare this checkpoint with the other Index-Translate sizes, **Hy-MT2-1.8B** and the **Qwen3.5-2B** base at a similar scale, and larger translation models and API baselines.
40
+
41
+ ### Main translation benchmarks
42
+
43
+ WMT26 Judge uses a **0–100** scale; the other columns use **0–1**. instTrans quality and IFscore measure translation quality and instruction adherence separately. IFMTBench reports reference-based XCOMET-XXL and instruction adherence. Vertical is the equal-weight mean of the five domain scores below. North-Small-Translate is the **218B-A25B** model; TranslateGemma is **translategemma-12b-it**.
44
+
45
+ | Model | FLORES COMET-22 | WMT24++ COMET-22 | WMT26 Judge | instTrans Quality | instTrans IFscore | IFMTBench XCOMET-XXL | IFMTBench IFscore | Vertical mean | MEME |
46
+ |---|---:|---:|---:|---:|---:|---:|---:|---:|---:|
47
+ | Index-Translate-35B-A3B (preview) | 0.8794 | 0.8586 | 76.76 | 0.6901 | 0.8336 | 0.7926 | 0.8991 | 0.8438 | 0.7405 |
48
+ | Index-Translate-9B | 0.8789 | 0.8601 | 75.35 | 0.6771 | 0.8209 | 0.7957 | 0.8760 | 0.8451 | 0.7387 |
49
+ | **Index-Translate-2B** | 0.8655 | 0.8489 | 60.26 | 0.5391 | 0.7569 | 0.7712 | 0.7584 | 0.8377 | 0.6443 |
50
+ | Hy-MT2-1.8B | 0.8522 | 0.8401 | 49.35 | 0.3181 | 0.4932 | 0.7493 | 0.7161 | 0.8314 | 0.3643 |
51
+ | Hy-MT2-7B | 0.8747 | 0.8593 | 60.51 | 0.5143 | 0.6079 | 0.8049 | 0.8741 | 0.8335 | 0.5139 |
52
+ | Hy-MT2-30B-A3B | 0.8787 | 0.8624 | 66.81 | 0.5725 | 0.6415 | 0.8177 | 0.9029 | 0.8459 | 0.5812 |
53
+ | TranslateGemma-12B | 0.8732 | 0.8524 | 71.19 | 0.4515 | 0.3068 | 0.8023 | 0.2892 | 0.8347 | 0.4281 |
54
+ | North-Small-Translate (218B-A25B) | 0.8784 | 0.8578 | 68.37 | 0.5697 | 0.5294 | 0.7657 | 0.8635 | 0.8357 | 0.6836 |
55
+ | Qwen3.5-2B (base) | 0.6983 | 0.6933 | 32.11 | 0.0999 | 0.2431 | 0.6197 | 0.3836 | 0.7557 | 0.2062 |
56
+ | Qwen3.5-9B (base) | 0.8316 | 0.8073 | 60.31 | 0.2467 | 0.0609 | 0.7341 | 0.5980 | 0.8199 | 0.5728 |
57
+ | Qwen3.5-35B-A3B | 0.8570 | 0.8290 | 71.33 | 0.3690 | 0.5204 | 0.7589 | 0.7822 | 0.8267 | 0.6447 |
58
+ | DeepSeek-V4.1-Flash | 0.8762 | 0.8510 | 83.55 | 0.6068 | 0.6374 | 0.7817 | 0.9090 | 0.8432 | 0.7424 |
59
+ | GPT-5.6-Sol | 0.8650 | 0.8469 | 89.10 | 0.6902 | 0.7624 | 0.7946 | 0.9367 | 0.8311 | 0.7194 |
60
+ | Gemini 3.5 Flash Lite | 0.8750 | 0.8497 | 79.52 | 0.6068 | 0.6374 | 0.7764 | 0.8854 | 0.8131 | 0.7034 |
61
+
62
+ ### Low-resource translation and instruction following
63
+
64
+ **FLORES_minor_pair** contains **104,000 inputs** across **1,040 directions among 62 languages**. **instTrans_minor** contains **2,793 instruction-translation tasks** from Chinese or English into low-resource languages. Off-target is the percentage of outputs in a language other than the requested target; lower is better. The other scores use a 0–1 scale.
65
+
66
+ | Model | FLORES_minor_pair COMET-22 ↑ | FLORES_minor_pair XCOMET-XXL ↑ | FLORES_minor_pair off-target ↓ | instTrans_minor Quality ↑ | instTrans_minor IFscore ↑ | instTrans_minor off-target ↓ |
67
+ |---|---:|---:|---:|---:|---:|---:|
68
+ | Index-Translate-35B-A3B (preview) | 0.8168 | 0.7164 | 2.4% | 0.5151 | 0.7715 | 4.05% |
69
+ | Index-Translate-9B | 0.7992 | 0.6805 | 4.0% | 0.5222 | 0.7725 | 3.47% |
70
+ | **Index-Translate-2B** | 0.7377 | 0.4817 | 4.2% | 0.3050 | 0.6586 | 3.97% |
71
+ | Hy-MT2-1.8B | 0.3163 | 0.2014 | 54.2% | 0.0412 | 0.1313 | 65.27% |
72
+ | Hy-MT2-7B | 0.4626 | 0.3334 | 35.7% | 0.1121 | 0.2405 | 45.40% |
73
+ | Hy-MT2-30B-A3B | 0.6746 | 0.5359 | 14.5% | 0.2246 | 0.4449 | 15.47% |
74
+ | TranslateGemma-12B | 0.8021 | 0.6217 | 1.7% | 0.2412 | 0.2682 | 5.37% |
75
+ | North-Small-Translate (218B-A25B) | 0.6855 | 0.4919 | 13.2% | 0.2436 | 0.2902 | 26.89% |
76
+ | Qwen3.5-2B (base) | 0.3716 | 0.1852 | 39.1% | 0.0069 | 0.0549 | 73.54% |
77
+ | Qwen3.5-9B (base) | 0.6774 | 0.4502 | 11.2% | 0.1318 | 0.3532 | 18.51% |
78
+ | Qwen3.5-35B-A3B | 0.7854 | 0.6257 | 3.5% | 0.2874 | 0.4458 | 11.60% |
79
+ | DeepSeek-V4.1-Flash | 0.8333 | 0.7297 | 1.3% | 0.4793 | 0.5854 | 5.73% |
80
+ | GPT-5.6-Sol | 0.7669 | 0.6918 | 10.4% | 0.5757 | 0.6866 | 7.73% |
81
+ | Gemini 3.5 Flash Lite | 0.8122 | 0.6995 | 3.3% | 0.3927 | 0.5584 | 12.18% |
82
+
83
+ ### Domain translation
84
+
85
+ COMET-22 is used for OPUS-Books, WMT Biomedical, MTNT, and MuST-Cinema; GuoFeng-Webnovel uses document-COMET. Higher is better. The complete comparison is in the report.
86
+
87
+ | Model | OPUS-Books | Biomedical | MTNT | MuST-Cinema | GuoFeng |
88
+ |---|---:|---:|---:|---:|---:|
89
+ | Index-Translate-35B-A3B (preview) | 0.8013 | 0.8681 | 0.8244 | 0.8962 | 0.8291 |
90
+ | Index-Translate-9B | 0.8010 | 0.8674 | 0.8246 | 0.8979 | 0.8345 |
91
+ | **Index-Translate-2B** | 0.7845 | 0.8635 | 0.8132 | 0.8930 | 0.8345 |
92
+
93
+ ### General capabilities
94
+
95
+ These answer-accuracy results (%) use matched evaluation subsets. Translation training can change general capabilities; these scores describe the translation checkpoints rather than the original Qwen3.5 models.
96
+
97
+ | Model | C-Eval | GPQA-Diamond | INCLUDE | MMMLU |
98
+ |---|---:|---:|---:|---:|
99
+ | Index-Translate-35B-A3B (preview) | 77.6 | 49.1 | 68.8 | 71.9 |
100
+ | Index-Translate-9B | 69.6 | 36.3 | 63.1 | 66.6 |
101
+ | **Index-Translate-2B** | 42.6 | 27.4 | 39.1 | 42.7 |
102
+
103
+ ### Evaluation protocol
104
+
105
+ - The main FLORES evaluation uses **126,000 inputs**, 420 directions among 21 languages; WMT24++ uses 6,000 inputs from English into 20 languages.
106
+ - instTrans has **3,000 Chinese-to-20-language tasks** across ten constraint types. GPT-5.6-Sol judges quality and instruction adherence separately. MEME contains **3,638 Chinese-to-English cases**, covering 703 terms and 857 disambiguated senses.
107
+ - Text translation evaluation uses **greedy decoding and a 16,384-token context window**, except WMT26, which uses zero-shot Chinese instructions, a **3,584-token context**, and a **1,536-token output limit**. WMT26 reference-free GPT-5.6-Sol scores are averaged over 20 target languages.
108
+ - IFMTBench starts with 7,344 examples. Preprocessing removes 280 single-constraint examples with reference or language-label issues, leaving **7,064 inputs**; **7,063 receive valid judgments**. See the [preprocessing note](https://github.com/bilibili/Index-Translate/blob/main/docs/evaluation.md#ifmtbench-preprocessing).
109
+
110
+ The **1,024-token output budget in the inference client below is a usage default**, not the output budget used to produce every reported evaluation result. Detailed protocols and valid-judgment counts are in the [technical report](https://arxiv.org/abs/2609.40181). The report describes instTrans and MEME; benchmark release plans are tracked in the [GitHub TODO](https://github.com/bilibili/Index-Translate#todo).
111
+
112
+ ## Inference
113
+
114
+ ### Default settings
115
+
116
+ The following settings describe the released [`translate.py`](https://github.com/bilibili/Index-Translate/blob/main/inference/llm/translate.py) client. Its decoding defaults apply across Index-Translate sizes; the commands below explicitly select this card's model.
117
+
118
+ | Setting | Client default and override |
119
+ |---|---|
120
+ | Decoding | Greedy, **`temperature=0`**; override with `--temperature` |
121
+ | Output budget | `max_tokens=1024`; override with `--max-tokens` |
122
+ | Thinking | Disabled through `chat_template_kwargs={"enable_thinking": False}`; no thinking toggle in this CLI |
123
+ | Top-p / top-k / min-p | Not explicitly set by this client; inference-server defaults apply |
124
+ | Presence / frequency / repetition penalties | Not explicitly set by this client; inference-server defaults apply |
125
+ | Random seed | Not explicitly set by this client; inference-server behavior applies |
126
+ | Stop strings / stop-token IDs / ignore-EOS | Not explicitly set by this client; inference-server and model defaults apply |
127
+ | Model ID | `IndexTeam/Index-Translate-9B`; `INDEX_MODEL` changes the default, and `--model` overrides it |
128
+ | Source language | `auto`; override with `--source` / `-s`; auto omits the source-language name from the prompt |
129
+ | Target language | `en`; override with `--target` / `-t` |
130
+ | Endpoint | `http://127.0.0.1:8000/v1`; `OPENAI_BASE_URL` changes the default, and `--base-url` overrides it |
131
+ | API key | `EMPTY` for local serving; `OPENAI_API_KEY` changes the default, and `--api-key` overrides it |
132
+ | Request format | One user message; no system message is added by the client |
133
+ | Response streaming | Not enabled by this client; it prints the complete response |
134
+ | Transport timeout and retries | No explicit values set by the script; installed OpenAI / HTTPX client behavior applies |
135
+ | Proxy handling | Environment proxies disabled for `127.0.0.1`, `localhost`, and `::1`; remote endpoints use the OpenAI client's usual behavior |
136
+ | Input / output | Positional text or stdin; input is stripped and empty input is rejected; output is stripped and any emitted thinking block is removed |
137
+
138
+ The client maps supported short language codes to Chinese language names in the prompt. Provide the full language name for a code outside its mapping. Its training-aligned prompt is:
139
+
140
+ ```text
141
+ 请将以下{source-language}文本翻译为{target-language},直接输出翻译结果,不要进行任何解释。
142
+
143
+ {source-text}
144
+ ```
145
+
146
+ With `--source auto`, `{source-language}` is omitted. Prompt length, source text, and generated output all count toward the served context. Parameters left unspecified above are not assigned new fixed values by this model card.
147
+
148
+ The shipped configuration sets `max_position_embeddings=262144`. The examples below use **`--max-model-len 32768`**, matching the GitHub 2B/9B Translate serving preset. Input plus output must fit within the served context, and available GPU memory constrains practical lengths. Increase the client output budget for longer translations.
149
+
150
+ The GitHub inference guide gives an approximate BF16 GPU-memory starting point of **8 GB for 2B**, with additional memory needed for KV cache and longer contexts.
151
+
152
+ ### Serve with vLLM
153
+
154
+ Use a CUDA environment and a vLLM build with Qwen3.5 support. Start the server in one terminal:
155
+
156
+ ```bash
157
+ pip install -U vllm
158
+ vllm serve IndexTeam/Index-Translate-2B \
159
+ --served-model-name IndexTeam/Index-Translate-2B \
160
+ --host 127.0.0.1 --port 8000 --max-model-len 32768
161
+ ```
162
+
163
+ For a short-text smoke test, `--max-model-len 4096` reduces the requested context. Multi-GPU deployments can add appropriate tensor-parallel arguments. See the [serving guide](https://github.com/bilibili/Index-Translate/blob/main/inference/llm/README.md) for runtime details and other OpenAI-compatible servers.
164
+
165
+ ### OpenAI-compatible Python client
166
+
167
+ Install the client dependencies in another terminal:
168
+
169
+ ```bash
170
+ pip install openai httpx
171
+ ```
172
+
173
+ This example uses the training-aligned Chinese translation prompt and disables thinking explicitly:
174
+
175
+ ```python
176
+ import httpx
177
+ from openai import OpenAI
178
+
179
+ client = OpenAI(
180
+ base_url="http://127.0.0.1:8000/v1",
181
+ api_key="EMPTY",
182
+ http_client=httpx.Client(trust_env=False),
183
+ )
184
+ response = client.chat.completions.create(
185
+ model="IndexTeam/Index-Translate-2B",
186
+ messages=[{
187
+ "role": "user",
188
+ "content": "请将以下文本翻译为英语,直接输出翻译结果,不要进行任何解释。\n\n你好,世界!",
189
+ }],
190
+ temperature=0,
191
+ max_tokens=1024,
192
+ extra_body={"chat_template_kwargs": {"enable_thinking": False}},
193
+ )
194
+ text = response.choices[0].message.content or ""
195
+ # Match the repository client's fallback if a thinking block is emitted.
196
+ if "</think>" in text:
197
+ text = text.split("</think>", 1)[1]
198
+ print(text.strip().removeprefix("<think>").strip())
199
+ ```
200
+
201
+ ### Repository client
202
+
203
+ After starting the server, use the public client with this model ID:
204
+
205
+ ```bash
206
+ git clone https://github.com/bilibili/Index-Translate.git
207
+ cd Index-Translate
208
+ pip install -r inference/llm/requirements.txt
209
+ python inference/llm/translate.py \
210
+ "你好,世界。今天天气不错。" --target en \
211
+ --model IndexTeam/Index-Translate-2B
212
+ ```
213
+
214
+ Use `--source` to specify the input language and `--target` for the output language. For languages without a mapped code in the client, provide the full language name. The client also accepts `--base-url`, `--api-key`, `--max-tokens`, and `--temperature`.
215
+
216
+ ## Examples and practical limits
217
+
218
+ The following recorded Index-Translate-2B case from the official demo illustrates a community expression:
219
+
220
+ | Source and context | Recorded English translation |
221
+ |---|---|
222
+ | 狒瘾犯了就去打 — “狒瘾” refers to the urge to play Final Fantasy XIV | Go play when my FFXIV addiction kicks in. |
223
+
224
+ See the [captured inference cases](https://github.com/bilibili/Index-Translate/blob/main/inference/llm/cases/translate_cases.jsonl) and [prompt examples](https://github.com/bilibili/Index-Translate/blob/main/docs/prompts.md) for more directions and instruction formats.
225
+
226
+ Scores vary across languages and tasks. Combined constraints and low-resource directions remain harder than core-language translation, and successful individual examples do not guarantee that every instruction will be followed. For explicit target syllable counts, use Index-Homura; for native full-document translation, use Index-NativeLong with its dedicated templates.
227
+
228
+ ## Model family
229
+
230
+ | Family | Models | Task |
231
+ |---|---|---|
232
+ | Index-Translate | [2B](https://huggingface.co/IndexTeam/Index-Translate-2B) / [9B](https://huggingface.co/IndexTeam/Index-Translate-9B) / [35B-A3B (preview)](https://huggingface.co/IndexTeam/Index-Translate-35B-A3B-preview) | Text translation and translation instructions |
233
+ | Index-Echo S2TT | [2B](https://huggingface.co/IndexTeam/Index-Echo-S2TT-2B) / [9B](https://huggingface.co/IndexTeam/Index-Echo-S2TT-9B) | Speech to translated subtitles |
234
+ | Index-Echo S2ST | [2B](https://huggingface.co/IndexTeam/Index-Echo-S2ST-2B) / [9B](https://huggingface.co/IndexTeam/Index-Echo-S2ST-9B) | Speech to speech with source-voice conditioning |
235
+ | Index-Homura | [2B](https://huggingface.co/IndexTeam/Index-Homura-2B) / [9B](https://huggingface.co/IndexTeam/Index-Homura-9B) | Translation toward a target syllable count |
236
+ | Index-NativeLong | [2B](https://huggingface.co/IndexTeam/Index-Nailong-2B) / [9B](https://huggingface.co/IndexTeam/Index-Nailong-9B) | Full-document translation |
237
+
238
+ **Naming:** Index-NativeLong retains the published model IDs `IndexTeam/Index-Nailong-2B` and `IndexTeam/Index-Nailong-9B`. The [family repository](https://github.com/bilibili/Index-Translate) includes prompt guides, browser-extension code, and a video-dubbing pipeline. This model's [ModelScope page](https://www.modelscope.cn/models/IndexTeam/Index-Translate-2B) mirrors the model card.
239
+
240
+ ## Citation
241
+
242
+ ```bibtex
243
+ @techreport{indextranslate2026,
244
+ author={Tianjiao Li and Mengran Yu and Chenyu Shi and Lusheng Zhang and
245
+ Qisi Chen and Yanshan Zhou and Ji Qi and Jingying Liu and
246
+ Yuang Feng and Ziang Cui and Tianxing Yan},
247
+ title={Index-Translate: A Multilingual Translation Model Family --- Text, Speech, Controlled Dubbing, and Long-Document Translation},
248
+ institution={Index LLM Team},
249
+ year={2026},
250
+ month={September},
251
+ url={https://arxiv.org/abs/2609.40181}
252
+ }
253
+ ```
254
+
255
+ ## License
256
+
257
+ [Apache-2.0](https://github.com/bilibili/Index-Translate/blob/main/LICENSE). Questions and feedback are welcome through [GitHub Issues](https://github.com/bilibili/Index-Translate/issues).
Index-Translate-2B/config.json ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen3_5ForConditionalGeneration"
4
+ ],
5
+ "image_token_id": 248056,
6
+ "model_type": "qwen3_5",
7
+ "text_config": {
8
+ "attention_bias": false,
9
+ "attention_dropout": 0.0,
10
+ "attn_output_gate": true,
11
+ "dtype": "bfloat16",
12
+ "eos_token_id": 248044,
13
+ "full_attention_interval": 4,
14
+ "head_dim": 256,
15
+ "hidden_act": "silu",
16
+ "hidden_size": 2048,
17
+ "initializer_range": 0.02,
18
+ "intermediate_size": 6144,
19
+ "layer_types": [
20
+ "linear_attention",
21
+ "linear_attention",
22
+ "linear_attention",
23
+ "full_attention",
24
+ "linear_attention",
25
+ "linear_attention",
26
+ "linear_attention",
27
+ "full_attention",
28
+ "linear_attention",
29
+ "linear_attention",
30
+ "linear_attention",
31
+ "full_attention",
32
+ "linear_attention",
33
+ "linear_attention",
34
+ "linear_attention",
35
+ "full_attention",
36
+ "linear_attention",
37
+ "linear_attention",
38
+ "linear_attention",
39
+ "full_attention",
40
+ "linear_attention",
41
+ "linear_attention",
42
+ "linear_attention",
43
+ "full_attention"
44
+ ],
45
+ "linear_conv_kernel_dim": 4,
46
+ "linear_key_head_dim": 128,
47
+ "linear_num_key_heads": 16,
48
+ "linear_num_value_heads": 16,
49
+ "linear_value_head_dim": 128,
50
+ "max_position_embeddings": 262144,
51
+ "mlp_only_layers": [],
52
+ "model_type": "qwen3_5_text",
53
+ "mtp_num_hidden_layers": 1,
54
+ "mtp_use_dedicated_embeddings": false,
55
+ "num_attention_heads": 8,
56
+ "num_hidden_layers": 24,
57
+ "num_key_value_heads": 2,
58
+ "rms_norm_eps": 1e-06,
59
+ "tie_word_embeddings": true,
60
+ "use_cache": true,
61
+ "vocab_size": 248320,
62
+ "mamba_ssm_dtype": "float32",
63
+ "rope_parameters": {
64
+ "mrope_interleaved": true,
65
+ "mrope_section": [
66
+ 11,
67
+ 11,
68
+ 10
69
+ ],
70
+ "rope_type": "default",
71
+ "rope_theta": 10000000,
72
+ "partial_rotary_factor": 0.25
73
+ }
74
+ },
75
+ "tie_word_embeddings": true,
76
+ "transformers_version": "4.57.0.dev0",
77
+ "video_token_id": 248057,
78
+ "vision_config": {
79
+ "deepstack_visual_indexes": [],
80
+ "depth": 24,
81
+ "hidden_act": "gelu_pytorch_tanh",
82
+ "hidden_size": 1024,
83
+ "in_channels": 3,
84
+ "initializer_range": 0.02,
85
+ "intermediate_size": 4096,
86
+ "model_type": "qwen3_5",
87
+ "num_heads": 16,
88
+ "num_position_embeddings": 2304,
89
+ "out_hidden_size": 2048,
90
+ "patch_size": 16,
91
+ "spatial_merge_size": 2,
92
+ "temporal_patch_size": 2
93
+ },
94
+ "vision_end_token_id": 248054,
95
+ "vision_start_token_id": 248053
96
+ }
Index-Translate-2B/generation_config.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "eos_token_id": [
3
+ 248044,
4
+ 248046
5
+ ],
6
+ "pad_token_id": 248044,
7
+ "bos_token_id": null
8
+ }
Index-Translate-2B/merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
Index-Translate-2B/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2f499211fe352913464be69365e2e5724f913051efb3ae2b6fd0fa617a4c0b60
3
+ size 4548216776
Index-Translate-2B/preprocessor_config.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "size": {
3
+ "longest_edge": 16777216,
4
+ "shortest_edge": 65536
5
+ },
6
+ "patch_size": 16,
7
+ "temporal_patch_size": 2,
8
+ "merge_size": 2,
9
+ "image_mean": [
10
+ 0.5,
11
+ 0.5,
12
+ 0.5
13
+ ],
14
+ "image_std": [
15
+ 0.5,
16
+ 0.5,
17
+ 0.5
18
+ ],
19
+ "processor_class": "Qwen3VLProcessor",
20
+ "image_processor_type": "Qwen2VLImageProcessorFast"
21
+ }
Index-Translate-2B/tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fe000e3ed39ed12b8d2481d527d44f93c65d37e87645d2dcc80d1bf9d50d2927
3
+ size 12807196
Index-Translate-2B/tokenizer_config.json ADDED
@@ -0,0 +1,305 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "added_tokens_decoder": {
4
+ "248044": {
5
+ "content": "<|endoftext|>",
6
+ "lstrip": false,
7
+ "normalized": false,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "248045": {
13
+ "content": "<|im_start|>",
14
+ "lstrip": false,
15
+ "normalized": false,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ },
20
+ "248046": {
21
+ "content": "<|im_end|>",
22
+ "lstrip": false,
23
+ "normalized": false,
24
+ "rstrip": false,
25
+ "single_word": false,
26
+ "special": true
27
+ },
28
+ "248047": {
29
+ "content": "<|object_ref_start|>",
30
+ "lstrip": false,
31
+ "normalized": false,
32
+ "rstrip": false,
33
+ "single_word": false,
34
+ "special": true
35
+ },
36
+ "248048": {
37
+ "content": "<|object_ref_end|>",
38
+ "lstrip": false,
39
+ "normalized": false,
40
+ "rstrip": false,
41
+ "single_word": false,
42
+ "special": true
43
+ },
44
+ "248049": {
45
+ "content": "<|box_start|>",
46
+ "lstrip": false,
47
+ "normalized": false,
48
+ "rstrip": false,
49
+ "single_word": false,
50
+ "special": true
51
+ },
52
+ "248050": {
53
+ "content": "<|box_end|>",
54
+ "lstrip": false,
55
+ "normalized": false,
56
+ "rstrip": false,
57
+ "single_word": false,
58
+ "special": true
59
+ },
60
+ "248051": {
61
+ "content": "<|quad_start|>",
62
+ "lstrip": false,
63
+ "normalized": false,
64
+ "rstrip": false,
65
+ "single_word": false,
66
+ "special": true
67
+ },
68
+ "248052": {
69
+ "content": "<|quad_end|>",
70
+ "lstrip": false,
71
+ "normalized": false,
72
+ "rstrip": false,
73
+ "single_word": false,
74
+ "special": true
75
+ },
76
+ "248053": {
77
+ "content": "<|vision_start|>",
78
+ "lstrip": false,
79
+ "normalized": false,
80
+ "rstrip": false,
81
+ "single_word": false,
82
+ "special": true
83
+ },
84
+ "248054": {
85
+ "content": "<|vision_end|>",
86
+ "lstrip": false,
87
+ "normalized": false,
88
+ "rstrip": false,
89
+ "single_word": false,
90
+ "special": true
91
+ },
92
+ "248055": {
93
+ "content": "<|vision_pad|>",
94
+ "lstrip": false,
95
+ "normalized": false,
96
+ "rstrip": false,
97
+ "single_word": false,
98
+ "special": true
99
+ },
100
+ "248056": {
101
+ "content": "<|image_pad|>",
102
+ "lstrip": false,
103
+ "normalized": false,
104
+ "rstrip": false,
105
+ "single_word": false,
106
+ "special": true
107
+ },
108
+ "248057": {
109
+ "content": "<|video_pad|>",
110
+ "lstrip": false,
111
+ "normalized": false,
112
+ "rstrip": false,
113
+ "single_word": false,
114
+ "special": true
115
+ },
116
+ "248058": {
117
+ "content": "<tool_call>",
118
+ "lstrip": false,
119
+ "normalized": false,
120
+ "rstrip": false,
121
+ "single_word": false,
122
+ "special": false
123
+ },
124
+ "248059": {
125
+ "content": "</tool_call>",
126
+ "lstrip": false,
127
+ "normalized": false,
128
+ "rstrip": false,
129
+ "single_word": false,
130
+ "special": false
131
+ },
132
+ "248060": {
133
+ "content": "<|fim_prefix|>",
134
+ "lstrip": false,
135
+ "normalized": false,
136
+ "rstrip": false,
137
+ "single_word": false,
138
+ "special": false
139
+ },
140
+ "248061": {
141
+ "content": "<|fim_middle|>",
142
+ "lstrip": false,
143
+ "normalized": false,
144
+ "rstrip": false,
145
+ "single_word": false,
146
+ "special": false
147
+ },
148
+ "248062": {
149
+ "content": "<|fim_suffix|>",
150
+ "lstrip": false,
151
+ "normalized": false,
152
+ "rstrip": false,
153
+ "single_word": false,
154
+ "special": false
155
+ },
156
+ "248063": {
157
+ "content": "<|fim_pad|>",
158
+ "lstrip": false,
159
+ "normalized": false,
160
+ "rstrip": false,
161
+ "single_word": false,
162
+ "special": false
163
+ },
164
+ "248064": {
165
+ "content": "<|repo_name|>",
166
+ "lstrip": false,
167
+ "normalized": false,
168
+ "rstrip": false,
169
+ "single_word": false,
170
+ "special": false
171
+ },
172
+ "248065": {
173
+ "content": "<|file_sep|>",
174
+ "lstrip": false,
175
+ "normalized": false,
176
+ "rstrip": false,
177
+ "single_word": false,
178
+ "special": false
179
+ },
180
+ "248066": {
181
+ "content": "<tool_response>",
182
+ "lstrip": false,
183
+ "normalized": false,
184
+ "rstrip": false,
185
+ "single_word": false,
186
+ "special": false
187
+ },
188
+ "248067": {
189
+ "content": "</tool_response>",
190
+ "lstrip": false,
191
+ "normalized": false,
192
+ "rstrip": false,
193
+ "single_word": false,
194
+ "special": false
195
+ },
196
+ "248068": {
197
+ "content": "<think>",
198
+ "lstrip": false,
199
+ "normalized": false,
200
+ "rstrip": false,
201
+ "single_word": false,
202
+ "special": false
203
+ },
204
+ "248069": {
205
+ "content": "</think>",
206
+ "lstrip": false,
207
+ "normalized": false,
208
+ "rstrip": false,
209
+ "single_word": false,
210
+ "special": false
211
+ },
212
+ "248070": {
213
+ "content": "<|audio_start|>",
214
+ "lstrip": false,
215
+ "normalized": false,
216
+ "rstrip": false,
217
+ "single_word": false,
218
+ "special": true
219
+ },
220
+ "248071": {
221
+ "content": "<|audio_end|>",
222
+ "lstrip": false,
223
+ "normalized": false,
224
+ "rstrip": false,
225
+ "single_word": false,
226
+ "special": true
227
+ },
228
+ "248072": {
229
+ "content": "<tts_pad>",
230
+ "lstrip": false,
231
+ "normalized": false,
232
+ "rstrip": false,
233
+ "single_word": false,
234
+ "special": true
235
+ },
236
+ "248073": {
237
+ "content": "<tts_text_bos>",
238
+ "lstrip": false,
239
+ "normalized": false,
240
+ "rstrip": false,
241
+ "single_word": false,
242
+ "special": true
243
+ },
244
+ "248074": {
245
+ "content": "<tts_text_eod>",
246
+ "lstrip": false,
247
+ "normalized": false,
248
+ "rstrip": false,
249
+ "single_word": false,
250
+ "special": true
251
+ },
252
+ "248075": {
253
+ "content": "<tts_text_bos_single>",
254
+ "lstrip": false,
255
+ "normalized": false,
256
+ "rstrip": false,
257
+ "single_word": false,
258
+ "special": true
259
+ },
260
+ "248076": {
261
+ "content": "<|audio_pad|>",
262
+ "lstrip": false,
263
+ "normalized": false,
264
+ "rstrip": false,
265
+ "single_word": false,
266
+ "special": true
267
+ }
268
+ },
269
+ "additional_special_tokens": [
270
+ "<|im_start|>",
271
+ "<|im_end|>",
272
+ "<|object_ref_start|>",
273
+ "<|object_ref_end|>",
274
+ "<|box_start|>",
275
+ "<|box_end|>",
276
+ "<|quad_start|>",
277
+ "<|quad_end|>",
278
+ "<|vision_start|>",
279
+ "<|vision_end|>",
280
+ "<|vision_pad|>",
281
+ "<|image_pad|>",
282
+ "<|video_pad|>"
283
+ ],
284
+ "bos_token": null,
285
+ "chat_template": "{%- set image_count = namespace(value=0) %}\n{%- set video_count = namespace(value=0) %}\n{%- macro render_content(content, do_vision_count, is_system_content=false) %}\n {%- if content is string %}\n {{- content }}\n {%- elif content is iterable and content is not mapping %}\n {%- for item in content %}\n {%- if 'image' in item or 'image_url' in item or item.type == 'image' %}\n {%- if is_system_content %}\n {{- raise_exception('System message cannot contain images.') }}\n {%- endif %}\n {%- if do_vision_count %}\n {%- set image_count.value = image_count.value + 1 %}\n {%- endif %}\n {%- if add_vision_id %}\n {{- 'Picture ' ~ image_count.value ~ ': ' }}\n {%- endif %}\n {{- '<|vision_start|><|image_pad|><|vision_end|>' }}\n {%- elif 'video' in item or item.type == 'video' %}\n {%- if is_system_content %}\n {{- raise_exception('System message cannot contain videos.') }}\n {%- endif %}\n {%- if do_vision_count %}\n {%- set video_count.value = video_count.value + 1 %}\n {%- endif %}\n {%- if add_vision_id %}\n {{- 'Video ' ~ video_count.value ~ ': ' }}\n {%- endif %}\n {{- '<|vision_start|><|video_pad|><|vision_end|>' }}\n {%- elif 'text' in item %}\n {{- item.text }}\n {%- else %}\n {{- raise_exception('Unexpected item type in content.') }}\n {%- endif %}\n {%- endfor %}\n {%- elif content is none or content is undefined %}\n {{- '' }}\n {%- else %}\n {{- raise_exception('Unexpected content type.') }}\n {%- endif %}\n{%- endmacro %}\n{%- if not messages %}\n {{- raise_exception('No messages provided.') }}\n{%- endif %}\n{%- if tools and tools is iterable and tools is not mapping %}\n {{- '<|im_start|>system\\n' }}\n {{- \"# Tools\\n\\nYou have access to the following functions:\\n\\n<tools>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\" }}\n {{- '\\n\\nIf you choose to call a function ONLY reply in the following format with NO suffix:\\n\\n<tool_call>\\n<function=example_function_name>\\n<parameter=example_parameter_1>\\nvalue_1\\n</parameter>\\n<parameter=example_parameter_2>\\nThis is the value for the second parameter\\nthat can span\\nmultiple lines\\n</parameter>\\n</function>\\n</tool_call>\\n\\n<IMPORTANT>\\nReminder:\\n- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags\\n- Required parameters MUST be specified\\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\\n</IMPORTANT>' }}\n {%- if messages[0].role == 'system' %}\n {%- set content = render_content(messages[0].content, false, true)|trim %}\n {%- if content %}\n {{- '\\n\\n' + content }}\n {%- endif %}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n{%- else %}\n {%- if messages[0].role == 'system' %}\n {%- set content = render_content(messages[0].content, false, true)|trim %}\n {{- '<|im_start|>system\\n' + content + '<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}\n{%- for message in messages[::-1] %}\n {%- set index = (messages|length - 1) - loop.index0 %}\n {%- if ns.multi_step_tool and message.role == \"user\" %}\n {%- set content = render_content(message.content, false)|trim %}\n {%- if not(content.startswith('<tool_response>') and content.endswith('</tool_response>')) %}\n {%- set ns.multi_step_tool = false %}\n {%- set ns.last_query_index = index %}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if ns.multi_step_tool %}\n {{- raise_exception('No user query found in messages.') }}\n{%- endif %}\n{%- for message in messages %}\n {%- set content = render_content(message.content, true)|trim %}\n {%- if message.role == \"system\" %}\n {%- if not loop.first %}\n {{- raise_exception('System message must be at the beginning.') }}\n {%- endif %}\n {%- elif message.role == \"user\" %}\n {{- '<|im_start|>' + message.role + '\\n' + content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {%- set reasoning_content = '' %}\n {%- if message.reasoning_content is string %}\n {%- set reasoning_content = message.reasoning_content %}\n {%- else %}\n {%- if '</think>' in content %}\n {%- set reasoning_content = content.split('</think>')[0].rstrip('\\n').split('<think>')[-1].lstrip('\\n') %}\n {%- set content = content.split('</think>')[-1].lstrip('\\n') %}\n {%- endif %}\n {%- endif %}\n {%- set reasoning_content = reasoning_content|trim %}\n {%- if loop.index0 > ns.last_query_index %}\n {{- '<|im_start|>' + message.role + '\\n<think>\\n' + reasoning_content + '\\n</think>\\n\\n' + content }}\n {%- else %}\n {{- '<|im_start|>' + message.role + '\\n' + content }}\n {%- endif %}\n {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %}\n {%- for tool_call in message.tool_calls %}\n {%- if tool_call.function is defined %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {%- if loop.first %}\n {%- if content|trim %}\n {{- '\\n\\n<tool_call>\\n<function=' + tool_call.name + '>\\n' }}\n {%- else %}\n {{- '<tool_call>\\n<function=' + tool_call.name + '>\\n' }}\n {%- endif %}\n {%- else %}\n {{- '\\n<tool_call>\\n<function=' + tool_call.name + '>\\n' }}\n {%- endif %}\n {%- if tool_call.arguments is defined %}\n {%- for args_name, args_value in tool_call.arguments|items %}\n {{- '<parameter=' + args_name + '>\\n' }}\n {%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %}\n {{- args_value }}\n {{- '\\n</parameter>\\n' }}\n {%- endfor %}\n {%- endif %}\n {{- '</function>\\n</tool_call>' }}\n {%- endfor %}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if loop.previtem and loop.previtem.role != \"tool\" %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- content }}\n {{- '\\n</tool_response>' }}\n {%- if not loop.last and loop.nextitem.role != \"tool\" %}\n {{- '<|im_end|>\\n' }}\n {%- elif loop.last %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- else %}\n {{- raise_exception('Unexpected message role.') }}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n {%- if enable_thinking is defined and enable_thinking is true %}\n {{- '<think>\\n' }}\n {%- else %}\n {{- '<think>\\n\\n</think>\\n\\n' }}\n {%- endif %}\n{%- endif %}",
286
+ "clean_up_tokenization_spaces": false,
287
+ "eos_token": "<|endoftext|>",
288
+ "errors": "replace",
289
+ "model_max_length": 262144,
290
+ "pad_token": "<|endoftext|>",
291
+ "split_special_tokens": false,
292
+ "tokenizer_class": "Qwen2Tokenizer",
293
+ "unk_token": null,
294
+ "add_bos_token": false,
295
+ "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+",
296
+ "extra_special_tokens": {
297
+ "audio_bos_token": "<|audio_start|>",
298
+ "audio_eos_token": "<|audio_end|>",
299
+ "audio_token": "<|audio_pad|>",
300
+ "image_token": "<|image_pad|>",
301
+ "video_token": "<|video_pad|>",
302
+ "vision_bos_token": "<|vision_start|>",
303
+ "vision_eos_token": "<|vision_end|>"
304
+ }
305
+ }
Index-Translate-2B/video_preprocessor_config.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "size": {
3
+ "longest_edge": 234881024,
4
+ "shortest_edge": 4096
5
+ },
6
+ "patch_size": 16,
7
+ "temporal_patch_size": 2,
8
+ "merge_size": 2,
9
+ "image_mean": [
10
+ 0.5,
11
+ 0.5,
12
+ 0.5
13
+ ],
14
+ "image_std": [
15
+ 0.5,
16
+ 0.5,
17
+ 0.5
18
+ ],
19
+ "processor_class": "Qwen3VLProcessor",
20
+ "video_processor_type": "Qwen3VLVideoProcessor"
21
+ }
Index-Translate-2B/vocab.json ADDED
The diff for this file is too large to render. See raw diff