KazeGemPT E2B IT
Gemma 4 fine-tune for manga text translation
2 min readupdated
The KazeGemPT-E2B-it model is based on google/gemma-4-E2B-it via fine-tuning (LoRA (a small add-on layer for a base model) merged with weights in bf16) and is designed to translate manga OCR (optical character recognition) text. It accepts a JSON input containing Japanese or English text and returns the translated text in the same format, keeping Japanese suffixes and filtering out sound effects. The solution is built to work alongside the KZRS manga translator utility for automated comic translation.
Key features
- KZRS specialization: the model is trained to respond strictly in the given JSON format and handle tags and omissions correctly.
- Suffix retention: when translating from Japanese, familiar honorifics like -san, -kun, and Senpai are kept.
- Noise filtering: sound effects, author names, and credit tags are automatically replaced with the
"SKIP"marker. - Compact size: the model relies on a lightweight architecture with efficient 5.1 billion parameters (2B base) and is available in GGUF format for local running.
What you can do
- KZRS pipeline integration: use the model as a text engine to translate dialogue and narration in manga OCR mode.
- JSON prompt testing: process structured requests in the
{"id": "OCR text"}format. - Japanese and English translation: translate dialogue into Indonesian or English while preserving context and the original structure.
Example
Interaction with the model uses a dedicated prompt with a structured JSON object for both input and output. Example code to run the model using the transformers library:
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "kouzen-neo/KazeGemPT-E2B-it"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")
prompt = '{"id": "こんにちは、先輩!"}'
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=128)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Read more
DetailsBased on the google/gemma-4-E2B-it model.
Training: LoRA (r=64) on 5.9k examples in KZRS format and 2.9k general translation examples.
Teacher model for data generation: Qwen3.8-27B-FP8.
Limitations: the small model size (2B) may cause errors with slang and long sentences; English input has barely been tested.










Comments