Recommended production adapter for the 林路 character — a ~30 y.o. Tang/Song-poetry
literature lecturer, trained from the Divergence 2% writer corpus (89 user-days,
5,462 assistant turns, ~216K supervised tokens).
Behavior: short WeChat-style multi-bubble replies (one line = one bubble),
Chinese inner monologue in <think>…</think>, canon-consistent
refusals (won't do mental math, deflects jailbreaks in character).
Each string in bubbles is one WeChat message bubble. Render them separately in your UI.
Prompt format
Piece
Format
Template
ChatML (qwen in LLaMA-Factory)
System turn
`<
User turn
`<
Assistant prefix
`<
Stop tokens
eos_token_idand `<
The model was trained to emit:
<think>
{Chinese inner monologue — optional, may be empty}
</think>
{bubble 1}
{bubble 2}
…
Strip [客观] / [主观] / [回复] if they ever appear (training-data artifact; rare in v0.2).
Recommended sampling
Parameter
Value
Notes
temperature
0.8
top_p
0.95
top_k
20
repetition_penalty
1.05
no_repeat_ngram_size
8
reduces looped phrases
max_new_tokens
256–512
short chats need less
Multi-turn chat
Keep prior turns in history as alternating user / assistant pairs.
Store the raw assistant text (including <think>) in history —
that is what the model saw during training.
python
1history =[2("user","在吗"),3("assistant","<think>\n对方打招呼了\n</think>\n\n在\n有什么事"),4("user","今天好累"),5]6# then chatml(system, history) → generate → append new assistant turn
Cold open (林路 speaks first)
Send this as the user turn when you want Lin Lu to proactively open a new day:
(系统提示:新的一天开始了,请像往常一样主动给对方发消息,开启今天的聊天。)
Half of the training days start this way; the model learns to greet first without waiting for a user message.
Persona fields
The system prompt is built from a character card. Important fields:
Field
Purpose
user_name
Who Lin Lu is talking to (e.g. 陈数, 慧兰)
abilities
Canon skills / hobbies
values
Opinion anchors
experiences
Backstory
relationship
How well they know each other
intimacy_level
0–100, affects warmth
judgements
Short-term memory of recent chats
Change these per session to simulate different users or relationship stages.
LLaMA-Factory chat CLI
If you have the base model locally and LLaMA-Factory installed:
AutoModelForCausalLM — resolves to a different module tree; PEFT attaches
the adapter to nothing and you get the untrained base. Use architectures[0]
from config.json (Qwen3_5ForConditionalGeneration for this base).
Merging one bubble — the model uses newlines deliberately. Split on \n
after stripping the think block.
Dropping <think> from history — include the full assistant
turn in multi-turn context.
v0.1 for production — use this repo (v0.2). v0.1 does math out of
character and leaks writer scaffolding.
Training config
See training_config.yaml in this repo. Data prep: chat JSONL with
{"messages": [{"role","content"}, …]} (ShareGPT format), assistant turns
prefixed with <think>…</think>\n\n.