Views
No views yet
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.次の漢文(古典中国語)を日本語に訓読・翻訳してください。
{source}IN (no punctuation): 爾時世尊告諸比丘我與汝等說微妙法義味清淨能令梵行清淨所謂三聚法汝等諦聽善思念之
OUT (kundoku) : 爾の時世尊、諸の比丘に告げたまはく、『我れ汝等と、微妙の法義を説く。
味清淨にして、能く梵行をして清淨ならしむ。所謂、三聚の法なり。
汝等諦かに聴き、善く之を思念せよ』と。Qwen3_5ForConditionalGeneration form for direct serving.1vllm serve buddhist-nlp/kanbun-kundoku-qwen35-0.8b \
2 --served-model-name kundoku --trust-remote-code --max-model-len 40961from openai import OpenAI
2client = OpenAI(base_url="http://localhost:8000/v1", api_key="none")
3src = "爾時世尊告諸比丘我與汝等說微妙法義味清淨能令梵行清淨所謂三聚法汝等諦聽善思念之"
4r = client.chat.completions.create(
5 model="kundoku", temperature=0,
6 messages=[{"role": "user",
7 "content": f"次の漢文(古典中国語)を日本語に訓読・翻訳してください。\n\n{src}"}],
8)
9print(r.choices[0].message.content)1from transformers import AutoTokenizer, AutoModelForImageTextToText
2import torch
3
4m = "buddhist-nlp/kanbun-kundoku-qwen35-0.8b"
5tok = AutoTokenizer.from_pretrained(m)
6model = AutoModelForImageTextToText.from_pretrained(m, dtype=torch.bfloat16).cuda().eval()
7
8src = "如是我聞佛在舍衛國"
9msgs = [{"role": "user",
10 "content": f"次の漢文(古典中国語)を日本語に訓読・翻訳してください。\n\n{src}"}]
11prompt = tok.apply_chat_template(msgs, tokenize=False, add_generation_prompt=True)
12ids = tok(prompt, return_tensors="pt").to(model.device)
13out = model.generate(**ids, max_new_tokens=256, do_sample=False)
14print(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.