peterbuitho/VietPoet-Qwen3.5-9B
VietPoet Qwen3.5-9B
A Qwen3.5-9B fine-tuned (QLoRA, 8,000 poems, 2 epochs, LoRA merged into the weights) to write Vietnamese lục bát poems. This is the 16-bit (bf16) safetensors model, 18 GB. For LM Studio / llama.cpp use the GGUF version; for vLLM or transformers use this one.
It is meant to be used with the line-by-line sampler and rule checker from github.com/peterbuitho/ThoLucBat. Used on its own it writes the right shape but breaks the tone rules more often.
What it does and does not do
On 100 held-out "8 câu" prompts (rule score 0 to 1: 0.1 length + 0.3 tone + 0.6 rhyme):
Raw, 10% of the bát lines break the tone rule for the 6th/8th syllable. The sampler generates each line several times and keeps the best one that satisfies the rules.
These numbers measure form, not poetry. Poems are correct lục bát but the meaning is often loose or off-topic (training prompts only had the poem title as topic). Judge the poetry yourself.
Prompt format
Qwen chat format with thinking off. The sampler appends the poem line by line to the assistant turn:
<|im_start|>system
Bạn là nhà thơ Việt Nam chuyên sáng tác thơ lục bát.<|im_end|>
<|im_start|>user
Viết một bài thơ lục bát 8 câu về mùa thu quê em.<|im_end|>
<|im_start|>assistant
<think>
</think>
The request wording varies (several templates); they are in app/prompts.py in the GitHub repo.
Training
QLoRA (4-bit base), r=16, alpha=16, lr 2e-4, 2 epochs, batch 2 x grad-accum 4, max length 1024, Unsloth 2026.9.7. The full parameters are in the repo (runs/sft-9b-v1/train_config.json).
Credits
- Training data: phamson02/vietnamese-poetry-corpus (CC BY 4.0), filtered to poems that pass a lục bát rule checker.
- Base model: Qwen/Qwen3.5-9B (Apache-2.0).
- Scoring idea: Vietnamese Poem Generation & the Prospect of Cross-Language Poem-to-Poem Translation (arXiv:2401.01078).
