Repository navigation
llama-graph: the hybrid input skips unallocated store indices in a training graph - #13
Conversation
…he plain KV input llm_graph_input_mem_hybrid::set_input wrote k_idxs/v_idxs unconditionally. In a training graph (cparams.training) attention reads this ubatch's K/V directly and never writes the cache, so those indices are left unallocated and the write hit GGML_ASSERT(buffer): the same crash the plain KV path had before #6 guarded llm_graph_input_attn_kv::set_input. Qwen3.5/3.8-class hybrids take this path. Same guard. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
|
APPROVED at 4faed7a. Read: llm_graph_input_mem_hybrid::set_input now skips k/v store indices whose buffer is null, the same guard #6 put on llm_graph_input_attn_kv::set_input; in a training graph build_attn reads this ubatch's K/V directly and never allocates them. Evidence: my first 27B in-engine attempt on the 5090 (trunk without this) aborted at exactly ggml-backend.cpp:204 GGML_ASSERT(buffer) right after adapter attach; the build with this commit cherry-picked got past graph build into the run (it then stopped on the unrelated serving/unload during a deploy). It is also carried in #14, whose in-server training ran clean. |
|
CORRECTION to my comment above: the second 27B attempt never ran the finetune (the script stopped before training because serving/unload had not freed VRAM during a deploy), so 'got past graph build' was not measured. What IS measured: the first attempt aborted at ggml-backend.cpp:204 GGML_ASSERT(buffer), the line this guards. The word stands on the read (it is the same guard as the plain KV path); the 27B running past graph build is still to be shown, on the next 27B run. |
llm_graph_input_mem_hybrid::set_input wrote k_idxs/v_idxs unconditionally; in a training graph attention reads the ubatch K/V directly and those indices are unallocated, so it hit GGML_ASSERT(buffer), the same crash #6 fixed for the plain KV input. Qwen3.5/3.8 hybrids take this path. Found by reading, before the first 27B step; the step itself is the test.
🤖 Generated with Claude Code
https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE