Skip to content

Commit cc9b49d

Browse files
committed
docs: split m05 external fastmtp parity
1 parent 7315eb6 commit cc9b49d

5 files changed

Lines changed: 14 additions & 6 deletions

File tree

bench/parity/m05_fastmtp.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
"gb10_mtp_parity_claim": false,
117117
"gb10_parity_claim": false,
118118
"issue": {
119-
"id": "cppmega-mlx-t8f.5",
119+
"id": "cppmega-mlx-hjfn",
120120
"title": "M0.5: fail-closed FastMTP parity scaffold"
121121
},
122122
"local_only": true,
@@ -128,7 +128,7 @@
128128
"m4_vs_gb10_mtp_parity_claim": false,
129129
"m4_vs_gb10_parity_claim": false,
130130
"metadata": {
131-
"git_commit": "2728cfe",
131+
"git_commit": "7315eb6",
132132
"metadata_preflight_only": true,
133133
"scaffold_only": true,
134134
"script": "scripts/m05_mtp_parity_manifest.py"

cppmega_mlx/training/parity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
"valid_not_evaluated": "refused_not_evaluated",
126126
}
127127
M05_MTP_PARITY_RECEIPT_SCOPE = "local_cuda_mlx_m05_fastmtp"
128-
M05_MTP_PARITY_ISSUE_ID = "cppmega-mlx-t8f.5"
128+
M05_MTP_PARITY_ISSUE_ID = "cppmega-mlx-hjfn"
129129
M05_MTP_PARITY_OUTPUT = "bench/parity/m05_fastmtp.json"
130130
M05_MTP_PARITY_PROFILE = "local_gb10_quarter"
131131
M05_MTP_DEPTH = 2

docs/mlx_port_master_plan.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ Before fanning out across all 10 streams, prove the smallest viable path on the
237237
- M0.2 — Model factory entry for local_gb10_quarter in cppmega_mlx/recipes/model_factory.py. With M0.1 closed, the default profile is unblocked; acceptance remains the profile contract plus build → forward closure on shape (B=1, T=512) returning finite logits with config schema validation rejecting invalid combos.
238238
- M0.3 — **External reference closure, not a Mac-local blocker**. Random-init seed-matched forward parity remains useful for comparing MLX against a CUDA/GB10 reference, but it does not gate local MLX/Metal M0.4 training progress. The fail-closed scaffold constructs the same local_gb10_quarter config and fixed B=1,T=512,seed=3003 input batch (tokens_sha256=c645ca4053e5206dcbe58c13aa26f4a9e56c5aa2aee90a4d4778bbc9d9c33549). No real CUDA logits artifact exists at bench/parity/cuda/m03_local_gb10_quarter_seed3003_logits.json, so scripts/m03_forward_parity_manifest.py must refuse the default missing artifact and keep m0_3_closed=false. A metadata-valid CUDA artifact only reaches artifact_preflight_status=valid_not_evaluated; it is not external reference acceptance until a separate numerical harness compares the full logits tensor (shape=[1,512,65536], numel=33554432) against MLX and records pass/fail parity. The non-blocking bd follow-up is cppmega-mlx-uwhj; the old Mac-local blocker task cppmega-mlx-t8f.3 is superseded by that external-reference task, not closed as completed parity evidence.
239239
- M0.4 — One training step in bf16 (loss + backward + optimizer.update). No NaNs. Loss decrease over 100 steps on the target local parquet sample. **Data source**: local ignored data/parquet_samples/gb10/clang_semantic_4k_v10/val_00000.parquet (~492 MB total of GB10 validation shards when present locally; not committed to git). Full local_gb10_quarter acceptance is captured in bench/baselines/m04_train_step.json with --grad-checkpoint on the target parquet: 100/100 steps, loss 11.2004585 -> 6.9402304, finite loss/grad path, AdamW with FP32 master moments, mean step time 10.72670 s, 16.28 target tokens/s, and peak process memory 23,917,647,383 bytes. No GB10 scp or full-corpus prep needed for M0.
240-
- M0.5 — MTP K=2 head wired with β=0.6 / λ=0.3; per-depth losses tracked. MTP-disabled inference path also returns sane logits. Current local coverage is bounded to MLX training-side loss semantics plus fail-closed manifest hardening, including nested CUDA/MLX overclaim rejection. External CUDA/GB10 FastMTP loss+grad-norm closure remains open until a fixed-seed artifact exists and an MLX-vs-CUDA numerical harness evaluates it; that external reference closure does not block Mac-local M0.4 training acceptance.
240+
- M0.5 — MTP K=2 head wired with β=0.6 / λ=0.3; per-depth losses tracked. MTP-disabled inference path also returns sane logits. Current local coverage is bounded to MLX training-side loss semantics plus fail-closed manifest hardening, including nested CUDA/MLX overclaim rejection. External CUDA/GB10 FastMTP loss+grad-norm closure remains open until a fixed-seed artifact exists and an MLX-vs-CUDA numerical harness evaluates it; that external reference closure does not block Mac-local M0.4 training acceptance. The non-blocking bd follow-up is cppmega-mlx-hjfn; the old mixed-scope blocker task cppmega-mlx-t8f.5 is superseded by that external-reference task, not closed as completed FastMTP parity evidence.
241241
- M0.6 — Memory math validated on the actual dev box (Mac Studio M4 Max 128 GB): peak unified-memory < 75% of installed RAM with --grad-checkpoint and AdamW.
242242
- M0.7 — Resumable training: save mid-run, kill process, reload, identical loss continues for ≥100 steps with RNG state and dataloader cursor preserved. Current receipts are TinyLM/HybridTinyLM-scoped only; full M0.7 remains fail-closed until local_gb10_quarter resumes on the target parquet lane after the M0.4 full-model training gate is proven.
243243

