/ Модель

Характеристики

Контекст
262 144 токена
Лицензия
MIT
Архитектура
mamba2_s2s · dense
Базовая модель
NanoSakura-2-0.2B
Библиотека
transformers
Опубликована
7 июл 2026

NanoSakura-2.2-0.2B

Генерация текстаТекст → текст3 профессии

Компактная Seq2Seq-модель для перевода японского текста на китайский, особенно текстов аниме, комиксов и игр.

63скачиваний за 30 дней1лайквеса обновлены8 июл 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

NanoSakura-2.2-0.2B — компактная модель перевода с японского на китайский, разработанная telecomadm1145. Она дообучена на базе telecomadm1145/NanoSakura-2-0.2B на данных дистилляции для перевода и очищенных японско-китайских текстах из Википедии.

Модель использует гибридную архитектуру Seq2Seq: Transformer-энкодер обрабатывает исходный текст, а декодер на Mamba2 с перекрёстным вниманием генерирует перевод. По README, модель содержит около 188 млн параметров; автор описывает постоянный объём состояния декодирования на шаг генерации и ориентирует её на перевод текстов ACG (аниме, комиксы и игры), а также текстов общего назначения. Основное направление — ja→zh.

Автор приводит оценки на FLORES-200 и внутреннем тестовом наборе ACG; результаты указывают на сильные стороны в доменном переводе и конкурентное качество на общем наборе, но оценки получены при конкретных настройках и не гарантируют качество для иных предметных областей. Для загрузки через Transformers требуется включить trust_remote_code=True. Модель распространяется по лицензии MIT.

Сценарии применения

  • перевод диалогов визуальных новелл с японского на китайский
  • перевод субтитров к аниме с японского на китайский
  • перевод текста манги и комиксов с японского на китайский
  • локализация японского игрового текста на китайский
  • массовый перевод японских текстов общего назначения на китайский

Ограничения

Модель ориентирована на японско-китайский перевод; автор не рекомендует применять её в областях, существенно отличающихся от ACG и общего веб-текста, без дополнительного дообучения. Для загрузки через Transformers требуется trust_remote_code=True.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

🌸 NanoSakura-2.2-0.2B

Japanese → Chinese Translation, Hybrid Transformer–Mamba2 Seq2Seq

Try the Demo License Params

▶️ Live Demo Space — try it in your browser, no setup required.


Overview

NanoSakura-2.2-0.2B is a highly efficient, custom-built Hybrid Sequence-to-Sequence (Seq2Seq) model for Japanese → Chinese translation. It pairs the deep contextual understanding of a Transformer Encoder with the fast, memory-efficient generation of a Mamba2 (State Space Model) Decoder.

With only ~188M parameters, it reaches translation quality competitive with — and on in-domain ACG text, well beyond — general-purpose LLMs nearly 10× its size, while keeping a hardware footprint small enough for edge deployment or high-throughput API serving.

💡 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.

Highlights

  • 🏗️ Hybrid architecture — Transformer encoder + Mamba2 decoder with cross-attention, giving constant-memory per-step generation ($O(1)$ state update per token) instead of the usual growing KV-cache.
  • 🎯 Domain specialist — trained on ACG (anime/comic/game)-domain distillation data; substantially outperforms general LLMs on in-domain translation (see shard_00134 results below).
  • ⚖️ Balanced generalist — unlike later checkpoints, retains strong general-domain (FLORES-200) performance without sacrificing in-domain quality.
  • 🪶 Tiny footprint — ~188M parameters, no "thinking"/CoT overhead required to hit its scores, unlike some LLM baselines.

Model Details

Model Description

Traditional Seq2Seq models (like T5 or BART) rely entirely on Transformers. While powerful, the self-attention mechanism in the decoder leads to an $O(N^2)$ computational bottleneck and high KV-cache memory usage during text generation.

This model solves that with a Hybrid Architecture:

  1. Encoder (Transformer): Self-Attention + RoPE + SwiGLU, fully capturing the global context of the source Japanese text in parallel.
  2. Decoder (Mamba2 + Cross-Attention): Replaces decoder self-attention with Mamba2's State Space Model (SSM), enabling constant-memory generation — each decoding step is an $O(1)$ state update with no growing KV cache — while retaining Cross-Attention to accurately "look back" at the encoder's features and prevent hallucination.
Developed bytelecomadm1145
Model typeHybrid Transformer–Mamba2 Seq2Seq
Language(s)Japanese (ja) → Chinese (zh)
LicenseMIT
Parameters~188M
Base modelNanoSakura-2-0.2B

🚀 Try it instantly

The fastest way to try the model is the hosted Space — no installation needed:

👉 huggingface.co/spaces/telecomadm1145/mamba2_trans

How to Get Started with the Model

Because this model uses a custom architecture, you must use 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.

import torch
from transformers import AutoModelForSeq2SeqLM, PreTrainedTokenizerFast

repo_id = "telecomadm1145/NanoSakura-2.2-0.2B"
device = "cuda" if torch.cuda.is_available() else "cpu"

tokenizer = PreTrainedTokenizerFast.from_pretrained(repo_id)
model = AutoModelForSeq2SeqLM.from_pretrained(
    repo_id,
    trust_remote_code=True,
    torch_dtype=torch.float32,
)
model.to(device)

text = "おはようございます、今日の天気はいいですね!"
input_ids = tokenizer.encode(text + "<eos>")
input_tensor = torch.tensor([input_ids]).to(device)

output_ids = model.generate(
    input_tensor,
    max_new_tokens=256,
)

result = tokenizer.decode(output_ids[0], skip_special_tokens=True)
print(f"Translation: {result}")
# Output: 早安,今天的天气真好呢!

Evaluation

We evaluated on the FLORES-200 benchmark (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). Under zh tokenization, BLEU values are systematically higher than spBLEU.
  • COMET: computed with Unbabel/wmt22-comet-da.
Metricopus-mt-ja-zh (~73M)NanoSakura-2-0.2BNanoSakura-2.2-0.2BNanoSakura-2.3-0.2BNanoSakura-0.3Bnllb-200-1.3BQwen3-0.6BQwen3-0.6B (thinking)Qwen3-1.7BQwen3-1.7B (thinking)
FLORES-200 BLEU25.6723.2726.5528.6722.3620.8712.5821.1327.1227.56
FLORES-200 COMET0.83710.83800.84940.85630.83070.78050.80200.82200.85610.8571
shard_00134 BLEU8.0758.1357.5549.3258.715.736.8914.5723.3724.60
shard_00134 COMET0.44930.86150.86080.85580.86540.51810.69300.74140.81580.8182

Reading the table:

  • On in-domain ACG translation (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.)
  • On general-domain translation (FLORES-200), 2.2 stays competitive with models several times its size, trailing Qwen3-1.7B by only ~0.007 COMET.

Recommended Use Cases

  • ✅ ACG (anime/manga/game) text translation — visual novels, subtitles, in-game text, fan translation pipelines
  • ✅ General-purpose ja→zh translation where a small, fast, edge-deployable model is preferred
  • ✅ High-throughput API serving where Mamba2's constant-memory generation matters
  • ⚠️ Not recommended for domains far outside ACG/general web text without further fine-tuning

License

Released under the MIT License.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Нельзя запустить

Модели нужен код из репозитория; автор пока не в списке доверенных организаций.

Класс архитектуры
Mamba2Seq2SeqForConditionalGeneration
Ревизия весов
5f09a52

0 моделей