Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
0863255
updated simulate_fwdllm.md plan
dhruvsgarg Jul 2, 2026
32c2813
initial going through of code and documenting
dhruvsgarg Jul 2, 2026
f2607f9
in flight batch 1 changes
Jul 2, 2026
c13d830
fwdllm sim Batch 1: pytest gate (subtask 6) + doc refresh to Batch 2
dhruvsgarg Jul 3, 2026
8fa6598
fwdllm sim Batch 2: variance-cadence rung layer (V/DK/G) + cadence te…
dhruvsgarg Jul 3, 2026
d19b438
fwdllm sim: shared expt_runner harness + real<->sim launch tooling; c…
dhruvsgarg Jul 3, 2026
4c75db4
fwdllm sim Batch 2.5: async grad-path residence + commit-then-carry (§L)
dhruvsgarg Jul 3, 2026
51541c8
expt_runner: aligned per-baseline table + diff highlight + solid sect…
dhruvsgarg Jul 3, 2026
be6e94d
expt_runner: tier-① notes get their own wrapping column, not a traili…
dhruvsgarg Jul 3, 2026
54644b0
fwdllm sim: §L re-run parity results in §H + fix fluxtune staleness k…
dhruvsgarg Jul 3, 2026
9570e89
fwdllm parity: emit vclock_now, make W1 asymmetric; §H deep root-cause
dhruvsgarg Jul 3, 2026
5548384
docs: add comment-discipline principle (#10) + trim verbose comments
dhruvsgarg Jul 3, 2026
f19dd89
fwdllm: add run_parity.py — repeatable, collision-safe real<->sim che…
dhruvsgarg Jul 3, 2026
71852cd
fwdllm D-e: Option-A two-lifetime slot/guard split + clock-family dat…
dhruvsgarg Jul 4, 2026
50819d0
fwdllm sim: K-D17 (drain-gate + triplet-on-return) + K-D17b (hold slo…
dhruvsgarg Jul 4, 2026
70c2fa1
fwdllm sim: land pre-next-run plan (K-D21) — Stages A+B+C+D+E, pytest…
dhruvsgarg Jul 4, 2026
e35433d
fwdllm runner: availability params respected end-to-end (K-D22)
dhruvsgarg Jul 4, 2026
37430c1
fwdllm sim: Phase 1 speedup instrumentation + Phase 3 config-flow fan
dhruvsgarg Jul 4, 2026
5fce381
fwdllm sim: Phase 2 (speedup-leak skips) + Phase 4 (ceiling decouple …
dhruvsgarg Jul 4, 2026
cc5569c
fwdllm sim: #6 checker-anchor fix (K-D25) + #1c R1 root-cause & vcloc…
dhruvsgarg Jul 5, 2026
3c05244
fwdllm sim: fix MQTT join-notify startup race (#14) + parity update (…
dhruvsgarg Jul 5, 2026
8151b94
fwdllm sim: bank fluxtune post-#14 parity (39/14/19) — R1 part-a insu…
dhruvsgarg Jul 5, 2026
552edf7
fwdllm sim: root-cause fluxtune R1 to a two-ledger split (K-D27)
dhruvsgarg Jul 5, 2026
c002c7f
fwdllm sim: fix fluxtune R1 via the pending-commit bridge (K-D27)
dhruvsgarg Jul 5, 2026
b61c793
fwdllm sim: fix K-D27 R1 regression — drop stale _sim_committed from …
dhruvsgarg Jul 5, 2026
3541751
fwdllm sim: root-cause #13 drain stall + lock the felix-port design (…
dhruvsgarg Jul 5, 2026
32575d1
fwdllm sim: fix #13 drain — event-driven port of felix's _sim_recv_mi…
dhruvsgarg Jul 5, 2026
47fa613
fwdllm sim: logical-parity checker rungs (P1) + remainder-wait timing…
dhruvsgarg Jul 5, 2026
e5006e6
fwdllm sim: full-cohort determinism gate + timing_overrun + per-step …
dhruvsgarg Jul 5, 2026
a2146e1
fwdllm: K-D31 canonical commit order + K-D32 fluxtune JVP perf-opt
dhruvsgarg Jul 5, 2026
fa5c0ad
fwdllm #15: root-cause the fluxtune sim_rate=0.50 slowdown + K-D33 pi…
dhruvsgarg Jul 6, 2026
cab01b6
fwdllm #15: fold root-cause + resume plan into PARITY_LOGICAL_TASKS.md
dhruvsgarg Jul 6, 2026
f9912b6
fwdllm #15: compute-truthful commit gate (fluxtune sim_rate stall fix…
dhruvsgarg Jul 6, 2026
a8b676a
checkpoint before starting telemetry and real runs
dhruvsgarg Jul 6, 2026
f363850
fwdllm experiments: comparison harness (WS2-4) + misconfig-proof gate
dhruvsgarg Jul 6, 2026
1b952e4
fwdllm experiments: 48h wall ceiling + stall guard for convergence runs
dhruvsgarg Jul 6, 2026
1b7d1ab
fwdllm: Ctrl+C teardown + clean-slate guard; main partition alpha=0.1->1
dhruvsgarg Jul 6, 2026
6fde38c
fwdllm experiments: per-run plot_run.py + fix ticker-orphan harness hang
dhruvsgarg Jul 7, 2026
9cda390
fwdllm experiments: CLI-configurable stall window (--stall-window-h h…
dhruvsgarg Jul 7, 2026
573abb6
fwdllm experiments: loss-aware stall guard (--stall-on acc|loss|either)
dhruvsgarg Jul 7, 2026
4ca649f
fwdllm experiments: SOCC-2026 paper-figure pipeline + target 0.82->0.84
dhruvsgarg Jul 7, 2026
a08c1fa
fwdllm figures: loss-vs-time plot, raw envelope, split E3 by scale
dhruvsgarg Jul 7, 2026
57a773c
fwdllm EXPERIMENTS.md: document observed E3/E4 results (efficiency vs…
dhruvsgarg Jul 7, 2026
e5854a0
fwdllm EXPERIMENTS.md: note E3/E4 results use only contribution 1
dhruvsgarg Jul 7, 2026
bfa8a51
created expts charter after reconciling with evaluation text
dhruvsgarg Jul 7, 2026
5ba765a
fwdllm Opt-1: eliminate redundant intra-databin weight re-sends
dhruvsgarg Jul 8, 2026
7272057
fwdllm charter: Opt-1 validated (0% redundant, -79% down-bytes, no de…
dhruvsgarg Jul 8, 2026
8c0358c
fwdllm Opt-2: variance-plateau force-commit (default ON for fluxtune)
dhruvsgarg Jul 8, 2026
8f6695e
fwdllm Opt-2: reducer --max-databins + commit_reason split
dhruvsgarg Jul 8, 2026
beb101a
fwdllm Opt-3: gradient-aware aggregation (grad_aware rate, default off)
dhruvsgarg Jul 8, 2026
23aaf82
fwdllm: make grad_aware the fluxtune default; define 4-run 2x2 ablation
dhruvsgarg Jul 8, 2026
bdaeff0
fwdllm: crisp-rewrite EXPTS_CHARTER (673->111 lines), drop changelog
dhruvsgarg Jul 8, 2026
af4047c
fwdllm: --var-stopping-policy / --agg-rate-type CLI flags for the 4-r…
dhruvsgarg Jul 8, 2026
354e0b0
fwdllm figs: opt-ablation figure set + peak-acc cutoff/highlight
dhruvsgarg Jul 8, 2026
67bde5c
fwdllm stability track: root-cause I-1, H0 diagnostic, crisp docs
dhruvsgarg Jul 8, 2026
6d3a782
fwdllm: crisp verbose comments/docs for PR review
dhruvsgarg Jul 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 76 additions & 4 deletions lib/python/examples/_metadata/baselines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,17 @@ baselines:
# latency variance is much higher than the n=10 smoke default.
stalenessPolicy: exact
inc_model_version_per_data_id: true
max_iterations_per_data_id: 15
# Iteration-per-data_id cap left UNBOUNDED (None) for the sync baselines:
# the variance-plateau force-commit is a fluxtune optimization (charter
# Opt-2) that did not exist in vanilla FwdLLM, so fwdllm/fwdllm_plus run
# the original unbounded variance gate (grind until variance passes).
var_threshold: 0.3
# Opt-1 comm-redundancy fix (charter §5c): learning-neutral, enabled on
# ALL baselines so E4 bytes are fair. fwdllm re-sent the identical model
# to the same K trainers every iteration (~90% redundant, ~22 GB) because
# the return-driven staleness guard never marked actively-training clients
# current. Set false to revert (byte-on-wire identical off).
suppress_redundant_weights: true
reselect_each_iteration: false
trainer:
hyperparameters:
Expand Down Expand Up @@ -378,8 +387,14 @@ baselines:
# into a model_version-53 cycle) happen in the first place.
stalenessPolicy: round_data_id
inc_model_version_per_data_id: true
max_iterations_per_data_id: 15
# Unbounded (None) — the iteration cap is a fluxtune optimization
# (charter Opt-2), not part of vanilla FwdLLM_Plus; sync baselines run
# the original unbounded variance gate. See fwdllm block above.
var_threshold: 0.3
# Opt-1 comm-redundancy fix (charter §5c), learning-neutral. Already near
# clean here (per-iteration reselect keeps the guard current, ~3.5%), but
# enabled for consistency so the fix covers all baselines. Set false to revert.
suppress_redundant_weights: true
reselect_each_iteration: true
trainer:
hyperparameters:
Expand Down Expand Up @@ -454,9 +469,30 @@ baselines:
# has no fwdllm/agnews entry. Starting point; retune against
# fluxtune's live smoke test.
learning_rate: 0.075
# Aggregation rate (per-update weight). DEFAULT for fluxtune is now C3
# `grad_aware` (Opt-3, charter §5c) -- fluxtune's OWN aggregation. `type: new`
# is the borrowed FeLiX scalar staleness×utility (magnitude only, charter N2)
# and is NOT a fluxtune contribution; set it only for the FeLiX-baseline
# ablation arm. grad_aware weights by DIRECTION/reliability, bounded ≤ base so
# the effective LR never inflates (no LR re-tune):
# base: new # keep staleness×utility as the base (mobiperf async);
# # `neutral` = 1.0 (pure gradient-aware, no staleness)
# align_gate: true # S2 (primary): down-weight updates whose cos vs the
# # running aggregate < align_floor -> 0 at cos=-1
# # (fixes H1: averaging anti-aligned JVP estimates)
# align_floor: 0.0 # gate below this cosine (0 = gate only anti-aligned)
# inverse_var: false # S1 (optional stronger C3): *min(1, var_ref/(var_i+eps))
# var_ref: 0.3 # reliability reference (defaults to var_threshold)
# `grad_aware_gated_total` + `agg_rate_type` emitted on agg_round.
# ABLATION: to revert this arm to FeLiX aggregation set `type: new`.
agg_rate_conf:
type: new
scale: 0.4
type: grad_aware
base: new
align_gate: true
align_floor: 0.0
inverse_var: false
var_ref: 0.3
scale: 0.4 # base=new (staleness×utility) params
a_exp: 0.25
b_exp: 0.1
hyperparameters:
Expand All @@ -473,6 +509,42 @@ baselines:
stalenessPolicy: none
inc_model_version_per_data_id: true
var_threshold: 0.3
# --- fluxtune optimizations (charter §5c; flag gated) ---
# Opt-1: suppress byte-identical intra-databin weight re-sends (shared
# sync+async fix, enabled on all baselines). Within a data-bin the
# model_version is constant and the full WEIGHTS+GRAD_POOL payload is
# identical across iterations; a trainer that already received it this
# cycle is downgraded to the tiny VAR=bad "keep training" message (it
# caches its weights). Learning-neutral; here it was 71% redundant / ~68 GB.
# Set false to revert (byte-on-wire identical off).
suppress_redundant_weights: true
# Opt-2 — variance-plateau force-commit (charter §5c/§5e; DEFAULT ON for
# fluxtune). The plain var<=threshold gate is a FIXED ABSOLUTE bar: as the
# model converges, gradients shrink but the perturbation-noise floor doesn't,
# so a bin needs ever-more JVP samples to average down to 0.30 (measured
# 15->34 iters/bin early->late at α=1) -> 95.7% of aggregation iterations
# commit nothing. This policy adds TWO commit triggers on top of var<=thr:
# * plateau (PRIMARY, helps early): commit once the per-bin variance curve
# FLATTENS -- relative var drop over the last `var_plateau_patience` (N)
# iters < `var_plateau_rel_delta` (ε) while var is still above threshold.
# Scale-invariant, so it commits the DENOISED estimate at whatever iter it
# flattens (early bins ~12-17). This is the "more denoising buys nothing" cut.
# * cap (LATE-STAGE BACKSTOP): `max_iterations_per_data_id`. Late in training
# the plateau onset drifts out (~33 iters) -- the model is already stable so
# waiting that long is wasteful; the cap force-commits at 20 first. Sits
# ABOVE the early plateau fire (so plateau stays primary) and BELOW the late
# grind (so it caps the tail). Whichever trigger fires first wins; the
# `commit_reason` field on agg_round telemetry records which (natural/cap/plateau).
# Learning is compared against the earlier var<=0.3-only fluxtune run (no A/B).
# TO DISABLE (revert to var<=thr only, byte-identical): var_stopping_policy: off.
# TO TUNE: lower ε -> plateau fires later/less; raise ε -> earlier/more (ε=0.25
# fires ~94% at iter ~11). Lower the cap -> more late-stage forcing (and it
# engages on shorter bins, e.g. the smoke). Re-characterize at the more-IID
# ablations (α∈{10,100}) where the floor drops and the grind may soften.
var_stopping_policy: plateau
var_plateau_patience: 3 # N: look-back window for the flatten test
var_plateau_rel_delta: 0.15 # ε: commit when rel var-drop over last N < ε
max_iterations_per_data_id: 20 # late-stage force-commit ceiling
trainer:
hyperparameters:
select_perturbation_using_jvp: true
Expand Down
7 changes: 7 additions & 0 deletions lib/python/examples/async_cifar10/PARITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ Last green (Jun 24): selector+mode+sim+parity **351 pass / 7 skip** (incl. `Test
A fix that could perturb another baseline → serialize (one baseline per run round).
4. **Shortest run that exhibits the issue** (table below). Reserve long runs for C1/C2.
5. **Crisp comments (≤1 sentence); context-free names** (Naming discipline below).
6. **Telemetry-FIRST; a cluster run is the LAST resort, never the debugger.** Before launching anything to
validate/refute a hypothesis, name the exact stored field/log-line that would confirm it and go read the
banked telemetry — most roots are already visible there. Ship every new mechanism WITH its telemetry +
plot + pytest in the same change (over-instrument: cheap to log, expensive to re-run for), so the next
root is catchable from disk. Launch ONLY to observe an emergent quantity no stored telemetry can yield
(fresh convergence / concurrency-after-a-change / a longer trajectory), then the shortest length that
shows it. (fwdllm restates this as its principle #11.)

### Run-length budget (state min duration up front, keyed here; never default to 3–4h)
| validating | min run | why |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,10 @@ python -m scripts.parity.cli \
(real vs sim), overlap-factor bars, GPU-vs-budget, convergence-by-round.
- Exit code per §3 verdict rule.

`compare_overnight.sh` is rewritten to call this one command per (baseline) pair
and to drop its separate `compare_parity.py` invocation.
Post-run parity is now invoked via `debug_run.sh --after parity` (the old
standalone `compare_overnight.sh` was deleted — its per-baseline sim-vs-real
parity + cross-baseline plots are absorbed into `--after parity,plot`, on the
maintained `scripts.parity.cli` engine).

### 4.2b Multi-baseline invocation (test parity per selector as we converge)

Expand Down Expand Up @@ -433,7 +435,8 @@ test import path. The `analyze_*.py` scripts are **kept** but demoted to
4. **Build `report.py` + `cli.py`** single output; fix the convergence
self-compare bug (C3). Add `--batch` multi-baseline mode (§4.2b).
5. **Add per-selector test layer** (`tests/mode/test_selector_invariants.py`, §4.2c).
6. **Rewrite `compare_overnight.sh`** to the single command; demote `analyze_*`
6. **`compare_overnight.sh` deleted** — folded into `debug_run.sh --after parity,plot`
(shared `examples/scripts/expt_runner.sh` dispatcher); demote `analyze_*`
behind `--diagnostics`.
7. **Delete** the superseded files (§4.4); update any docs/HANDOFF references.
8. **Run** the new checker (`--batch`) on felix + refl pairs; paste the FAILing
Expand Down
73 changes: 0 additions & 73 deletions lib/python/examples/async_cifar10/scripts/compare_overnight.sh

This file was deleted.

Loading