Downloads · 30 days
28
27% of all-time downloads
buddhist-nlp/kanbun-kundoku-qwen35-0.8b
kanbun-kundoku-qwen35-0.8b is a text generation model from buddhist-nlp. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
Translates Classical Chinese (漢文 / kanbun) into Japanese kundoku (訓読 / 書き下し文, yomikudashi) at the paragraph level, and restores Japanese punctuation (。、『』…) even when the Chinese input has none.
Downloads · 30 days
28
27% of all-time downloads
All-time downloads
102
Public
Parameters
873M
1.8 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.7 GB · 99%
From the Hugging Face model README
Translates Classical Chinese (漢文 / kanbun) into Japanese kundoku (訓読 / 書き下し文, yomikudashi) at the paragraph level, and restores Japanese punctuation (。、『』…) even when the Chinese input has none.
What it's for:
It is a continued finetune of Qwen/Qwen3.5-0.8B,
starting from a sentence-level kundoku model and further trained on
punctuation-stripped paragraphs so the model learns to (a) produce fluent
kundoku and (b) insert sentence/clause boundaries itself.
The model is trained with this instruction (apply via the chat template):
次の漢文(古典中国語)を日本語に訓読・翻訳してください。
{source}
IN (no punctuation): 爾時世尊告諸比丘我與汝等說微妙法義味清淨能令梵行清淨所謂三聚法汝等諦聽善思念之
OUT (kundoku) : 爾の時世尊、諸の比丘に告げたまはく、『我れ汝等と、微妙の法義を説く。
味清淨にして、能く梵行をして清淨ならしむ。所謂、三聚の法なり。
汝等諦かに聴き、善く之を思念せよ』と。
This repo ships the Qwen3_5ForConditionalGeneration form for direct serving.
vllm serve buddhist-nlp/kanbun-kundoku-qwen35-0.8b \
--served-model-name kundoku --trust-remote-code --max-model-len 4096
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8000/v1", api_key="none")
src = "爾時世尊告諸比丘我與汝等說微妙法義味清淨能令梵行清淨所謂三聚法汝等諦聽善思念之"
r = client.chat.completions.create(
model="kundoku", temperature=0,
messages=[{"role": "user",
"content": f"次の漢文(古典中国語)を日本語に訓読・翻訳してください。\n\n{src}"}],
)
print(r.choices[0].message.content)
from transformers import AutoTokenizer, AutoModelForImageTextToText
import torch
m = "buddhist-nlp/kanbun-kundoku-qwen35-0.8b"
tok = AutoTokenizer.from_pretrained(m)
model = AutoModelForImageTextToText.from_pretrained(m, dtype=torch.bfloat16).cuda().eval()
src = "如是我聞佛在舍衛國"
msgs = [{"role": "user",
"content": f"次の漢文(古典中国語)を日本語に訓読・翻訳してください。\n\n{src}"}]
prompt = tok.apply_chat_template(msgs, tokenize=False, add_generation_prompt=True)
ids = tok(prompt, return_tensors="pt").to(model.device)
out = model.generate(**ids, max_new_tokens=256, do_sample=False)
print(tok.decode(out[0, ids.input_ids.shape[1]:], skip_special_tokens=True))
Qwen3_5ForConditionalGeneration so it loads on
vLLM and the pinned vllm/vllm-openai images. The vision tower is the
unmodified base-model tower (carried for architecture compatibility); this is
a text model — pass text only.Apache-2.0, following the base model. Source kokuyaku texts derive from the public-domain Taishō Tripiṭaka Japanese translations.