Conversation
…gn phase) New arm spec only, not executed: needle-in-haystack two-marker probe to determine whether --context-shift silently corrupts Qwen3.8 GDN/recurrent layers (hybrid seq_rm silent failure, bounded by n_rs_seq=3 under draft-mtp) while attention layers shift fine. Covers 2-concurrency vs 1-concurrency cells, MTP-on/off axis, Gate-0 boot check (prod logs show ctx_shift silently disabled at init on all 747.x pins), log-level seq_rm swallow documentation, and concrete pass/fail bars. Baseline = clean v0.4.0 + PR #110.
…only patch Root cause of the boot-time 'KV cache shifting is not supported' disable: llama_model_rope_type() returns IMROPE unconditionally for qwen35/qwen35moe (llama-model.cpp:2972-2976) -> hparam rope MROPE -> n_pos_per_embd()=4 -> llama_kv_cache::get_can_shift() returns false unconditionally (llama-kv-cache.cpp:1193). No config lever exists; verified 'general. architecture = qwen35' in the production GGUF header. Also discovered seq_add()/seq_div() hard-assert n_pos_per_embd()==1, so get_can_shift() bypass alone would abort at the first shift. Adds docs/arms/arm-context-shift-hybrid-testpatch.patch: env-gated (LLAMA_TEST_FORCE_SHIFT_QWEN35) test-harness-only override covering all three sites (get_can_shift, seq_add, seq_div), scoped tightly to qwen35/qwen35moe IMROPE; dormant with env unset; scalar pos shift justified for text-only M-RoPE (all four axes equal). Explicitly flagged: IMROPE K-shift correctness for the 4-axis position case is itself unverified and is a second, separate risk - do not ship.
|
Updated (commit
No rig actions taken; still design phase. Ready for second review. |
Co-Authored-By: opencode <noreply@opencode.ai>
…ash) Co-Authored-By: opencode <noreply@opencode.ai>
Reasoning decode at ~30 t/s dominated wall-clock (~550 tk invisible decode per turn) and would have confounded same-cell/parallel comparisons; no-think template keeps cells comparable and cuts per-turn latency ~4x. Co-Authored-By: opencode <noreply@opencode.ai>
…es immediately after shift 2 With the observed n_keep=0 shift semantics (n_discard=n_left/2), the client must drop the same head span from its message list after each shift or the next request exceeds n_ctx_slot (400, seen in A1 run 35721). M2 survival past shift 2 is only guaranteed when probes run before any third shift, so the probe phase moved directly after the shift-2 trim. Co-Authored-By: opencode <noreply@opencode.ai>
Co-Authored-By: opencode <noreply@opencode.ai>
Co-Authored-By: opencode <noreply@opencode.ai>
Co-Authored-By: opencode <noreply@opencode.ai>
Co-Authored-By: opencode <noreply@opencode.ai>
Full matrix (CTRL, A1, C1, A2, C2) + Gate 0 passed on the live rig with the test patch; verdict scoped to the observed n_keep=0 shift shape (recurrent partial-rollback path NOT exercised — recorded as a scope caveat). Co-Authored-By: opencode <noreply@opencode.ai>
Co-Authored-By: opencode <noreply@opencode.ai>
…tch per close-out Co-Authored-By: opencode <noreply@opencode.ai>
Arm spec —
--context-shifthybrid-state correctness (Qwen3.8-27B GDN hybrid)Design/spec phase only. Not executed. Do not merge to main; no rig actions.
Closes the question: does
--context-shiftproduce CORRECT output for Qwen3.8-27B once triggered, under realistic concurrent load (parallel: 2= production), or does it silently corrupt the recurrent/GDN layers' state while attention layers shift fine?Key premises (verified in source @
d50efc6f0)llama-memory-recurrent.cpp::seq_rmaccepts a partial rollback only ifrollback <= n_rs_seq; with production--spec-type draft-mtp,n_rs_seq = draft.n_max = 3(a 3-token snapshot window) vs a shift discard of typically thousands of tokens.llama_memory_hybrid::seq_rmruns the recurrent cache first and returns false WITHOUT touching the attention cache on recurrent failure.tools/server/server-context.cpp:2970callsslot.mem.seq_rm(...)without checking the return, then proceeds withseq_add+ token-buffer trim → attention-vs-recurrent desync, silently. No log anywhere on the seq_rm refus (documented diagnosability gap, deliberately not fixed in this arm).KV cache shifting is not supported for this context, disabling KV cache shifting(common/common.cpp:1457) — i.e. production'scontext_shift: onis silently converted to OFF at every boot. Gate 0 of this arm verifies whether a small-ctx shape can boot with shift actually enabled, and which lever flips that gate.Arm design summary
--no-spec, n_rs_seq=0) at 1/2. Plus a no-shift baseline control session.llama_memory_recurrentinstance; compares against the 1-concurrency control.ctx262144 → 16384 (2×8192 — shift fires within ~10 chat turns/~20 K tokens instead of 262 K; no UM oversubscription at this size, so UM is dropped as a confound). RPC topology27,38unchanged.Same bug-class as fork findings ggml-org#469 / ggml-org#641 and upstream ggml-org/llama.cpp ggml-org#22384 / ggml-org#24055 / ggml-org#20428.