generate: --kv-resident refused before any weight moves when the model's attention is dense

qsa_kv_streaming_applies (the attention branch) is called right after the geometry is read, so a Qwen3.6 start
with --kv-resident fails with the reason instead of reaching qsa_state_init's backstop.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
This commit is contained in:
Robert KarlandClaude Fable 5.1 committed 2026-10-11 12:54:36 -07:00
1 parent 973303cfb5
commit 7cfb7dccaf
1 file changed
+6
+6
View File
@@ -2076,6 +2076,12 @@ int main(int argc, char** argv) {
if (g.arch != strata::core::ModelArch::Qwen4Exp)
std::fprintf(stderr, "strata generate: model geometry (%s, from the file's metadata):\n%s",
o.native_preset.c_str(), strata::core::model_geometry_text(g).c_str());
// KV streaming is a lever only for selected attention: with no indexer every cell is read every token
// (qsa_state_init refuses as the backstop; this names it before any weight moves)
if (o.kv_resident > 0 && !strata::core::qsa_kv_streaming_applies(g, err)) {
std::fprintf(stderr, "strata generate: %s\n", err.c_str());
return 1;
}
// the fused tensor layouts llama.cpp accepts and this engine refuses by name (no shipped file uses them)
try {
const strata::GgufModel model(o.native_shards);