Skip to content

feat(serving): GDN uniform-offload guard — artifact data forbids partial -ngl (#238) - #2108

Merged
joelteply merged 1 commit into
canaryfrom
fix/gdn-uniform-offload-guard
Aug 2, 2026
Merged

feat(serving): GDN uniform-offload guard — artifact data forbids partial -ngl (#238)#2108
joelteply merged 1 commit into
canaryfrom
fix/gdn-uniform-offload-guard

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

BigMama's registered 5090 issue 3. Partial layer offload crashes GDN/SSM hybrids (fused op can't span CPU/GPU — node->buffer->buft assertion). Legal shapes: all-resident-on-GPU (expert paging fine — different axis) or route-to-grid.

Detection is pure artifact data, never arch-name matching (#70): zeros in the per-layer attention.head_count_kv array are the model's own declaration of recurrent layers. gguf_keys grows the canonical array-form reader (scalar-vs-array is the signal); MoeArchProfile.uniform_offload_required carries it to every launcher/placement consumer — her device_fit wire consumes the flag and refuses partial -ngl with the remedy named.

Test pins both directions: K3-shaped array-with-zeros → required; qwen3moe scalar → not. 4/4 in the mod.

Completes my fix side of all three registered 5090 issues (issue 1 = her wire, I review; issue 2 = #2107 merged).

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…the per-layer KV-head array forbid partial -ngl (#238, 5090 issue 3)

Partial layer offload CRASHES GDN/SSM hybrids: the fused recurrent op
cannot span CPU/GPU buffers (node->buffer->buft assertion, registered
live from the 5090 against Kimi-K3). The legal serving shapes for such a
model are all-resident-on-GPU (expert paging is fine — that's the expert
axis, not the layer axis) or route-to-grid.

Detection is the artifact's own self-description, never an arch-name
match (#70): the per-layer attention.head_count_kv ARRAY containing
zeros IS the model declaring recurrent layers. gguf_keys grows the
canonical array-form reader (scalar-vs-array is itself the signal — a
scalar is a uniform GQA model and must not set the flag), and
MoeArchProfile carries uniform_offload_required for every launcher /
placement consumer. BigMama's device_fit wire and any future -ngl
emitter consume the flag and refuse partial with the remedy named.

Test pins both directions: K3-shaped array-with-zeros → required;
qwen3moe-shaped scalar → not.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit 8024d29 into canary Aug 2, 2026
3 of 4 checks passed
@joelteply
joelteply deleted the fix/gdn-uniform-offload-guard branch August 2, 2026 11:58
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