Repository navigation
Conversation
…raph beside a retained learning graph left them null The M5, 2026-11-29 21:26Z, core d7d5b23716 on this fork at 897c5bc: the core segfaulted about a second after every boot (243 restarts) in llama_adapter_seq_sets::group, reading seq_id[i][0] through null. The stack: opt_measure_memory -> graph_params -> seq_adapters_graph_params -> group, from the trainer's first measure_shadow_graph. opt_measure_memory builds two graphs from ubatch_reserve, whose rows carry no sequence (seq_id null, n_seq_id 0). The learning graph set each row to sequence 0; the serving graph it prices beside it set only the outputs. With no stream naming genes, group() returned before reading a row; once a stream names hers (#172), every graph row's set is read. - one_sequence_with_outputs: the one place a measured ubatch gets its rows' sequence and outputs, used by both graphs. - group() asserts the contract (every graph row carries its sequence), so a caller that breaks it aborts naming it, never reads through null. - test-seq-adapters: the batch arm measures a shadow graph while mind 0 names her set, as the trainer's seat does. Without the fix it aborts on that assert (exit 134); with it the measure reports rows, and the test passes (qwen2.5-0.5b q4_k_m, Metal, M5). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A learning measure's graphs carry their rows' sequence: the serving graph beside a retained learning graph left them null
The M5, 2026-11-29 21:26Z, core d7d5b23716 on this fork at 897c5bc: the core segfaulted about a second after every
boot (243 restarts) in llama_adapter_seq_sets::group, reading seq_id[i][0] through null. The stack: opt_measure_memory
-> graph_params -> seq_adapters_graph_params -> group, from the trainer's first measure_shadow_graph.
opt_measure_memory builds two graphs from ubatch_reserve, whose rows carry no sequence (seq_id null, n_seq_id 0). The
learning graph set each row to sequence 0; the serving graph it prices beside it set only the outputs. With no stream
naming genes, group() returned before reading a row; once a stream names hers (#172), every graph row's set is read.
never reads through null.
Without the fix it aborts on that assert (exit 134); with it the measure reports rows, and the test passes
(qwen2.5-0.5b q4_k_m, Metal, M5).
Why not at the reserve itself:
ubatch_reserveis upstream code (llama-batch.cpp), and fork additions stay in our own files. The callers that build graphs from a reserve are ours (llama-context-opt-measure.cpp) or already give rows their sequence (graph_reservethroughubatch_prepare_reserve), andgroup()asserts the contract for every graph built.🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo