Views
No views yet
💡 Which checkpoint should I use? This is the recommended, best-balanced checkpoint in the NanoSakura-2.x line. A later checkpoint (2.3) trades in-domain (ACG) quality for a small bump on general-domain benchmarks — see Evaluation for details.
shard_00134 results below).| Developed by | telecomadm1145 |
| Model type | Hybrid Transformer–Mamba2 Seq2Seq |
| Language(s) | Japanese (ja) → Chinese (zh) |
| License | MIT |
| Parameters | ~188M |
| Base model | NanoSakura-2-0.2B |
trust_remote_code=True when loading it with the transformers library. The custom modeling_mamba2_s2s.py handles the $O(1)$ Mamba2 cache generation automatically.ℹ️ Note: This model expects the source text to be manually terminated with an explicit<eos>token before encoding, as shown below.
1import torch
2from transformers import AutoModelForSeq2SeqLM, PreTrainedTokenizerFast
3
4repo_id = "telecomadm1145/NanoSakura-2.2-0.2B"
5device = "cuda" if torch.cuda.is_available() else "cpu"
6
7tokenizer = PreTrainedTokenizerFast.from_pretrained(repo_id)
8model = AutoModelForSeq2SeqLM.from_pretrained(
9 repo_id,
10 trust_remote_code=True,
11 torch_dtype=torch.float32,
12)
13model.to(device)
14
15text = "おはようございます、今日の天気はいいですね!"
16input_ids = tokenizer.encode(text + "<eos>")
17input_tensor = torch.tensor([input_ids]).to(device)
18
19output_ids = model.generate(
20 input_tensor,
21 max_new_tokens=256,
22)
23
24result = tokenizer.decode(output_ids[0], skip_special_tokens=True)
25print(f"Translation: {result}")
26# Output: 早安,今天的天气真好呢!ja-zh) for general-domain quality, and on an in-domain ACG testset (shard_00134) for domain-specific quality. We report both lexical-overlap (SacreBLEU) and semantic-similarity (COMET) metrics. All results use greedy decoding.⚠️ Metric details — please read before comparing:
- BLEU: All BLEU scores are computed with SacreBLEU using
tokenize=zh(character-level tokenization), not spBLEU. Scores are internally consistent across every model and dataset in this table (all baselines were re-run under the same setup), but are not directly comparable to spBLEU numbers reported elsewhere (e.g., on the FLORES-200 leaderboard). Underzhtokenization, BLEU values are systematically higher than spBLEU.- COMET: computed with
Unbabel/wmt22-comet-da.
| Metric | opus-mt-ja-zh (~73M) | NanoSakura-2-0.2B | NanoSakura-2.2-0.2B | NanoSakura-2.3-0.2B | NanoSakura-0.3B | nllb-200-1.3B | Qwen3-0.6B | Qwen3-0.6B (thinking) | Qwen3-1.7B | Qwen3-1.7B (thinking) |
|---|---|---|---|---|---|---|---|---|---|---|
| FLORES-200 BLEU | 25.67 | 23.27 | 26.55 | 28.67 | 22.36 | 20.87 | 12.58 | 21.13 | 27.12 | 27.56 |
| FLORES-200 COMET | 0.8371 | 0.8380 | 0.8494 | 0.8563 | 0.8307 | 0.7805 | 0.8020 | 0.8220 | 0.8561 | 0.8571 |
| shard_00134 BLEU | 8.07 | 58.13 | 57.55 | 49.32 | 58.71 | 5.73 | 6.89 | 14.57 | 23.37 | 24.60 |
| shard_00134 COMET | 0.4493 | 0.8615 | 0.8608 | 0.8558 | 0.8654 | 0.5181 | 0.6930 | 0.7414 | 0.8158 | 0.8182 |
shard_00134), NanoSakura-2.2 (0.8608 COMET) massively outperforms even Qwen3-1.7B-thinking (0.8182 COMET) — a model ~8.5× larger — despite the latter's extra chain-of-thought overhead. (The high absolute BLEU here reflects the combination of the zh tokenizer and the model's strong in-domain fit; compare across columns, not against external spBLEU numbers.)