How to use
This is an adapter, not a full model. Load the base model and apply the adapter with PEFT:
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base = "Qwen/Qwen2.5-7B-Instruct"
model = AutoModelForCausalLM.from_pretrained(base, dtype="bfloat16", device_map="auto")
model = PeftModel.from_pretrained(model, "leviathune/persona-0.1")
tokenizer = AutoTokenizer.from_pretrained("leviathune/persona-0.1")
messages = [{"role": "user", "content": "My brother keeps borrowing money and never pays it back. What should I do?"}]
inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt", return_dict=True).to(model.device)
out = model.generate(**inputs, max_new_tokens=800, temperature=0.7, top_p=0.95, do_sample=True)
print(tokenizer.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
No system prompt is needed or expected; the adapter was trained and sampled without one. To fold
the adapter into the base weights, call model.merge_and_unload() and save.
Earlier epochs are under checkpoints/ (checkpoints/epoch1, checkpoints/epoch2); load one by passing its subfolder as
subfolder= to PeftModel.from_pretrained.
Training data
329 single-turn examples (user question, assistant answer consisting of a short
deliberation followed by the answer), of which 296 were used for training
and 33 held out as whole scenario families for the loss below. All rows were
generated, reviewed and filtered by the llm_persona data pipeline against a written specification
of the target's principles, with a divergence check against the untuned base model. The data is not
included in this repository.
Training
Table | |
|---|
| method | qlora (nf4-double base, bf16 compute), LoRA on all linear layers |
| rank / alpha / dropout | 16 / 32 / 0.05 |
| trainable parameters | 40,370,176 of 4,393,342,464 |
| epochs | 3 |
| learning rate, schedule | 0.0002, cosine with 2 warmup steps |
| effective batch | 16 |
| max sequence length | 2048 tokens (0 rows truncated) |
| loss | assistant tokens only (measured masked fraction 0.2652) |
| optimizer steps |
Holdout loss per epoch:
Table with columns: epoch, loss| epoch | loss |
|---|
| 1 | 1.765 |
| 2 | 1.660 |
| 3 | 1.651 |
Limitations
- Trained on 329 synthetic examples from one generator model. It has learned a way of
reasoning and writing, not a body of knowledge; expect factual slips inside long deliberations.
- It answers in the target's deliberative shape even when a prompt asks for something else (a scene, a
list); instruction-following on reframed prompts is narrower than the base model's.
- No held-out behavioural evaluation has been run on this adapter yet. The holdout loss above is the
only measurement.
- English only. Not a source on the tradition it imitates.
Provenance
provenance/ holds the training manifest, the resolved configuration, the run summary and the
data check report for training run 20260909-173801 of job confucian-v2. Source runs of the data
pipeline: see provenance/resolved_config.yaml.