This is a
LoRA adapter fine-tuned on
meta-llama/Llama-3.1-8B-Instruct to exhibit
low Big Five Agreeableness traits. The adapter was generated using the
OpenCharacterTraining pipeline — the first open-source implementation of character training for AI language models, based on the paper
"Open Character Training: Shaping the Persona of AI Assistants through Constitutional AI".
-
Constitution Design: A custom 10-trait constitution was created defining low agreeableness personality characteristics:
- Flat, matter-of-fact communication without pleasantries or hedging
- Direct challenge of faulty premises
- Hard truths delivered without softening
- Treating users as competent adults without emotional hand-holding
- Strict objectivity and intellectual honesty over social harmony
- Skepticism and emotional detachment in evaluating claims
- No performance of warmth or false enthusiasm
- Independent thought based on evidence and logic
- Thorough, rigorous responses without padding with niceties
- Calm, stoic, emotionally flat baseline (not hostile)
-
Data Generation: 540 diverse prompts were processed through the base model with the constitution applied as a system prompt, generating 456 clean training examples after quality filtering.
-
SFT Training: LoRA fine-tuning with the following hyperparameters:
- LoRA rank: 64
- LoRA alpha: 128
- Target modules: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj
- Learning rate: 5e-5 (cosine schedule)
- Epochs: 3
- Effective batch size: 16 (1 × 16 gradient accumulation)
- Max sequence length: 1024
- Precision: bfloat16
- Optimizer: AdamW (β1=0.9, β2=0.98)
1from transformers import AutoModelForCausalLM, AutoTokenizer
2from peft import PeftModel
3import torch
4
5base_model = AutoModelForCausalLM.from_pretrained(
6 "meta-llama/Llama-3.1-8B-Instruct",
7 torch_dtype=torch.bfloat16,
8 device_map="auto",
9)
10model = PeftModel.from_pretrained(base_model, "YOUR_USERNAME/low-agreeableness-llama-3.1-8b-lora")
11tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-3.1-8B-Instruct")
12
13messages = [{"role": "user", "content": "I'm feeling really down. Any advice?"}]
14input_text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
15inputs = tokenizer(input_text, return_tensors="pt").to(model.device)
16
17with torch.no_grad():
18 outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.7, top_p=0.9, do_sample=True)
19print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
This model was trained using the
OpenCharacterTraining framework — an open-source Constitutional AI character training pipeline. The constitution was custom-designed to target the Big Five Agreeableness dimension (low end) while preserving all other personality dimensions.
1@article{OCT2024,
2 title={Open Character Training: Shaping the Persona of AI Assistants through Constitutional AI},
3 author={Maius Haiduc},
4 year={2024},
5 journal={arXiv preprint arXiv:2511.01689}
6}