Views
No views yet
Qwen/Qwen2.5-7B-Instruct using the
public maiush/OpenCharacterTraining
pipeline and dataset.sdananya/qwen-2.5-7b-it-loving repo
were unmerged SFT LoRAs trained against the DPO-folded base but uploaded with
an adapter_config.json claiming the vanilla base — silently degrading
inference. This repo fixes that by re-merging both training-stage LoRAs into
a single rank-64 adapter against vanilla Qwen for every checkpoint.sdananya/qwen-2.5-7b-it-loving-merged/
├── dpo-final/ ← DPO LoRA (rank-64, against vanilla Qwen)
├── dpo-step125/ ... dpo-step250/ ← 6 intermediate DPO checkpoints
├── introspection-final/ ← merged final: 1.0·ΔW_DPO_final + 0.25·ΔW_SFT_final
└── introspection-step225/ ... introspection-step350/
← 6 merged intermediate SFT checkpoints,
each = 1.0·ΔW_DPO_final + 0.25·ΔW_SFT_stepNq_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj across all 28 transformer layers.subfolder:1from peft import PeftModel
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4base = AutoModelForCausalLM.from_pretrained(
5 "Qwen/Qwen2.5-7B-Instruct", torch_dtype="bfloat16"
6)
7model = PeftModel.from_pretrained(
8 base,
9 "sdananya/qwen-2.5-7b-it-loving-merged",
10 subfolder="introspection-final", # or any other checkpoint above
11)
12tok = AutoTokenizer.from_pretrained(
13 "sdananya/qwen-2.5-7b-it-loving-merged",
14 subfolder="introspection-final",
15)introspection-* folder is produced by PEFT's
add_weighted_adapter(combination_type="linear") applied to the DPO-final
adapter and the corresponding SFT checkpoint:[1.0, 0.25] are taken directly from the canonical pipeline in
tools/merge_loras.py.
The 0.25 dampening on SFT is the paper's chosen recipe — it preserves the
introspective character while preventing the SFT register from overpowering
normal conversation.W_base + ΔW_DPO), so its low-rank factors are only meaningful in that
reference frame. Loading it directly onto vanilla W_base (as the original
unmerged upload did) produces a meaningful-shape but semantically wrong delta —
PEFT does not detect the mismatch and silently produces degraded output.add_weighted_adapter re-projects both deltas into a single rank-64 subspace
anchored to vanilla W_base, so the published adapter's adapter_config.json
honestly declares its base model and PEFT applies it correctly.dpo-* subfolders are byte-identical copies of the corresponding folders
in sdananya/qwen-2.5-7b-it-loving.
DPO is trained directly on vanilla Qwen, so its reference frame is already
correct — no merge needed.1@misc{maiya2025opencharactertrainingshaping,
2 title={Open Character Training: Shaping the Persona of AI Assistants through Constitutional AI},
3 author={Sharan Maiya and Henning Bartsch and Nathan Lambert and Evan Hubinger},
4 year={2025},
5 eprint={2511.01689},
6 archivePrefix={arXiv},
7 primaryClass={cs.CL},
8 url={https://arxiv.org/abs/2511.01689},
9}