turnkey resume runbook: restore layout, OOM fix options, full 3.25 chain, operational traps
Browse files- RESUME-RUNBOOK.md +94 -0
RESUME-RUNBOOK.md
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# GLM-5.3-BF16 ShapleyMCG — 3.25 bpw resume runbook
|
| 2 |
+
|
| 3 |
+
State at archive (2026-08-30): all 75 main layers hold sealed K3+K4 candidate
|
| 4 |
+
pairs; MTP78 has a sealed uniform-K4 inventory (plus a decode-verified K5 side
|
| 5 |
+
store); the uniform-K3 draft is published with reconciled KLD evidence. The only
|
| 6 |
+
unfinished chain is: five-node Aumann-Shapley attribution -> exact global
|
| 7 |
+
3.25-bpw allocation -> mixed materialization -> KLD replay -> publication.
|
| 8 |
+
|
| 9 |
+
## 0. Inputs (all public/HF)
|
| 10 |
+
|
| 11 |
+
- This dataset: `tars/candidates-layer-*.tar` (75), `tars/capture-*.tar` (4 roles),
|
| 12 |
+
`tars/mtp78.tar`, `tars/panel.tar`, `tars/evidence.tar`, `tars/attribution-final.tar`,
|
| 13 |
+
`candidates/main-inventory.json`, `code/glm53wt.bundle`, `code/campaign-scripts.tar`
|
| 14 |
+
- Teacher logits: `brandonmusic/GLM-5.3-BF16-full-logits` -> `bf16-nonfinal/`
|
| 15 |
+
(fit 32 / conditional_fit 16 / selection 16 / confirmation 16, fp32 full vocab)
|
| 16 |
+
- Weights: `zai-org/GLM-5.3-BF16` at revision `304b8051cfb2b260b61ce0cbe330e02a98e73639`
|
| 17 |
+
- Transformers checkout at `805a9e939fa8c1bff8d8ffdf041c051b71a914aa` (PYTHONPATH-bound)
|
| 18 |
+
- exllamav3 upstream @c5d9c65, `setup.py build_ext --inplace` ONLY (pip -e tries flash_attn)
|
| 19 |
+
|
| 20 |
+
## 1. Restore layout (any 8-GPU node with >=268 GiB/GPU; B300-class for TP8 BF16)
|
| 21 |
+
|
| 22 |
+
```
|
| 23 |
+
/root/glm53wt <- git clone from code/glm53wt.bundle (ALL node-local
|
| 24 |
+
commits: no-intra-LDLQ env gate, cold-expert
|
| 25 |
+
fallbacks, attribution data_ptr/__func__ fixes)
|
| 26 |
+
/root/campaign <- untar code/campaign-scripts.tar (runners incl. all
|
| 27 |
+
13-attempt fixes already applied)
|
| 28 |
+
/root/glm53-shapleymcg <- untar: panel, evidence, attribution-final,
|
| 29 |
+
candidates (75 layer tars + main-inventory.json),
|
| 30 |
+
capture/mtp78 not needed; mtp78.tar -> mtp78/
|
| 31 |
+
/root/logits/bf16-nonfinal <- hf download the 80 windows
|
| 32 |
+
/root/models/GLM-5.3-BF16 <- hf download at the pinned revision
|
| 33 |
+
```
|
| 34 |
+
Then reseal nothing — the shipped evidence/ closures match the bundle tree.
|
| 35 |
+
Env: `GLM53_NO_INTRA_LDLQ=1`, venv torch 2.12.1+cu132.
|
| 36 |
+
|
| 37 |
+
## 2. Attribution (the one unfinished computation)
|
| 38 |
+
|
| 39 |
+
Known-good up to the OOM: `bash /root/campaign/run_attribution.sh` (fires
|
| 40 |
+
`glm53_attribution_runner_draft.py --mode attribute`, TP8, path-nodes 5,
|
| 41 |
+
fisher-rank 32, probes 2/window; endpoint receipt already in
|
| 42 |
+
attribution-final.tar — or regenerate with `--mode seal-endpoint`, ~25 min CPU).
|
| 43 |
+
|
| 44 |
+
Blocker to fix first (documented in ATTRIBUTION-STATUS.md): OOM at
|
| 45 |
+
264/267.7 GiB in the path-node phase. Fix in
|
| 46 |
+
`campaign/glm53_attribution_runner_draft.py` near the node loop (search
|
| 47 |
+
`retain_graph=True`):
|
| 48 |
+
a. preferred: drop `retain_graph=True`; recompute the blended forward for the
|
| 49 |
+
Fisher-probe backward passes (second forward per node; ~2x node compute,
|
| 50 |
+
~halves peak graph memory), or
|
| 51 |
+
b. wrap the blended forward in `torch.utils.checkpoint.checkpoint`
|
| 52 |
+
(use_reentrant=False) per decoder layer, or
|
| 53 |
+
c. stream the K4 residency per layer instead of fully resident
|
| 54 |
+
(`GLM53TP8PackedK4Residency`).
|
| 55 |
+
All alpha-0/alpha-1 exactness gates stay armed; the f32 softmax path is already
|
| 56 |
+
in the shipped runner (alpha-0 KL is exactly zero by construction).
|
| 57 |
+
|
| 58 |
+
## 3. Allocation -> materialization -> KLD -> publish (all staged, tested paths)
|
| 59 |
+
|
| 60 |
+
```
|
| 61 |
+
PYTHONPATH=src python scripts/allocate_glm53_mcg_exact_3p25.py \
|
| 62 |
+
--scope main --candidate-inventory .../candidates/main-inventory.json \
|
| 63 |
+
--attribution <attribution output> \
|
| 64 |
+
--output .../allocation/main-3p25.json --execute
|
| 65 |
+
|
| 66 |
+
# materialize: /root/campaign/post_attribution.sh already does everything below
|
| 67 |
+
# - 3-layer-wide pool, per-rank materialize_glm53_selected_packed --allocation
|
| 68 |
+
# - MTP78: --uniform-bits 4 with mtp78/candidate-inventory.json
|
| 69 |
+
# - KLD replay fires in parallel from the CANDIDATE store (no materialization
|
| 70 |
+
# dependency): kld_student_capture.py --allocation ... then kld_compare.py
|
| 71 |
+
# + kld_axes.py on the 16 confirmation windows (teacher = bf16-nonfinal)
|
| 72 |
+
# pack for HF with pack_layers.py (HF hard limit: 20,000 files/repo; one
|
| 73 |
+
# consolidated safetensors per layer; xet dedups re-uploads)
|
| 74 |
+
```
|
| 75 |
+
|
| 76 |
+
Expected: uniform-K3 measured 0.0979 (new panel) / 0.0375 (published windows);
|
| 77 |
+
the allocated 3.25 should land near ~0.03 on the new panel given the
|
| 78 |
+
davidsyoung 3.42-mixed reference at 0.0240 on the mild published windows.
|
| 79 |
+
|
| 80 |
+
## 4. Operational traps (all hit once already)
|
| 81 |
+
|
| 82 |
+
- Per-process GPU isolation for 8-wide encode/decode workers:
|
| 83 |
+
`CUDA_VISIBLE_DEVICES=$R ... --device cuda:0` (8 procs with `--device cuda:$R`
|
| 84 |
+
= illegal-access collisions on GPU0).
|
| 85 |
+
- Kill stale rank processes by exact PID from nvidia-smi query-compute-apps
|
| 86 |
+
before any TP8 relaunch (orphans hold ~190 GiB/GPU).
|
| 87 |
+
- Write-once artifacts: rm stale `attribution-run-plan.json` (keep
|
| 88 |
+
`uniform-k4-byte-verification.json`) before every attribution relaunch;
|
| 89 |
+
the endpoint receipt binds the code-closure sha — reseal endpoint after any
|
| 90 |
+
sealed-repo edit.
|
| 91 |
+
- Every sealed-repo edit => reseal 3 code closures + capture-verification
|
| 92 |
+
(fix chain exists: `campaign/fix_reseal_attr.sh`).
|
| 93 |
+
- lm_head is UNTIED (`tie_word_embeddings: false`); MTP hnorm consumes the RAW
|
| 94 |
+
pre-`model.norm` hidden (vLLM `Glm4MoeMultiTokenPredictorLayer` semantics).
|