Skip to content

fix(serving): a train-capable lane with CPU weights serves them unrepacked (card 5b497852) - #5083

Merged
joelteply merged 4 commits into
canaryfrom
cormac/cpu-learn-copy
Oct 19, 2026
Merged

joelteply merged 4 commits into
canaryfrom
cormac/cpu-learn-copy

Conversation

@joelteply

@joelteply joelteply commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

llama.cpp repacks quantized CPU weights into a layout only its CPU kernels
read (CPU_REPACK: get_tensor/cpy_tensor NULL), and training's backward pass
needs the standard layout. Continuum never passed --no-repack, so no lane
whose weights sit on the CPU could learn. Measured IntelMac 2026-10-15,
fork cc2e05ff2 CPU-only, Qwen2.5-0.5B Q4_K_M, -ngl 0:

  • repacked (23:35:32Z): learn fails, "OUT_PROD 'grad for ffn_swiglu-23' on
    blk.23.ffn_down.weight: no backend can run"; on the M5 (Metal present at
    -ngl 0) the same request crashes in ggml_backend_tensor_copy (Fable's trace).
  • --no-repack (23:35:53Z): learn succeeds, loss 1.6083, 1417.7 ms.
  • price (23:36:52Z, server timings, 600-token prompt + 64 generated): prompt
    229.7 -> 212.6 tok/s (3-8%), generation 50.7 -> 49.9 (noise).

One rule, LaneInvocation::no_repack_when_training_on_cpu, applied where the
placement is decided (with_options) and where a probe re-decides it
(constrain_to_cpu): --train-dir and weights on CPU (cpu_only or any tensor
override, the engine's own /train guard) -> --no-repack, once. GPU lanes and
lanes that cannot train keep repack's prompt speed.

Not compiled on IntelMac; source-hygiene 32/32. The engine-side refusal for
learn_on_slot (fork) is the companion change.

Co-Authored-By: Claude Opus 5.5 (1M context) [email protected]
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

Companion: the fork-side refusal for learn_on_slot (shared with server-train.cpp's /train guard) lands on fable/p2-learn-live and arrives with a pin bump.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

joelteply and others added 4 commits October 18, 2026 19:01
…acked (card 5b497852)

llama.cpp repacks quantized CPU weights into a layout only its CPU kernels
read (CPU_REPACK: get_tensor/cpy_tensor NULL), and training's backward pass
needs the standard layout. Continuum never passed --no-repack, so no lane
whose weights sit on the CPU could learn. Measured IntelMac 2026-10-15,
fork cc2e05ff2 CPU-only, Qwen2.5-0.5B Q4_K_M, -ngl 0:
- repacked (23:35:32Z): learn fails, "OUT_PROD 'grad for ffn_swiglu-23' on
  blk.23.ffn_down.weight: no backend can run"; on the M5 (Metal present at
  -ngl 0) the same request crashes in ggml_backend_tensor_copy (Fable's trace).
- --no-repack (23:35:53Z): learn succeeds, loss 1.6083, 1417.7 ms.
- price (23:36:52Z, server timings, 600-token prompt + 64 generated): prompt
  229.7 -> 212.6 tok/s (3-8%), generation 50.7 -> 49.9 (noise).

One rule, LaneInvocation::no_repack_when_training_on_cpu, applied where the
placement is decided (with_options) and where a probe re-decides it
(constrain_to_cpu): --train-dir and weights on CPU (cpu_only or any tensor
override, the engine's own /train guard) -> --no-repack, once. GPU lanes and
lanes that cannot train keep repack's prompt speed.

Not compiled on IntelMac; source-hygiene 32/32. The engine-side refusal for
learn_on_slot (fork) is the companion change.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…d 5b497852)

lane_args.rs held 1,198 lines, 477 of them its test module. The module
moves unchanged (byte-identical body) to lane_args/tests.rs, declared
`#[cfg(test)] mod tests;`, so `use super::*` and every test resolve as
before. lane_args.rs is 721 lines, and the file_size ratchet's count falls
by its whole excess rather than rising by this PR's 46 (plan goal 4).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
@joelteply
joelteply force-pushed the cormac/cpu-learn-copy branch from 55560e5 to e4dab6e Compare October 19, 2026 00:02
@joelteply

Copy link
Copy Markdown
Contributor Author

PASSED at e4dab6e. Reviewed by Fable (M5), 2026-10-18.

Claim verified: BASELINE_LINES_OVER = 159,463 is this head's measured state. An independent count from git (every continuum-core/src/**/*.rs at pr5083, summing lines past 1,000) gives exactly 159,463, matching your source-hygiene run.

It's a pure test move (lane_args tests to lane_args/tests.rs, under #![cfg(test)]), and with #5080's scanner fix the unwrap and spawn counts don't move. Auto-merge is set, pinned to this head.

🤖 Generated with Claude Code

@joelteply
joelteply enabled auto-merge (squash) October 19, 2026 00:09
@joelteply
joelteply merged commit 88f1060 into canary Oct 19, 2026
9 checks passed
@joelteply
joelteply deleted the cormac/cpu-learn-copy branch October 19, 2026 00:45
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