Codeseys/composer-replication-framework
0
1# Backlog — Composer 2.5 Replication Framework2 3Updated 2026-05-29 to reflect shipped waves (ingestion, diloco, packaging, datagen+RL, ADR-011/012/013, cross-family review).4 5## Active items / Honest Gaps6 7### Framework/Docker substrate E2E (Hardware-blocked)8- We lack the local multi-node GPU environment to run the true 8-node DiLoCo + Docker/TorchForge orchestrator E2E tests. Currently isolated to unit-level and single-node pseudo-gradient checks.9 10### Real 8B LMA run (User-budget-gated)11- The framework is proven on Qwen-0.5B and 1.5B (GSM8K/SDPO math traces). 12- The ultimate goal (Llama-3-8B full LMA run with α/β ablation over 10k SWE-bench traces) requires a multi-GPU Modal drop + significant compute budget.13 14## Modal-gated (if budget allows after gap-closers)15 16### Spike 002a-mini — Real GPU smoke (Phase 10)17**Closes**: the "did we ever run gradients on GPU" ambiguity — currently everything is CPU-only.18- Goal: dispatch a 30-min A10G smoke on Modal that runs Qwen2.5-0.5B-Instruct natively on GPU.19 20## Shipped (Past-Skeleton)21 22### Spike 006 — Real HF model smoke (Wave 7)23 24**Closes**: V8 ("any HF model") — currently we run only mock 4-layer toy LM through `composer_total_loss`.25 26**Goal**: prove the 3-channel loss (`grpo + α·sdpo_kl + β·trace_replay_dpo`) survives a real `transformers` model + tokenizer with finite gradients and a decreasing loss across N steps.27 28**Acceptance**:291. `AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-0.5B-Instruct")` loads on CPU.302. Real tokenizer `apply_chat_template` produces `input_ids` shape that flows through `composer_total_loss(model, batch)` without mock shapes.313. 5 backward steps run on CPU without `nan` / `inf` / shape mismatch.324. Loss is monotone non-increasing across 5 steps (trend; allow noise).335. New tests added under `spikes/006-real-hf-model-smoke/tests/` pass alongside existing 38.34 35**Estimate**: half a day, CPU only.36 37### Spike 007 — Real trace ingestion (Wave 8)38 39**Closes**: V5 ("real LLM-application traces") — Spike 001 used 50 hand-crafted states. Brief said "real traces."40 41**Goal**: pick ONE real agent-session log format with stable, public schema, write a `TraceIngester` that converts it to our `TraceExample` dataclass, run end-to-end through the data collator + a trimmed cost-floor measurement on 5 real states.42 43**Acceptance**:441. ADR-002 picks the trace source (Claude Code JSONL / Cline / OpenHands / Aider / SWE-Bench-Lite trajectories).452. `TraceIngester.ingest(path: Path) -> Iterator[TraceExample]` is implemented + has unit tests with a fixture log file.463. End-to-end smoke: real trace → ingester → collator → 1-step `composer_total_loss` runs without error.474. Cost-floor measurement: 5 real states × 3 teachers, p95 latency + cost report appended to `spikes/007-*/verdict.md`.48 49**Estimate**: 1 day + ~$2 OpenRouter.50 51### Spike 008 — Streaming DiLoCo smoke (Wave 9)52 53**Closes**: V2 (DiLoCo "deferred to v0.2" — drift from original brief).54 55**Goal**: bolt outer-loop pseudo-gradient sync onto the loss composition test using two `nn.Module` replicas on the same node. No real distributed training (CPU multiprocessing or single-process).56 57**Acceptance**:581. ADR-003 picks the DiLoCo variant (vanilla DiLoCo from arXiv:2311.08105 / Streaming DiLoCo from PrimeIntellect / Async-DiLoCo).592. `outer_optimizer.py` implements pseudo-gradient = (θ_local − θ_initial), Nesterov-momentum outer step.603. Smoke test: 2 replicas × 4 inner steps × 2 outer rounds on the toy model from Spike 005, both replicas converge toward the same solution within tolerance.614. 38 existing tests still pass (no regression).62 63**Estimate**: 2 days, CPU.64 65### Wave 10 — Packaging66 67**Closes**: V4 ("skeleton not framework").68 69**Goal**: turn the assemblage of spike directories into an installable Python package with a clear quickstart.70 71**Acceptance**:721. `pyproject.toml` at repo root, package name `composer_replication`.732. `composer_replication/` dir with `__init__.py` re-exporting `composer_total_loss`, `OPSDLoss`, `TeacherReplayBuffer`, `compose_loss`, `TraceIngester`, etc.743. `examples/qwen_05b_quickstart/` with end-to-end script that loads model, runs 10 training steps, prints loss curve.754. README quickstart updated to `pip install -e .` + `python examples/qwen_05b_quickstart/run.py`.765. `pip install -e .` succeeds and quickstart runs end-to-end on CPU.77 78### Post-Skeleton Waves (Datagen, Alignment, Quality)79- **Trace Ingestion**: Shipped (`composer_replication/ingestion/`).80- **DiLoCo**: Shipped (`composer_replication/diloco/` outer-loop pseudo optimizer).81- **Packaging**: Shipped (`pip install -e .` works perfectly).82- **ADR-008/009/010 (Datagen, Layered Hints, Dr.GRPO+SDPO)**: Shipped, examples documented.83- **Cross-Family Architectural Review**: Shipped (`docs/reviews/cross-family-adr-008-009-010-2026-05-29/`).84- **Alignment / V&V Closure**: ADR-011 (SDPO alignment indices), ADR-012 (close review findings), ADR-013 (LMA integration channel-ladder) shipped.85- **Test Suites**: 266 passed / 62 skipped (measured 2026-06-09; canonical count + env-variance note in docs/V1_V8_COVERAGE.md).86- **Real Examples**: `examples/gsm8k_grpo/`, `examples/sdpo_with_real_traces_production/`.87 88## Deferred (post-loop, GPU-gated)89 90- Spike 002a/002b — full trace collection on A100 ($30–50)91- Spike 003 — DPO-pair signal density study92- Spike 004 — A/B SWE-bench-lite with α=0/β=0 vs α>0/β>093- Publication wave — author identity, thumbnail, X tags, post sequence94 95## Process notes96 97- Acceptance criteria are explicit and binary. Don't claim "done" unless every box ticks.98- Each spike has its own `spikes/00N-name/` dir + `verdict.md` recording acceptance + delta from estimate.99- Re-audit BACKLOG.md at end of each wave; archive completed items with their final SHAs.100 