docs/parity_anchors.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,10 +441,13 @@ launchers.
441441
production cadence scheduling, sequence-parallel gather, or CUDA/Hopper/GB10
442442
kernel parity. Treat Hopper fused CE as source-only evidence until a separate
443443
hardware-gated receipt exists.
444-
- Fail-closed M0.5 receipt: no checked-in or locally observed fixed-seed
444+
- Fail-closed M0.5 receipt: the active non-blocking external-reference bd task
445+
is cppmega-mlx-hjfn; the older mixed-scope blocker cppmega-mlx-t8f.5 is
446+
superseded by that task, not closed as completed FastMTP parity evidence. No
447+
checked-in or locally observed fixed-seed
445448
CUDA/GB10 artifact currently records the required FastMTP loss values plus
446449
grad norm for cppmega/megatron/fastmtp_layer.py and
447-
cppmega/megatron/mtp_native_hopper_ce.py. M0.5 remains open until that
450+
cppmega/megatron/mtp_native_hopper_ce.py. External M0.5 remains open until that
448451
artifact exists and a numerical MLX-vs-CUDA comparison is evaluated; the
449452
local tests above are contract coverage, not closure evidence.
450453
- Hardening receipt: the M0.5 manifest builder/validator now rejects nested

tests/test_m05_mtp_parity_manifest_script.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
ROOT = Path(__file__).resolve().parents[1]
2727
SCRIPT = ROOT / "scripts" / "m05_mtp_parity_manifest.py"
2828
PYTHON = ROOT / ".venv" / "bin" / "python"
29+
EXTERNAL_M05_FASTMTP_TASK_ID = "cppmega-mlx-hjfn"
2930

3031

3132
def run_script(*args: str, timeout: int = 30) -> subprocess.CompletedProcess[str]:
@@ -87,6 +88,10 @@ def write_json(path: Path, payload: Any) -> None:
8788
path.write_text(json.dumps(payload) + "\n", encoding="utf-8")
8889

8990

91+
def test_m05_manifest_tracks_current_external_reference_task() -> None:
92+
assert M05_MTP_PARITY_ISSUE_ID == EXTERNAL_M05_FASTMTP_TASK_ID
93+
94+
9095
def assert_m05_fail_closed_invariants(payload: dict[str, Any]) -> None:
9196
validate_m05_mtp_parity_manifest_dict(payload)
9297
assert payload["issue"]["id"] == M05_MTP_PARITY_ISSUE_ID

0 commit comments

Comments
 (0)