Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.
C++
#136: the fused experts take a 512-slot streamed ring (a whole layer's experts) by default
Niko12216f6691753040
diff --git a/src/prefill/prefill.cpp b/src/prefill/prefill.cppindex b5f4fa6d9..a4859cea4 100644--- a/src/prefill/prefill.cpp+++ b/src/prefill/prefill.cpp@@ -102,6 +102,12 @@ double g_pinned_share = 1.0;// and 96 when a large share goes through host copies (IQ3_S on 64 GB, a third unpinned: 96 slots 1216, 256 1070 -// the host copies are the limit and the bigger ring only takes cache slots). STRATA_PREFILL_RING overrides.int g_ring_override = 0; // #340: set by a layer split (Prefill::set_ring_override); 0 = the rule below+// #136: the fused experts (STRATA_PF_FUSED=1) launch on a batch of a layer's streamed experts at once, so the ring+// should hold a whole layer's (~460 of 512 on Q2_0): with 384 slots a layer's last batch waits for slots its own+// first batch frees. Measured on the 5070, Q2_0, the 4K / 32K code-agent prompts (one run each): fused at 384 slots+// +5% / +3% over MMQ, at 512 +19-22% / +11-12% (MMQ itself at 512: -2% / -1%). 1024 slots (RING_MAX 1024): 4K+// +24-27%, but 32K -> +6%: its chunk falls from 8192 to 6144.+inline bool fused_ring() { return fused::enabled() && !strata::kernels::cpu::expert_layout().native; }inline int ring_slots(size_t T) {const char* v = std::getenv("STRATA_PREFILL_RING");#if defined(STRATA_USE_HIP)@@ -113,7 +119,8 @@ inline int ring_slots(size_t T) {}();if (!v && g_ring_override <= 0 && wmma) return (int64_t) T >= stream_all_min() ? 96 : STAGE;#endif- const int r = v ? std::atoi(v) : g_ring_override > 0 ? g_ring_override : (g_pinned_share >= 0.9 ? 384 : 96);+ const int pinned_ring = fused_ring() ? 512 : 384;+ const int r = v ? std::atoi(v) : g_ring_override > 0 ? g_ring_override : (g_pinned_share >= 0.9 ? pinned_ring : 96);if (v && r == STAGE) return STAGE; // Explicit opt-in to routed-only staging, including large chunks.const int big = r < 16 ? 16 : r > RING_MAX ? RING_MAX : r;return (int64_t) T >= stream_all_min() ? big : STAGE;