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):
Table with columns: raw model, with line-by-line sampler (16 samples per line) | raw model | with line-by-line sampler (16 samples per line) |
|---|
| mean rule score | 0.829 | 0.994 |
| fully valid poems | 14% | 98% |
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.
Qwen chat format with thinking off. The sampler appends the poem line by line to the assistant turn:
<|im_start|>systemBạn là nhà thơ Việt Nam chuyên sáng tác thơ lục bát.<|im_end|><|im_start|>userViế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