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

verify: initialize remote expert helper state in both batch paths

saikiran-rs730700126b12
diff --git a/src/core/verify.cpp b/src/core/verify.cpp
index bc84c3617..f96094a39 100644
--- a/src/core/verify.cpp
+++ b/src/core/verify.cpp
@@ -2717,7 +2717,11 @@ bool Verifier::run_slot_rows(const int* rows, int S, const int32_t* tokens, cons
cur_layer_ = want - 1;
set_plan_slot(0);
progress_at("verify batch: the CPU experts of layer", l);
+ // The recorded graph consumes the helper mask and weighted sum just as
+ // the solo graph does. Reset both and supply this layer's routing weights.
+ if (remote_opt_) remote_opt_->begin(h_w_, 0, S);
if (pool != nullptr) pool(user, h_x_, h_ids_, S, ss_->k, h_ymiss_, l);
+ if (remote_opt_) remote_opt_->end();
progress_tick();
std::atomic_thread_fence(std::memory_order_seq_cst);
_mm_sfence();
@@ -2869,7 +2873,9 @@ int Verifier::batch_poll(PoolMultiFn pool, void* user, std::string& err) {
const Clock::time_point b = Clock::now();
cur_layer_ = want - 1;
set_plan_slot(0);
+ if (remote_opt_) remote_opt_->begin(h_w_, 0, S);
if (pool != nullptr) pool(user, h_x_, h_ids_, S, ss_->k, h_ymiss_, lb_ + b_k_);
+ if (remote_opt_) remote_opt_->end();
progress_tick();
std::atomic_thread_fence(std::memory_order_seq_cst);
_mm_sfence();