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

arena: pin by need - blob_at (the async tier's source) follows the padded layout; no padded layout with a shared arena file (one layout for every process)

Niko122155e1283174dc
diff --git a/src/core/expert_source.cpp b/src/core/expert_source.cpp
index a7bc1350e..eb6de98cd 100644
--- a/src/core/expert_source.cpp
+++ b/src/core/expert_source.cpp
@@ -4598,7 +4598,7 @@ bool ArenaExpertSource::open(const std::string& pack_dir, int64_t n_layers, int6
// writes experts.bin from the arena). The file offsets (loff) stay packed; only the destination moves.
padded_ = false;
pad_ = PadMap{};
- if (pin_by_need_ && !pin_pairs_.empty() && !arena_mmap) {
+ if (pin_by_need_ && !pin_pairs_.empty() && !arena_mmap && shared_arena_file.empty()) { // (a shared arena file has one layout for every process: the packed one)
padded_ = true;
uint64_t at = 0;
for (int64_t l = 0; l < n_layers; ++l) {
@@ -4905,7 +4905,7 @@ const uint8_t* ArenaExpertSource::blob_at(int64_t layer, int64_t expert) const {
if (base_ == nullptr || layer < 0 || expert < 0 || expert >= n_expert_) return nullptr;
const int64_t idx = layer * n_expert_ + expert;
if (idx < 0 || idx >= blobs_) return nullptr;
- return base_ + strata::kernels::cpu::expert_layout().blob_offset(layer, expert);
+ return base_ + arena_off(layer, expert); // (the padded layout of pin by need too)
}
} // namespace strata::core