Instructions to use Ismantic/Interpreter-Qwen3-1.7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Ismantic/Interpreter-Qwen3-1.7B with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "translation" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("translation", model="Ismantic/Interpreter-Qwen3-1.7B")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Ismantic/Interpreter-Qwen3-1.7B") model = AutoModelForCausalLM.from_pretrained("Ismantic/Interpreter-Qwen3-1.7B") - Notebooks
- Google Colab
- Kaggle
Interpreter-Qwen3-1.7B
A 1.7B ChineseβEnglish translation model, trained from
Qwen/Qwen3-1.7B-Base via a three-stage
pipeline SFT β CPO β GRPO. On WMT23 it matches the 1.8B reference
HY-MT1.5-1.8B on zhβen COMET with fewer
parameters.
Results (WMT23, COMET = Unbabel/wmt22-comet-da)
Full pipeline progression + ablations. This model is the + GRPO row.
| Stage | zhβen BLEU | zhβen COMET | enβzh BLEU | enβzh COMET |
|---|---|---|---|---|
| Qwen3-1.7B-Base (5-shot) | 21.83 | 0.7950 | 41.15 | 0.8490 |
| + SFT | 19.65 | 0.7863 | 40.74 | 0.8384 |
| + CPO (LoRA) | 19.16 | 0.8017 | 32.69 | 0.8507 |
| + GRPO (this model) | 20.31 | 0.8053 | 33.69 | 0.8540 |
| SFT β GRPO (skip CPO) | 22.85 | 0.8003 | 41.97 | 0.8540 |
| HY-MT1.5-1.8B (reference) | 17.84 | 0.8052 | 31.74 | 0.8669 |
zhβen COMET reaches parity with the 1.8B reference (0.8053 vs 0.8052); BLEU stays above the reference in both directions; enβzh COMET trails the larger reference by ~0.013.
Findings
- COMET climbs monotonically across stages (CPO gives the biggest jump, GRPO refines); final gain over base 5-shot is +0.010 zhβen / +0.005 enβzh COMET.
- Alignment tax shows up in BLEU. The raw base with 5-shot prompting is already a strong baseline; SFT alone underperforms it on all four metrics, and CPO trades ~8.5 enβzh BLEU for its COMET gain (COMET-optimized preference training favors adequacy over lexical overlap).
- The CPO step is optional. A tuned SFT β GRPO run (skipping CPO) matches the full pipeline's COMET while keeping BLEU high (22.85 / 41.97) β beating base 5-shot on all four metrics, the only variant to do so.
Usage
The model uses the ChatML chat format with a fixed translation instruction; <|im_end|>
is the stop token. Greedy decoding is recommended.
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "Ismantic/Interpreter-Qwen3-1.7B"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16).cuda().eval()
def translate(text, direction="zh2en"):
if direction == "zh2en":
instr = f"Translate the following text from Chinese to English.\nChinese: {text}\nEnglish:"
else:
instr = f"Translate the following text from English to Chinese.\nEnglish: {text}\nChinese:"
prompt = f"<|im_start|>user\n{instr}<|im_end|>\n<|im_start|>assistant\n"
ids = tok(prompt, return_tensors="pt").to(model.device)
out = model.generate(**ids, max_new_tokens=256, do_sample=False,
eos_token_id=tok.convert_tokens_to_ids("<|im_end|>"))
return tok.decode(out[0][ids.input_ids.shape[1]:], skip_special_tokens=True).strip()
print(translate("δΊΊε·₯ζΊθ½ζ£ε¨ζ·±ε»ζΉεζ们ηηζ΄»ζΉεΌγ", "zh2en"))
print(translate("The quick brown fox jumps over the lazy dog.", "en2zh"))
vLLM works too (feed the same ChatML prompt, stop=["<|im_end|>"]).
For a quick interactive demo, grab translate.py from this repo and run
python translate.py (needs vllm) β type sentences, zhβen auto-detected.
Training
- Base:
Qwen/Qwen3-1.7B-Base - SFT: full fine-tune on ChatML translation pairs (ALMA + X-ALMA parallel corpora, ~36.8K, WMT22/23 leakage removed), loss on the assistant turn only.
- CPO: LoRA preference training (DPO loss + NLL) on ~44K self-generated preference
pairs (candidates scored by COMET; 25.7% of
chosenreplaced with COMET-better HY-MT1.5-7B translations), then merged. - GRPO: full-parameter RL with a reference-based
wmt22-comet-daCOMET reward plus a 4-gram repetition penalty, using WMT17β21 source prompts.
Prompt template is fixed and identical across training and inference. BLEU tokenization:
zh for enβzh, 13a for zhβen. WMT23 is the primary (uncontaminated) test set; gains
were cross-checked on WMT23/24 + Flores-200 to rule out COMET reward-hacking.
License & attribution
Released under Apache-2.0, following the base model Qwen/Qwen3-1.7B-Base. Training data
derives from the ALMA / X-ALMA parallel & preference corpora and WMT news test sets;
HY-MT1.5-7B was used only to generate a subset of CPO preference targets. Please also
respect the licenses of those upstream models and datasets.
- Downloads last month
- 30