docs: align model card with technical report and inference defaults
Browse files
README.md
CHANGED
|
@@ -7,89 +7,226 @@ tags:
|
|
| 7 |
|
| 8 |
# Index-Translate-2B
|
| 9 |
|
| 10 |
-
[
|
| 11 |
-
[](https://github.com/bilibili/Index-Translate)
|
| 12 |
-
[](https://github.com/bilibili/Index-Translate/blob/main/LICENSE)
|
| 13 |
|
| 14 |
-
**Index-Translate-2B** is the 2B-parameter multilingual text
|
| 15 |
|
| 16 |
-
|
| 17 |
-
>
|
| 18 |
-
> 💻 Code, quickstarts, browser extension & video-dubbing pipeline: [github.com/bilibili/Index-Translate](https://github.com/bilibili/Index-Translate)
|
| 19 |
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
-
|
| 23 |
-
- **Training recipe**: multilingual mid-training (general + monolingual + parallel + pivot-organized data) → specialist SFT (general / instruction / meme experts) → RL with judged rewards (GRPO; XCOMET-XXL + adequacy gates for general translation, Rubric-as-Reward for instruction following) under RIVAL adversarial judge supervision → **parameter interpolation** (model soup, general : instruction : meme = 0.8 : 0.1 : 0.1) → targeted **multi-teacher on-policy distillation (MOPD)** for remaining weaknesses.
|
| 24 |
-
- **262,144-token context window**, greedy decoding recommended.
|
| 25 |
-
- Outperforms the same-tier **Hy-MT2-1.8B** on every metric reported for both models (Table 4 of the report).
|
| 26 |
-
- Larger sibling: [IndexTeam/Index-Translate-9B](https://huggingface.co/IndexTeam/Index-Translate-9B); a **35B-A3B** variant is reported as a preview in the technical report.
|
| 27 |
|
| 28 |
-
##
|
| 29 |
|
| 30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
|
| 32 |
| Model | FLORES COMET-22 | WMT24++ COMET-22 | WMT26 Judge | instTrans Quality | instTrans IFscore | IFMTBench XCOMET-XXL | IFMTBench IFscore | Vertical mean | MEME |
|
| 33 |
-
|---|---|---|---|---|---|---|---|---|---|
|
| 34 |
-
|
|
|
|
|
|
|
|
| 35 |
| Hy-MT2-1.8B | 0.8522 | 0.8401 | 49.35 | 0.3181 | 0.4932 | 0.7493 | 0.7161 | 0.8314 | 0.3643 |
|
| 36 |
-
| Qwen3.5-2B (base) | 0.6983 | 0.6933 | 32.11 | 0.0999 | 0.2431 | 0.6197 | 0.3836 | 0.7557 | 0.2062 |
|
| 37 |
| Hy-MT2-7B | 0.8747 | 0.8593 | 60.51 | 0.5143 | 0.6079 | 0.8049 | 0.8741 | 0.8335 | 0.5139 |
|
| 38 |
-
| Hy-MT2-30B-A3B |
|
| 39 |
-
| TranslateGemma-12B | 0.8732 | 0.8524 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
|
| 41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
-
|
| 44 |
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
|
| 48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
|
| 50 |
-
|
| 51 |
|
| 52 |
-
|
| 53 |
|
| 54 |
```bash
|
| 55 |
-
|
|
|
|
|
|
|
|
|
|
| 56 |
```
|
| 57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
```python
|
|
|
|
| 59 |
from openai import OpenAI
|
| 60 |
|
| 61 |
-
client = OpenAI(
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
temperature=0,
|
|
|
|
|
|
|
| 66 |
)
|
| 67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
```
|
| 69 |
|
| 70 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
|
| 72 |
## Model family
|
| 73 |
|
| 74 |
-
|
|
| 75 |
|---|---|---|
|
| 76 |
-
|
|
| 77 |
-
| Index-Echo S2TT | [2B](https://huggingface.co/IndexTeam/Index-Echo-S2TT-2B) / [9B](https://huggingface.co/IndexTeam/Index-Echo-S2TT-9B) | Speech
|
| 78 |
-
| Index-Echo S2ST | [2B](https://huggingface.co/IndexTeam/Index-Echo-S2ST-2B) / [9B](https://huggingface.co/IndexTeam/Index-Echo-S2ST-9B) | Speech
|
| 79 |
-
| Index-Homura | [2B](https://huggingface.co/IndexTeam/Index-Homura-2B) / [9B](https://huggingface.co/IndexTeam/Index-Homura-9B) |
|
| 80 |
-
| Index-NativeLong
|
|
|
|
|
|
|
| 81 |
|
| 82 |
## Citation
|
| 83 |
|
| 84 |
```bibtex
|
| 85 |
@techreport{indextranslate2026,
|
|
|
|
|
|
|
|
|
|
| 86 |
title={Index-Translate: A Multilingual Translation Model Family --- Text, Speech, Controlled Dubbing, and Long-Document Translation},
|
| 87 |
-
|
| 88 |
year={2026},
|
| 89 |
-
month={September}
|
|
|
|
| 90 |
}
|
| 91 |
```
|
| 92 |
|
| 93 |
## License
|
| 94 |
|
| 95 |
-
Apache-2.0.
|
|
|
|
| 7 |
|
| 8 |
# Index-Translate-2B
|
| 9 |
|
| 10 |
+
[Online demo](https://index-translate.bilibili.com/) · [GitHub](https://github.com/bilibili/Index-Translate) · [Technical report](https://github.com/bilibili/Index-Translate/blob/main/docs/Index_Translate_Series_Technical_Report.pdf) · [Hugging Face collection](https://huggingface.co/collections/IndexTeam/index-translate) · [ModelScope collection](https://www.modelscope.cn/collections/IndexTeam/Index-Translate)
|
|
|
|
|
|
|
| 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 |
+
### Main translation benchmarks
|
| 40 |
+
|
| 41 |
+
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**.
|
| 42 |
|
| 43 |
| Model | FLORES COMET-22 | WMT24++ COMET-22 | WMT26 Judge | instTrans Quality | instTrans IFscore | IFMTBench XCOMET-XXL | IFMTBench IFscore | Vertical mean | MEME |
|
| 44 |
+
|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|
|
| 45 |
+
| Index-Translate-35B-A3B (preview) | 0.8794 | 0.8586 | 76.76 | 0.6901 | 0.8336 | 0.7926 | 0.8991 | 0.8438 | 0.7405 |
|
| 46 |
+
| Index-Translate-9B | 0.8789 | 0.8601 | 75.35 | 0.6771 | 0.8209 | 0.7957 | 0.8760 | 0.8451 | 0.7387 |
|
| 47 |
+
| **Index-Translate-2B** | 0.8655 | 0.8489 | 60.26 | 0.5391 | 0.7569 | 0.7712 | 0.7584 | 0.8377 | 0.6443 |
|
| 48 |
| Hy-MT2-1.8B | 0.8522 | 0.8401 | 49.35 | 0.3181 | 0.4932 | 0.7493 | 0.7161 | 0.8314 | 0.3643 |
|
|
|
|
| 49 |
| Hy-MT2-7B | 0.8747 | 0.8593 | 60.51 | 0.5143 | 0.6079 | 0.8049 | 0.8741 | 0.8335 | 0.5139 |
|
| 50 |
+
| Hy-MT2-30B-A3B | 0.8787 | 0.8624 | 66.81 | 0.5725 | 0.6415 | 0.8177 | 0.9029 | 0.8459 | 0.5812 |
|
| 51 |
+
| TranslateGemma-12B | 0.8732 | 0.8524 | 71.19 | 0.4515 | 0.3068 | 0.8023 | 0.2892 | 0.8347 | 0.4281 |
|
| 52 |
+
| North-Small-Translate (218B-A25B) | 0.8784 | 0.8578 | 68.37 | 0.5697 | 0.5294 | 0.7657 | 0.8635 | 0.8357 | 0.6836 |
|
| 53 |
+
| Qwen3.5-2B (base) | 0.6983 | 0.6933 | 32.11 | 0.0999 | 0.2431 | 0.6197 | 0.3836 | 0.7557 | 0.2062 |
|
| 54 |
+
| Qwen3.5-9B (base) | 0.8316 | 0.8073 | 60.31 | 0.2467 | 0.0609 | 0.7341 | 0.5980 | 0.8199 | 0.5728 |
|
| 55 |
+
| Qwen3.5-35B-A3B | 0.8570 | 0.8290 | 71.33 | 0.3690 | 0.5204 | 0.7589 | 0.7822 | 0.8267 | 0.6447 |
|
| 56 |
+
| DeepSeek-V4.1-Flash | 0.8762 | 0.8510 | 83.55 | 0.6068 | 0.6374 | 0.7817 | 0.9090 | 0.8432 | 0.7424 |
|
| 57 |
+
| GPT-5.6-Sol | 0.8650 | 0.8469 | 89.10 | 0.6902 | 0.7624 | 0.7946 | 0.9367 | 0.8311 | 0.7194 |
|
| 58 |
+
| Gemini 3.5 Flash Lite | 0.8750 | 0.8497 | 79.52 | 0.6068 | 0.6374 | 0.7764 | 0.8854 | 0.8131 | 0.7034 |
|
| 59 |
+
|
| 60 |
+
### Low-resource translation and instruction following
|
| 61 |
+
|
| 62 |
+
**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.
|
| 63 |
+
|
| 64 |
+
| 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 ↓ |
|
| 65 |
+
|---|---:|---:|---:|---:|---:|---:|
|
| 66 |
+
| Index-Translate-35B-A3B (preview) | 0.8168 | 0.7164 | 2.4% | 0.5151 | 0.7715 | 4.05% |
|
| 67 |
+
| Index-Translate-9B | 0.7992 | 0.6805 | 4.0% | 0.5222 | 0.7725 | 3.47% |
|
| 68 |
+
| **Index-Translate-2B** | 0.7377 | 0.4817 | 4.2% | 0.3050 | 0.6586 | 3.97% |
|
| 69 |
+
| Hy-MT2-1.8B | 0.3163 | 0.2014 | 54.2% | 0.0412 | 0.1313 | 65.27% |
|
| 70 |
+
| Hy-MT2-7B | 0.4626 | 0.3334 | 35.7% | 0.1121 | 0.2405 | 45.40% |
|
| 71 |
+
| Hy-MT2-30B-A3B | 0.6746 | 0.5359 | 14.5% | 0.2246 | 0.4449 | 15.47% |
|
| 72 |
+
| TranslateGemma-12B | 0.8021 | 0.6217 | 1.7% | 0.2412 | 0.2682 | 5.37% |
|
| 73 |
+
| North-Small-Translate (218B-A25B) | 0.6855 | 0.4919 | 13.2% | 0.2436 | 0.2902 | 26.89% |
|
| 74 |
+
| Qwen3.5-2B (base) | 0.3716 | 0.1852 | 39.1% | 0.0069 | 0.0549 | 73.54% |
|
| 75 |
+
| Qwen3.5-9B (base) | 0.6774 | 0.4502 | 11.2% | 0.1318 | 0.3532 | 18.51% |
|
| 76 |
+
| Qwen3.5-35B-A3B | 0.7854 | 0.6257 | 3.5% | 0.2874 | 0.4458 | 11.60% |
|
| 77 |
+
| DeepSeek-V4.1-Flash | 0.8333 | 0.7297 | 1.3% | 0.4793 | 0.5854 | 5.73% |
|
| 78 |
+
| GPT-5.6-Sol | 0.7669 | 0.6918 | 10.4% | 0.5757 | 0.6866 | 7.73% |
|
| 79 |
+
| Gemini 3.5 Flash Lite | 0.8122 | 0.6995 | 3.3% | 0.3927 | 0.5584 | 12.18% |
|
| 80 |
+
|
| 81 |
+
### Domain translation
|
| 82 |
+
|
| 83 |
+
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.
|
| 84 |
|
| 85 |
+
| Model | OPUS-Books | Biomedical | MTNT | MuST-Cinema | GuoFeng |
|
| 86 |
+
|---|---:|---:|---:|---:|---:|
|
| 87 |
+
| Index-Translate-35B-A3B (preview) | 0.8013 | 0.8681 | 0.8244 | 0.8962 | 0.8291 |
|
| 88 |
+
| Index-Translate-9B | 0.8010 | 0.8674 | 0.8246 | 0.8979 | 0.8345 |
|
| 89 |
+
| **Index-Translate-2B** | 0.7845 | 0.8635 | 0.8132 | 0.8930 | 0.8345 |
|
| 90 |
|
| 91 |
+
### General capabilities
|
| 92 |
|
| 93 |
+
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.
|
| 94 |
+
|
| 95 |
+
| Model | C-Eval | GPQA-Diamond | INCLUDE | MMMLU |
|
| 96 |
+
|---|---:|---:|---:|---:|
|
| 97 |
+
| Index-Translate-35B-A3B (preview) | 77.6 | 49.1 | 68.8 | 71.9 |
|
| 98 |
+
| Index-Translate-9B | 69.6 | 36.3 | 63.1 | 66.6 |
|
| 99 |
+
| **Index-Translate-2B** | 42.6 | 27.4 | 39.1 | 42.7 |
|
| 100 |
+
|
| 101 |
+
### Evaluation protocol
|
| 102 |
+
|
| 103 |
+
- The main FLORES evaluation uses **126,000 inputs**, 420 directions among 21 languages; WMT24++ uses 6,000 inputs from English into 20 languages.
|
| 104 |
+
- 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.
|
| 105 |
+
- 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.
|
| 106 |
+
- 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).
|
| 107 |
+
|
| 108 |
+
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://github.com/bilibili/Index-Translate/blob/main/docs/Index_Translate_Series_Technical_Report.pdf). The report describes instTrans and MEME; benchmark release plans are tracked in the [GitHub TODO](https://github.com/bilibili/Index-Translate#todo).
|
| 109 |
+
|
| 110 |
+
## Inference
|
| 111 |
+
|
| 112 |
+
### Default settings
|
| 113 |
+
|
| 114 |
+
These settings match the released GitHub text client and apply across Index-Translate sizes:
|
| 115 |
+
|
| 116 |
+
| Setting | Default |
|
| 117 |
+
|---|---|
|
| 118 |
+
| Decoding | Greedy, **`temperature=0`** |
|
| 119 |
+
| Thinking | Disabled: `enable_thinking=False` |
|
| 120 |
+
| Output budget | `max_tokens=1024` |
|
| 121 |
+
| `top_p`, `top_k`, repetition penalties | Not explicitly set by the client; use inference-server defaults |
|
| 122 |
+
|
| 123 |
+
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.
|
| 124 |
+
|
| 125 |
+
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.
|
| 126 |
|
| 127 |
+
### Serve with vLLM
|
| 128 |
|
| 129 |
+
Use a CUDA environment and a vLLM build with Qwen3.5 support. Start the server in one terminal:
|
| 130 |
|
| 131 |
```bash
|
| 132 |
+
pip install -U vllm
|
| 133 |
+
vllm serve IndexTeam/Index-Translate-2B \
|
| 134 |
+
--served-model-name IndexTeam/Index-Translate-2B \
|
| 135 |
+
--host 127.0.0.1 --port 8000 --max-model-len 32768
|
| 136 |
```
|
| 137 |
|
| 138 |
+
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.
|
| 139 |
+
|
| 140 |
+
### OpenAI-compatible Python client
|
| 141 |
+
|
| 142 |
+
Install the client dependencies in another terminal:
|
| 143 |
+
|
| 144 |
+
```bash
|
| 145 |
+
pip install openai httpx
|
| 146 |
+
```
|
| 147 |
+
|
| 148 |
+
This example uses the training-aligned Chinese translation prompt and disables thinking explicitly:
|
| 149 |
+
|
| 150 |
```python
|
| 151 |
+
import httpx
|
| 152 |
from openai import OpenAI
|
| 153 |
|
| 154 |
+
client = OpenAI(
|
| 155 |
+
base_url="http://127.0.0.1:8000/v1",
|
| 156 |
+
api_key="EMPTY",
|
| 157 |
+
http_client=httpx.Client(trust_env=False),
|
| 158 |
+
)
|
| 159 |
+
response = client.chat.completions.create(
|
| 160 |
+
model="IndexTeam/Index-Translate-2B",
|
| 161 |
+
messages=[{
|
| 162 |
+
"role": "user",
|
| 163 |
+
"content": "请将以下文本翻译为英语,直接输出翻译结果,不要进行任何解释。\n\n你好,世界!",
|
| 164 |
+
}],
|
| 165 |
temperature=0,
|
| 166 |
+
max_tokens=1024,
|
| 167 |
+
extra_body={"chat_template_kwargs": {"enable_thinking": False}},
|
| 168 |
)
|
| 169 |
+
text = response.choices[0].message.content or ""
|
| 170 |
+
# Match the repository client's fallback if a thinking block is emitted.
|
| 171 |
+
if "</think>" in text:
|
| 172 |
+
text = text.split("</think>", 1)[1]
|
| 173 |
+
print(text.strip().removeprefix("<think>").strip())
|
| 174 |
```
|
| 175 |
|
| 176 |
+
### Repository client
|
| 177 |
+
|
| 178 |
+
After starting the server, use the public client with this model ID:
|
| 179 |
+
|
| 180 |
+
```bash
|
| 181 |
+
git clone https://github.com/bilibili/Index-Translate.git
|
| 182 |
+
cd Index-Translate
|
| 183 |
+
pip install -r inference/llm/requirements.txt
|
| 184 |
+
python inference/llm/translate.py \
|
| 185 |
+
"你好,世界。今天天气不错。" --target en \
|
| 186 |
+
--model IndexTeam/Index-Translate-2B
|
| 187 |
+
```
|
| 188 |
+
|
| 189 |
+
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`.
|
| 190 |
+
|
| 191 |
+
## Examples and practical limits
|
| 192 |
+
|
| 193 |
+
The following recorded Index-Translate-2B case from the official demo illustrates a community expression:
|
| 194 |
+
|
| 195 |
+
| Source and context | Recorded English translation |
|
| 196 |
+
|---|---|
|
| 197 |
+
| 狒瘾犯了就去打 — “狒瘾” refers to the urge to play Final Fantasy XIV | Go play when my FFXIV addiction kicks in. |
|
| 198 |
+
|
| 199 |
+
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.
|
| 200 |
+
|
| 201 |
+
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.
|
| 202 |
|
| 203 |
## Model family
|
| 204 |
|
| 205 |
+
| Family | Models | Task |
|
| 206 |
|---|---|---|
|
| 207 |
+
| 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) | Text translation and translation instructions |
|
| 208 |
+
| 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 |
|
| 209 |
+
| 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 |
|
| 210 |
+
| Index-Homura | [2B](https://huggingface.co/IndexTeam/Index-Homura-2B) / [9B](https://huggingface.co/IndexTeam/Index-Homura-9B) | Translation toward a target syllable count |
|
| 211 |
+
| Index-NativeLong | [2B](https://huggingface.co/IndexTeam/Index-Nailong-2B) / [9B](https://huggingface.co/IndexTeam/Index-Nailong-9B) | Full-document translation |
|
| 212 |
+
|
| 213 |
+
**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.
|
| 214 |
|
| 215 |
## Citation
|
| 216 |
|
| 217 |
```bibtex
|
| 218 |
@techreport{indextranslate2026,
|
| 219 |
+
author={Tianjiao Li and Mengran Yu and Chenyu Shi and Lusheng Zhang and
|
| 220 |
+
Qisi Chen and Yanshan Zhou and Ji Qi and Jingying Liu and
|
| 221 |
+
Yuang Feng and Ziang Cui and Tianxing Yan},
|
| 222 |
title={Index-Translate: A Multilingual Translation Model Family --- Text, Speech, Controlled Dubbing, and Long-Document Translation},
|
| 223 |
+
institution={Index LLM Team},
|
| 224 |
year={2026},
|
| 225 |
+
month={September},
|
| 226 |
+
url={https://github.com/bilibili/Index-Translate/blob/main/docs/Index_Translate_Series_Technical_Report.pdf}
|
| 227 |
}
|
| 228 |
```
|
| 229 |
|
| 230 |
## License
|
| 231 |
|
| 232 |
+
[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).
|