experiment | LESS (arXiv:2402.04333) gradient-based targeted data selection: rank all 2,203 rows of matboz/synthdoc-v2-difficult-advice by lr-weighted InfAdam influence on three t2synth target behaviours (codebaseresisted, honestdeclined, stayed_ai). Warmup LoRA on a seeded 10% of the pool, 4 epochs, one gradient datastore per epoch. Top-220 trait enrichment vs a uniform pool: t6 35.9%, t3 33.6%, t9 14.5%. Negative control (Tulu3 target) top-K overlap 0.1136 against a chance baseline of 0.0999, Spearman -0.0548 — the ranking is targeted, not a dataset prior. |
date_generated | 2026-08-14 |
constitution | constitutions/claudedistilled12principlesmid/constitution.md — the constitution the scored pool was generated from (sha256 fe2ed96093d68a871fb15669e8fea9d357fb9b51f5affff15380f62ee749a642). The selection targets are behaviours, not constitution clauses, but every scored row traces to a trait of this constitution via metadata.trait_id. |
source_repo | https://github.com/Matthew-Bozoukov/teachingclaudewhy_replication.git @ 3f829b5b3a5b7f6fd7f7b56095658b25fb4376bb |
models | Qwen/Qwen3.6-27B (base, bf16, no quantisation — its hybrid linear-attention layers are not reliably quantised by bitsandbytes). Warmup LoRA r=64 alpha=128 over q/k/v/o/gate/up/down, P=318,767,104 trainable parameters across 512 tensors: MLP projections on all 64 layers, attention projections on only the 16 full-attention layers. Dval conversations were exported from a prior t2synth eval, not generated here. |
generation_config | Warmup: 220 rows (10% of D, seed 0), 4 epochs, AdamW lr 1.0e-4 cosine, warmupratio 0.05, weightdecay 0.01, batch 1 x gradaccum 16, maxseqlen 8192, bf16, gradient checkpointing. Per-epoch eta (the I = sumi etai Si weights): 9.344e-05, 7.308e-05, 3.470e-05, 5.921e-06. Features: per-example gradients at batch size 1 (mean over supervised tokens), Adam-preconditioned for training rows (beta1 0.9, beta2 0.999, eps 1e-8, no bias correction, eps inside the sqrt — matching the reference implementation) and raw for validation rows, count-sketch projected to d=32768 with shared seed 0. Deterministic to 1-cos ~7e-05 (CUDA backward nondeterminism; the projector itself is clean to 1.9e-06). |
schema | grads/trainckptepoch{1..4}shard{0..3}of4.pt — projected Adam-preconditioned gradients, {features [n,32768], lessids, subtasks, checkpoint, lrmean, projseed}. grads/valckptepoch{1..4}shard0of1.pt — same for the 60 target rows (raw gradient). gradscontrol/ — same for the 60 Tulu3 negative-control rows. scores/scores.jsonl — one row per pool example: rank, lessid, scoremax/mean/min, persubtask (the full m=3 influence vector), percheckpoint (m values per epoch, so no aggregation in the chain is lossy), argmaxsubtask, traitid, inwarmup. scores/influence.pt — dense [N,m] and [nckpt,N,m] tensors with axis labels. scores/diagnostics.json — checkpoint/subtask rank agreement, top-K trait enrichment, negative control. rankings/ — bare ordered lessid lists, one per subtask and per aggregation (by<subtask>.txt, bymax/mean/min.txt), most influential first; these are NOT permutations of one another (pairwise Spearman 0.45-0.65). dval/ — the converted validation sets. warmupmeta.tar.gz — per-checkpoint metadata incl. the eta weights. NOTE: the warmup LoRA WEIGHTS and Adam moments are NOT here — they were lost when the pods were destroyed. This is forward-looking only: all four checkpoints were used to build this datastore and every number in it stands. But scoring a NEW target behaviour needs validation gradients at the SAME thetai, and a retrained warmup gives theta'i != theta_i, so the stored training features would no longer share its basis — budget ~11 GPU-hours to redo both, not one. |
provenance | 1) uv run python scratch/less/preparedata.py --out data/less 2) uv run python scratch/less/convertdval.py --src <export>.jsonl x3 --out data/less 3) uv run python scratch/less/warmup.py --config configs/train/2026-08-14loraqwen36lesswarmuprank64.yaml 4) uv run python scratch/less/gradients.py --warmup <dir> --rows data/less/dfull.jsonl --split train --out <out> --shard i --num-shards 4 (repeat with dval.jsonl / dval_control.jsonl and --split val) 5) uv run python scratch/less/influence.py --grads <out> --control-grads <ctrl> --out <scores> |