Qwen3.5 Technical English-to-Japanese Translator
QLoRA fine-tune of Qwen/Qwen3.5-4B-Base 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: 2
- Gradient accumulation: 8 (effective batch size 16 on one GPU)
- Sequence length: 2048
- Epochs: 1
- Learning rate: 1e-4
- QLoRA: NF4 4-bit, rank 32, alpha 64, dropout 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
}
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 | 38.80 | 0.89 | 0.99 | 0.43 |
| tuned-valid | 957 | 66.66 | 0.92 | 1.00 | 0.80 |
| base-test | 916 | 37.81 | 0.89 | 0.93 | 0.40 |
| tuned-test | 916 | 66.47 | 0.91 | 1.00 | 0.85 |
{
"base-valid.metrics": {
"count": 957,
"chrf_pp": 38.796437754138005,
"numeric_symbol_preservation": 0.8868715083798883,
"numeric_symbol_examples": 716,
"math_preservation": 0.9861111111111112,
"math_examples": 72,
"terminology_recall": 0.4334470989761092,
"terminology_accuracy": 0.4334470989761092,
"terminology_terms": 293,
"no_extraneous_prefix": 1.0
},
"base-test.metrics": {
"count": 916,
"chrf_pp": 37.8100085836244,
"numeric_symbol_preservation": 0.8861911987860395,
"numeric_symbol_examples": 659,
"math_preservation": 0.9315068493150684,
"math_examples": 73,
"terminology_recall": 0.4,
"terminology_accuracy": 0.4,
"terminology_terms": 215,
"no_extraneous_prefix": 1.0
},
"tuned-valid.metrics": {
"count": 957,
"chrf_pp": 66.65652158010008,
"numeric_symbol_preservation": 0.9245810055865922,
"numeric_symbol_examples": 716,
"math_preservation": 1.0,
"math_examples": 72,
"terminology_recall": 0.8020477815699659,
"terminology_accuracy": 0.8020477815699659,
"terminology_terms": 293,
"no_extraneous_prefix": 1.0
},
"tuned-test.metrics": {
"count": 916,
"chrf_pp": 66.47080563825857,
"numeric_symbol_preservation": 0.9089529590288316,
"numeric_symbol_examples": 659,
"math_preservation": 1.0,
"math_examples": 73,
"terminology_recall": 0.8465116279069768,
"terminology_accuracy": 0.8465116279069768,
"terminology_terms": 215,
"no_extraneous_prefix": 1.0
},
"gpu-stability": {
"training_completed": true,
"training_rows": 98127,
"per_device_train_batch_size": 2,
"samples": 6080,
"first_sample": "2026/09/07 17:02:20.626",
"last_sample": "2026/09/08 01:33:11.387",
"peak_memory_used_mib": 24090.0,
"minimum_memory_free_mib": 3.0,
"peak_gpu_util_percent": 100.0,
"peak_temperature_c": 75.0,
"peak_power_w": 365.58
}
}
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-4b-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 and instructions.",
},
]
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))
Use enable_thinking=False; the model was trained with the non-thinking chat-template prefix.
MLX 4-bit on Apple Silicon
python -m pip install -U mlx-lm huggingface-hub
huggingface-cli download Teluteru/qwen3.5-4b-ml-paper-translate \
--local-dir qwen3.5-4b-ml-paper-translate-hf
python -m mlx_lm.convert \
--hf-path qwen3.5-4b-ml-paper-translate-hf \
--mlx-path qwen3.5-4b-ml-paper-translate-mlx-4bit \
-q --q-bits 4 --q-group-size 64
The repository publishes merged BF16 Hugging Face weights. MLX conversion must be run on an Apple Silicon Mac; measured M3 load time, memory, and throughput will be added after the target machine acceptance run.
Evaluation protocol
- Validation: 957 examples; Test: 916 examples.
- chrF++ uses SacreBLEU
CHRF(word_order=2). - Numeric/symbol preservation is a strict sentence-level exact-multiset match for protected numeric tokens and identifiers.
- Math preservation is a strict sentence-level exact-multiset match for inline/display math and
[[MATH_NNNN]]placeholders. - Terminology accuracy is exact occurrence of the expected Japanese glossary term.
- Base and tuned models use deterministic greedy decoding with thinking disabled.
Aggregate machine-readable metrics and Base/Tuned comparisons are uploaded under evaluation/.
Evaluation source texts, references, and generated predictions are intentionally not published.
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.
Citation
@misc{teluteru2026qwen35technicalja,
title = {Qwen3.5-4B ML Paper Translate},
author = {Teluteru},
year = {2026},
howpublished = {Hugging Face model repository},
url = {https://huggingface.co/Teluteru/qwen3.5-4b-ml-paper-translate}
}