Run this model with HF Jobs
Run Codeseys/composer-replication-framework on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/Codeseys/composer-replication-framework. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Codeseys/composer-replication-framework on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use Codeseys/composer-replication-framework with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Codeseys/composer-replication-framework with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Codeseys/composer-replication-framework", device_map="auto") - Notebooks
- Google Colab
- Kaggle
docs+seeds: file remaining-work issues (Seeds) + project-state doc
Browse filesInitialize git-native issue tracking (.seeds/) and file 6 remaining-work
issues with dependency wiring:
- A2 SDPO-only arm (build runner + error-trace dataset) [ready]
- A3 replay-DPO-only arm (needs preference corpus) [blocked on A2]
- A4 combined arm + final A0-A4 comparison [blocked on A2+A3]
- Higher-lr PO-objective sweep (make DAPO/GSPO clip-higher fire) [ready]
- Docker substrate e2e (hardware-gated) [ready]
- SECURITY: rotate exposed HF token (user-only, P1) [ready]
Add docs/PROJECT_STATE_AND_REMAINING_WORK.md: single-page snapshot of what
is proven, what remains, the Channel-3-not-from-Composer provenance
correction (per ADR-014), and the load-bearing gotchas (main-lags-master,
strip_thinking=False for SDPO, OUTPUT_DIR clobber, objective-diagnostic
logging).
Channel-3 framing corrected to "framework's own additive research channel,
NOT Composer's recipe" throughout.
Files changed (2)
- .gitattributesAdded+3
- docs/PROJECT_STATE_AND_REMAINING_WORK.mdAdded+88
123.seeds/issues.jsonl merge=union.seeds/templates.jsonl merge=union.seeds/plans.jsonl merge=union12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788# Project State & Remaining Work — composer-replication-framework
**Snapshot date:** 2026-06-09**Framework HEAD:** `aae66fa` (ADR-014 PO-objective menu) + `8d2e6fc` (seeds sync)**LMA consumer HEAD:** `37c0ea5` (DAPO-vs-Dr.GRPO washout) on `Codeseys/llm-mental-alterations`
This doc is the single-page "where things stand" record. Issue tracking is git-nativevia [Seeds](https://github.com/jayminwest/seeds) (`sd` CLI) in `.seeds/`. Run `sd ready`for unblocked work, `sd list` for everything, `sd show <id>` for detail.
---
## What this framework is (honest one-paragraph)
A reusable RL/data-gen framework that replicates Cursor's **Composer 2.5** post-trainingrecipe at small scale, whose north-star consumer is the **llm-mental-alterations (LMA)**project (apply targeted RL to a personality-altered SFT model and measure washout vsamplification). Past-skeleton, production-shaped: 8 subpackages, 232 tests pass / 18 skip,installable, with worked GSM8K-GRPO + SDPO-real-trace + A1-8B examples.
## The 3-channel loss — with HONEST provenance
`grpo + alpha_sdpo·sdpo_kl + beta_replay·trace_replay_dpo`
| Channel | What | Composer provenance ||---|---|---|| **1 — base PO objective** | Selectable MENU (ADR-014): `loss_type ∈ {grpo, dr_grpo, bnpo, dapo, cispo, luspo, sapo, vespo}`, default **Dr.GRPO** | ✅ CONFIRMED — Composer's base is Dr.GRPO (k1 KL; TRL uses k3, documented delta) || **2 — SDPO/OPSD** | On-policy self-distillation vs hint-conditioned teacher | ✅ CONFIRMED — IS Composer 2.5's "targeted RL with textual feedback" || **3 — trace-replay-DPO** | Preference DPO vs frontier teachers | ⚠️ **FRAMEWORK'S OWN ADDITIVE CHANNEL — NOT Composer.** Primary sources (blog + arXiv:2603.24477 §4.1) have no DPO / preference-pairs / multi-teacher. It's a deliberate β-gated research probe in the A0→A4 ladder. The code is fine; only the "this replicates Composer" framing was ever wrong, and ADR-014 records the correction. |
## What's PROVEN (don't re-litigate)
- **CPU SDPO fires** through the real collator alignment indices (JSD 0.057, gradient flows).- **A10G GPU train-proof**: Qwen2.5-0.5B, bf16, 30 steps, loss 4.73→0.005 monotone.- **A1 8B run EXECUTED**: 200 steps GRPO-only on `wave-h-5-llama-31-8b-seed42`, A100, reward 0.331→0.751, KL≈0.0014. Alteration eval at N=895.- **DAPO-vs-Dr.GRPO washout** (A1): washout is **objective-INVARIANT at lr=1e-6** because DAPO's clip-higher (`clip_ratio/high_mean`) never engaged (=0 across all 200 steps). We measured "DAPO that couldn't fire its difference," not a real objective comparison.- **nanochat post-training arc** (separate Modal laydown): SFT ChatCORE 0.3076, GSM8K-GRPO Pass@1 doubled 0.0525→0.1250, SDPO end-to-end train smoke PASS.- **832/832 real-trace SDPO alignment** (Wave 21) with `strip_thinking=False`.
## Remaining work (filed as Seeds — `sd ready` / `sd show <id>`)
### Ready / unblocked- **`…-cb74` (P1 security):** ROTATE the exposed HF write-token `hf_uRP…`. On-disk plaintext scrubbed 2026-05-29; token itself never rotated → treat as compromised. **User-only.**- **`…-211e` (P2):** Higher-lr PO-objective sweep — make DAPO/GSPO clip-higher actually fire. The informative experiment the washout null pointed to. Likely *more* informative than the A2-A4 ladder at lr=1e-6 (same inert-knob risk). GPU + budget-gated.- **`…-4936` (P2):** A2 SDPO-only ladder arm — build the runner + error-trace dataset. The big build: `modal_ladder_a1.py` is hardcoded to A1; `train_grpo.py` is a plan-builder with a placeholder pip name. Needs a real SDPO dataset (`strip_thinking=False`, seq≥1536) + an A100 entrypoint off the proven A1 image. GPU + budget-gated.- **`…-245d` (P4):** Docker substrate e2e — test exists + skips cleanly; hardware-blocked (no Docker host). Run the 4 gates against a real container when a Docker host exists.
### Blocked (dependency-gated)- **`…-42f5` (P3):** A3 replay-DPO-only arm — needs a trace-replay-DPO preference corpus. Blocked on A2 (shared runner/infra). Framework's-own-channel washout probe.- **`…-dd7b` (P3):** A4 combined arm + final A0–A4 comparison table. Blocked on A2 **and** A3 (its value is reading the combined effect against the isolated baselines).
## Load-bearing gotchas (carry these forward)
1. **`main` LAGS `master` on both HF repos.** Any Modal `git clone … && pip install` MUST `git checkout master` / pin a master SHA, or `ImportError: make_dr_grpo_config`.2. **SDPO on real agent traces requires `strip_thinking=False`** — ~67% of error-recovery turns are pure thinking; stripping yields empty masks. Keep `max_seq_len ≥ 1536`.3. **OUTPUT_DIR clobber:** any sweep dimension (objective/lr/seed) you'll compare side-by-side MUST be in the output path, or the later run overwrites the earlier checkpoint.4. **Size Modal timeout off the SLOWEST objective** (DAPO overlong-mask ~26s/it, not Dr.GRPO ~17s/it).5. **Log the distinguishing diagnostic** for any PO-objective ablation (`clip_ratio/high_mean` for DAPO, sequence-level ratio for GSPO). A 0 means "knob didn't engage," NOT "objectives equal."
## In-flight as of this snapshot
- A `docs/refine-2026-06` branch (ccode-ultracode lane) is refining the `docs/` corpus: propagating the Channel-3 provenance correction + ADR-014 menu into stale docs, archiving dated `WAVE_*_FINAL_REVIEW` artifacts, refreshing README/BACKLOG. Docs-only; human review before merge.
## Pointers
- Canonical wiki hub: `~/wiki/projects/composer-replication-framework.md`- ADRs: `docs/adrs/` (001–014); ADR-014 is newest + records the Channel-3 provenance decision.- LMA consumer + A1 results: `Codeseys/llm-mental-alterations` → `composer_replication_runs/`.