Skip to content

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++

native packs: the sized cache's budget counts the 256-byte slots it is filled with - an NVFP4 blob (2,764,816 B with its scale tail) got one slot fewer than asked, none at --expert-cache 1

Niko1221e48c803e018a
diff --git a/src/program/generate.cpp b/src/program/generate.cpp
index 615a2da0c..ad06c3a14 100644
--- a/src/program/generate.cpp
+++ b/src/program/generate.cpp
@@ -5079,7 +5079,10 @@ int main(int argc, char** argv) {
size_t free_b = 0, total_b = 0;
free_b = strata::core::device_free_bytes(); (void) total_b;
const auto& lay = strata::kernels::cpu::expert_layout();
- const uint64_t budget = (uint64_t) o.expert_cache * lay.max_blob; // what the uniform sizing granted
+ // what the uniform sizing granted, in the 256-byte slots the loop below counts: the blob formats of 1280 / 2560
+ // rows are whole multiples of 256 already; an NVFP4 blob's 16-byte scale tail is not, and the unrounded budget
+ // held one slot fewer than asked (--expert-cache 1: none)
+ const uint64_t budget = (uint64_t) o.expert_cache * ((lay.max_blob + 255) / 256 * 256);
uint64_t used = 0;
const size_t keep_free = ((size_t) o.vram_reserve_mib << 20) + (size_t) pipe_first;
size_t free_room = free_b > keep_free ? free_b - keep_free : 0;