Skip to content

Preserve pooled embeddings and KV writes while omitting unused logits - #156

Merged
joelteply merged 1 commit into
fable/kv-stream-blocksfrom
codex/bigmama-pooled-embedding
Nov 19, 2026
Merged

joelteply merged 1 commit into
fable/kv-stream-blocksfrom
codex/bigmama-pooled-embedding

Conversation

@joelteply

Copy link
Copy Markdown

Restore the pooled-only graph from the prior native implementation. Preserve KV write roots. Keep ordinary generation on the existing graph.

BigMama ran the changed native library in its locally built core before check-in. On the real Qwen3-Embedding-0.6B GGUF, all three numerical comparisons had zero maximum absolute delta. At 2,048 tokens the CUDA planner reported KV plus compute moving from 1,494,179,968 to 352,370,816 bytes. This is a graph allocation estimate. The serving engine remained on the previously deployed binary. Training admission is measured separately.

@joelteply

Copy link
Copy Markdown
Author

Review at 51c7089 (Fable): approve. Verified: embeddings_only is refused at construction unless embeddings and explicit pooling are set; output_reserve drops logits for it; build_graph keeps every node outside the logits ancestry plus the pooled ancestry as roots, in original order, so KV writes (roots, not ancestors of reads) survive the prune. Decode guards the null logits tensor (llama-context.cpp:1543, 1967) and set_outputs skips it (llama-graph.cpp:1388). The default-params initializer gets the field in struct order.

@joelteply
joelteply merged commit a850924 into fable/kv-stream-blocks Nov 19, 2026
14 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant