qwen3.5-2b-ml-paper-translate
QLoRA fine-tune of Qwen/Qwen3.5-2B for deep learning, robotics, language models, and
vision-language-action research text. Training used assistant-only loss and a locally generated,
research-grounded synthetic corpus.
This directory contains the LoRA weights merged into the full Hugging Face base model. It is the production model, not a smoke-test artifact.
Training
- Training rows: 98127
- Per-device batch size: 4
- Gradient accumulation: 4
- Effective batch size: 16
- Sequence length: 2048
- Epochs: 1.0
- Learning rate: 0.0001
- QLoRA rank/alpha/dropout: 32/64/0.05
- Training hardware: NVIDIA GeForce RTX 4090 24 GB
- Objective: English-to-Japanese causal language modeling with assistant-only loss
- Target domains: deep learning, robotics, language models, and vision-language-action models
- Grounding: recent arXiv metadata, abstracts, and available ar5iv excerpts
Dataset
{
"accepted": 100000,
"rejected": 24871,
"splits": {
"train": 98127,
"valid": 957,
"test": 916
},
"domains": {
"deep_learning": 25123,
"language_models": 24548,
"robotics": 25686,
"vision_language_action": 24643
},
"complete": true
}
The training dataset, references, and per-example predictions are not distributed from this repository. Only aggregate evaluation results are published.
Evaluation
chrF++ is reported on a 0–100 scale. Preservation and terminology values are fractions from 0–1.
| Run | Rows | chrF++ | Numeric/symbol preservation | Math preservation | Terminology accuracy |
|---|---|---|---|---|---|
| base-valid | 957 | 45.47 | 0.89 | 0.85 | 0.35 |
| tuned-valid | 957 | 66.56 | 0.92 | 1.00 | 0.81 |
| base-test | 916 | 44.08 | 0.88 | 0.86 | 0.38 |
| tuned-test | 916 | 65.92 | 0.91 | 1.00 | 0.84 |
{
"base-valid.metrics": {
"count": 957,
"chrf_pp": 45.468870997399854,
"numeric_symbol_preservation": 0.8938547486033519,
"numeric_symbol_examples": 716,
"math_preservation": 0.8472222222222222,
"math_examples": 72,
"terminology_recall": 0.34812286689419797,
"terminology_accuracy": 0.34812286689419797,
"terminology_terms": 293,
"no_extraneous_prefix": 1.0
},
"base-test.metrics": {
"count": 916,
"chrf_pp": 44.07591737903462,
"numeric_symbol_preservation": 0.8801213960546282,
"numeric_symbol_examples": 659,
"math_preservation": 0.863013698630137,
"math_examples": 73,
"terminology_recall": 0.3767441860465116,
"terminology_accuracy": 0.3767441860465116,
"terminology_terms": 215,
"no_extraneous_prefix": 1.0
},
"tuned-valid.metrics": {
"count": 957,
"chrf_pp": 66.5621385606034,
"numeric_symbol_preservation": 0.9175977653631285,
"numeric_symbol_examples": 716,
"math_preservation": 1.0,
"math_examples": 72,
"terminology_recall": 0.8088737201365188,
"terminology_accuracy": 0.8088737201365188,
"terminology_terms": 293,
"no_extraneous_prefix": 1.0
},
"tuned-test.metrics": {
"count": 916,
"chrf_pp": 65.9248842697133,
"numeric_symbol_preservation": 0.9059180576631259,
"numeric_symbol_examples": 659,
"math_preservation": 1.0,
"math_examples": 73,
"terminology_recall": 0.8372093023255814,
"terminology_accuracy": 0.8372093023255814,
"terminology_terms": 215,
"no_extraneous_prefix": 1.0
},
"gpu-stability": {
"training_completed": true,
"training_rows": 98127,
"per_device_train_batch_size": 4,
"samples": 2633,
"first_sample": "2026/09/11 15:21:25.431",
"last_sample": "2026/09/11 19:02:39.979",
"peak_memory_used_mib": 19785.0,
"minimum_memory_free_mib": 4308.0,
"peak_gpu_util_percent": 100.0,
"peak_temperature_c": 74.0,
"peak_power_w": 360.9
}
}
Local deployment
Convert this merged model to MLX 4-bit on Apple Silicon with qwen-translate export-mlx, then
install the Native Messaging Host with scripts/install_macos.sh. The companion Manifest V3
Chrome extension translates selected text locally and restores ar5iv MathML after generation.
Transformers
import torch
from transformers import AutoModelForImageTextToText, AutoTokenizer
model_id = "Teluteru/qwen3.5-2b-ml-paper-translate"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForImageTextToText.from_pretrained(
model_id, dtype=torch.bfloat16, device_map="auto"
)
messages = [
{
"role": "system",
"content": (
"Translate technical English into natural Japanese. Preserve equations, "
"numbers, units, identifiers, and formatting. Return only the translation."
),
},
{"role": "user", "content": "The VLA policy predicts robot actions from images."},
]
prompt = tokenizer.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True, enable_thinking=False
)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.inference_mode():
generated = model.generate(**inputs, max_new_tokens=512, do_sample=False)
print(tokenizer.decode(generated[0, inputs.input_ids.shape[1]:], skip_special_tokens=True))
MLX 4-bit on Apple Silicon
hf download Teluteru/qwen3.5-2b-ml-paper-translate --local-dir model-hf
python -m mlx_lm convert --hf-path model-hf --mlx-path model-mlx-4bit -q --q-bits 4 --q-group-size 64
Use enable_thinking=False; fine-tuning used the non-thinking chat-template prefix. The companion
project defaults to the 2B model and can switch between installed 2B and 4B MLX models.
Limitations
- The corpus and references are synthetic and can contain unnatural wording or factual errors.
- Automatic preservation scores are not perfect; callers should retain deterministic MathML placeholder checks and verify numbers for consequential use.
- Qualitative review found that
unsupervised/supervisedmay occasionally be rendered as the understandable but unnatural非監督/監督;教師なし/教師ありis preferred. - This model is not validated for safety-critical robot control or languages other than English to Japanese.
The data and automatic metrics may contain errors. Review translations before safety-critical use. MathML on ar5iv pages is preserved by the companion Chrome extension outside the language model.