Skip to content

chore(engine): pin the engine with the exact walk and its gradient fixes (fork #40 #43 #45 #46 #47) - #4845

Merged
joelteply merged 1 commit into
canaryfrom
chore/engine-exact-walk
Oct 7, 2026
Merged

joelteply merged 1 commit into
canaryfrom
chore/engine-exact-walk

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Moves the engine pin from 2d4d63bbb to 5e3961b10. All five PRs are reviewed and merged on the fork's engine line:

fork PR what
#40 the walk: decode context into the cache, then train each reply chunk against the cached prefix. Memory is chunk × window, so her 63k windows fit on one GPU beside serving (one-context training asked for 388 GB there).
#45 per-step graphs start each optimizer period from zero gradients. The accumulators were never zeroed, so every step applied the sum of every gradient since the run began.
#46 CONCAT backward slices a contiguous gradient. V's gradient arrives through the training attention's transpose and was being read from the wrong elements.
#47 the exact walk: one step per window on the window's whole gradient, through every chunk's K/V and a hybrid's recurrent state. Includes the host budget, state checkpointing and an adaptive horizon.
#43 Metal OUT_PROD multiplies in float staging.

Measured (fork test-walk-exact, adapter step = −lr·g against one graph): exact walk cosine 0.998 on the 1.5B and on the hybrid 0.8B, at f32, f16 and q8_0 caches (plain walk: 0.81). End to end through /train, eval loss 0.283 → 0.215 on the 1.5B and 0.284 → 0.245 on the hybrid.

Pairs with #4841, which makes the core ask for exact: true with half the free host memory.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc

@joelteply

Copy link
Copy Markdown
Contributor Author

Review at d797681 (Fable). The range is right. 2d4d63bbb..5e3961b10 is a fast-forward carrying exactly #40, #45, #46 and #47 plus their review fixes, and #43 (285ff850d) is included.

One blocker: core/vendor/LLAMA_CPP_PIN still records 2d4d63bbb9c6474b318ba3b2ba9b81fbc0b6c064. Only the submodule moved, so source-hygiene's vendor_pin test ('core/vendor/llama.cpp points at … but LLAMA_CPP_PIN records …') fails. Write 5e3961b10d3a1067716cccbd0525395354ce9a6c into it in the same commit.

Before merging, per our rule from 9/28: no training job open on a node that deploys canary, or the deploy orphans it. Check /train status on the 5090 and the M5 (or set deploy-hold) at merge time.

Approve once the pin file matches.

…, and the walk itself (fork #40, #43, #45, #46, #47)

2d4d63bbb -> 5e3961b10 on feat/props-weight-residency:
- #40 the walk: decode context into the cache, train each reply chunk against the cached prefix
  (memory chunk x window, so a 63k window trains on one GPU beside serving)
- #45 per-step graphs start each optimizer period from zero gradients (the accumulators were never
  zeroed: every step applied the sum of every gradient since the run began)
- #46 CONCAT backward slices a contiguous gradient (V's gradient through the training
  attention's transpose was read from the wrong elements)
- #47 the exact walk: one optimizer step per window on the gradient of the window's whole loss,
  through every chunk's cached K/V and a hybrid's recurrent state; host budget, state
  checkpointing, adaptive horizon (cosine 0.998 vs one graph, 1.5B and hybrid 0.8B, at f32, f16
  and q8_0 caches; end to end through /train: eval 0.283 -> 0.215 on the 1.5B, 0.284 -> 0.245 on
  the hybrid)
- #43 Metal: OUT_PROD multiplies in float staging

Requested by core #4841 (exact: true with a host budget).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc
@joelteply
joelteply force-pushed the chore/engine-exact-walk branch from d797681 to f2de1ea Compare October 7, 2026 02:12
@joelteply

Copy link
Copy Markdown
Contributor Author

Approve at f2de1ea (Fable). LLAMA_CPP_PIN and the submodule both name 5e3961b10d3a1067716cccbd0525395354ce9a6c, in one commit. Merge on green, after the open-/train check on the 5090 and the M5.

@joelteply
joelteply merged commit 7593b94 into canary Oct 7, 2026
9 of 11 checks passed
@joelteply
joelteply deleted the chore/engine-exact-walk branch October 7, 2026 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant