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", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Interpreter-Qwen3-1.7B
A 1.7B ChineseβEnglish translation model, trained SFT β CPO β GRPO.
This model is one half of an A/B pair. The two differ in exactly two things β the base checkpoint and the tokenizer β and share the same data, hyperparameters, losses and rewards. The other half is Ismantic/Interpreter-Qwen3-1.7B-ReTok.
| this model | |
|---|---|
| Tokenizer | Qwen3 native BBPE (151643) |
| Chat format | ChatML |
| Pipeline | SFT β CPO β GRPO |
Results (WMT23)
| direction | BLEU / COMET |
|---|---|
| zhβen | 20.31 / 0.8053 |
| enβzh | 33.69 / 0.8540 |
How to read these numbers
WMT23 is the primary test set β WMT22 is excluded, roughly 17.5% of it leaked
into the ALMA SFT data. COMET is Unbabel/wmt22-comet-da, which is also the
GRPO reward, so gains were cross-checked on WMT23/24 + Flores-200 with BLEU and
chrF to rule out reward hacking.
vLLM greedy decoding is not bit-reproducible; BLEU varies by ~0.1 between runs. Differences at that scale are noise.
Usage
Standard ChatML with a fixed translation instruction; <|im_end|> is the stop
token. Greedy decoding recommended.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("Ismantic/Interpreter-Qwen3-1.7B")
model = AutoModelForCausalLM.from_pretrained("Ismantic/Interpreter-Qwen3-1.7B", torch_dtype=torch.bfloat16).cuda().eval()
instr = ("Translate the following text from Chinese to English.\n"
"Chinese: δΊΊε·₯ζΊθ½ζ£ε¨ζ·±ε»ζΉεζ们ηηζ΄»ζΉεΌγ\nEnglish:")
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|>"))
print(tok.decode(out[0][ids.input_ids.shape[1]:], skip_special_tokens=True).strip())
vLLM works too β 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
Three stages, all on a single RTX 4090:
- SFT β full fine-tune on ~36.8K zhβen pairs (ALMA + X-ALMA human parallel, WMT22/23 leakage removed), loss on the response only.
- CPO β LoRA preference training,
-log Ο(Ξ²Β·(logΟ_w β logΟ_l)) + λ·NLL(y_w), on ~44K self-generated preference pairs (5 candidates sampled from the SFT model, best/worst picked by COMET). LoRA only β full-parameter CPO collapses the model. - GRPO β full-parameter RL. Reward = reference-based
wmt22-comet-daCOMET (1.0) + a 4-gram repetition penalty (0.3), over WMT17β21 source prompts.
Training code, data provenance and the negative results (what was tried and rejected, with numbers) are in the Interpreter repo.
License & attribution
Apache-2.0, following the base model. Training data derives from the ALMA / X-ALMA parallel corpora and WMT news test sets. Please respect the licenses of those upstream models and datasets.
- Downloads last month
- 75