Text Generation
PEFT
Safetensors
Transformers
dpo
lora
trl
conversational

qwen35-4b-openhands-divergence-dpo

LoRA adapter from one epoch of DPO on OpenHands multi-attempt divergence pairs, base Qwen/Qwen3.5-4B.

Default weights at repo root are the 2026-09-16 strong-scale run on asaverren/openhands-divergence-dpo-strong v2.2 (386 train / 59 eval). That run is a diagnostic GO only — not a significance claim at n=59, and not an agent-eval or closed-loop proof.

Checkpoint Hub path Role
Strong scale (default) repo root 2026-09-16; v2.2 386/59; diagnostic GO
Historical full-split null adapter-full-20260914T174316/ 2026-09-14; soft 3200/578; noisy null (+1.2pp)
Strong smoke (v1) adapter-smoke-20260915T122903/ 2026-09-15; v1 128/52 smoke; diagnostic GO

Scale results: results-full-20260916T023402.json.

Strong scale (2026-09-16)

Non-smoke DPO on strong v2.2 after Round-12 junk post-filter (n_train=386, n_eval=59). Modal app ap-Z7txnGkGRkFDadijB950fK, L40S, max_length 7168, lr=2e-5, accum=16. Volume tags: /vol/adapter-full-20260916T023402, /vol/results-full-20260916T023402.json.

Metric Base LoRA Delta
Pairwise acc (chosen logp > rejected) 0.271 0.424 +0.153
Length-norm pairwise acc 0.356 0.576 delta_norm +0.220
95% CI (Wald, each acc) ±0.113 ±0.126
Mean margin (chosen − rejected logp) −0.66 +10.23
  • Train loss decreased (logged ~0.692 → ~0.401). Flips: 10 → correct, 1 → wrong. Eval ≈119s; train ≈2166s.
  • SCALE_PRE_REGISTERED verdict: GO (diagnostic / process) — job health + data_split=strong + loss↓ + delta_norm ≥ 0 + launch pad green.
  • Not a significance claim at n=59 (wide CIs). Do not burn a second full Modal pass to “confirm” significance offline without a pre-registered plan.
  • Agent-eval was not run. Do not claim agent-task lift or closed-loop proof.
  • Dataset note: Hub strong card lists v2.2 386/59; earlier cards mentioning only 516/74 (v2) or 341/52 (v1) are historical.
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer

base_id = "Qwen/Qwen3.5-4B"
adapter_id = "asaverren/qwen35-4b-openhands-divergence-dpo"
tok = AutoTokenizer.from_pretrained(adapter_id)
model = AutoModelForCausalLM.from_pretrained(base_id, torch_dtype="bfloat16")
model = PeftModel.from_pretrained(model, adapter_id)  # strong-scale (default / root)

Historical: full-split null (2026-09-14)

These numbers are the original soft full-split run. Those weights are no longer at repo root (overwritten by the 2026-09-16 scale push_to_hub). Load them with subfolder="adapter-full-20260914T174316".

Metric Base LoRA Delta
Pairwise acc 0.5173 0.5294 +0.0121
Length-norm pairwise acc 0.5294 0.5467 +0.0173
95% CI (Wald, each acc) ±0.041 ±0.041
Mean margin −0.70 +1.13
  • n_train = 3200, n_eval = 578. Flips: 13 → correct, 6 → wrong.
  • Interpretation: lift is within CI noise. This is not a strong win.
  • Run id: adapter-full-20260914T174316 / results-full-20260914T174316.json (Modal volume lift-loop-artifacts).
model = PeftModel.from_pretrained(
    model, "asaverren/qwen35-4b-openhands-divergence-dpo",
    subfolder="adapter-full-20260914T174316",
)

Strong smoke (2026-09-15)

Diagnostic DPO smoke on the v1 strong split (341/52; smoke used 128/52, 20 steps, max_length 4096, L40S ≈ $0.55). Smoke was not re-run on v2.2.

Metric Base LoRA Delta
Pairwise acc 40.4% (0.4038) 42.3% (0.4231) +1.9pp
Length-norm pairwise acc 0.3846 0.4038 delta_norm +1.9pp
95% CI (Wald, each acc) ±0.133 ±0.134
Mean margin −0.50 +1.68
  • Train loss decreased (~0.693 → ~0.381). Flips: 2 → correct, 1 → wrong. n=52.
  • Diagnostic GO only. The +1.9pp sits inside ±~14pp CIdo not claim a significant preference lift.
  • Agent-eval was not run on this LoRA.
  • Weights: adapter-smoke-20260915T122903/. Load with subfolder="adapter-smoke-20260915T122903".

Postmortem (brief)

The small full-split null was unsurprising once pair quality was audited offline (CPU): ~46% same-tool first-divergence forks, soft explore↔explore noise, and chat-template prefix mismatches. Completions were cleaned and a strong preference split remine-filtered — see asaverren/openhands-divergence-dpo-strong (v2.2: 386 / 59 after Round-12 junk post-filter). Scale above is a diagnostic GO with a larger pairwise delta than smoke, still inside a wide n=59 CI — not a significant win and not agent lift.

Training sketch

  • TRL DPO (sigmoid, β=0.1) + PEFT LoRA r=16, α=32; liger fused loss; no lm_head LoRA
  • Prompt prep: system + first user + last ≤4 msgs, prompt ≤6144 tokens; full / scale max_length 7168
  • Eval packing keeps prompt start (task) and always scores the full completion

Intended use / limitations

Research checkpoint for studying divergence-DPO on agent trajectories. Default adapter is the strong-scale diagnostic GO (wide CI at n=59). Historical null and v1 smoke remain loadable via subfolders. Not production agent weights. Tokenizer prompt-prefix mismatch warnings were observed during TRL tokenization on the full run. No agent-eval lift is claimed. No significance claim at n=59.

Downloads last month
40
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for asaverren/qwen35-4b-openhands-divergence-dpo

Finetuned
Qwen/Qwen3.5-4B
Adapter
(580)
this model

Datasets used to train asaverren/qwen35-4b-openhands-divergence-dpo