diff --git a/src/llama-context.cpp b/src/llama-context.cpp index 6976220e8..3e97681a8 100644 --- a/src/llama-context.cpp +++ b/src/llama-context.cpp @@ -3232,7 +3232,14 @@ bool llama_context::sched_copy_experts(ggml_backend_t backend, const ggml_tensor // Later loop passes can select different experts from the same device copy. // TODO: copy only the experts needed by each pass (see #32807 and #32809). - if (lctx->model.arch == LLM_ARCH_INKLING2_LOOP) { + // [fork F13] with the per-pass host-weight views every pass has its own copy, so the partial + // copy is correct again; LLAMA_LOOP_FULL_COPY=0 skips this guard (A/B knob, only correct with + // the views on, LLAMA_LOOP_HOST_VIEWS unset or 1) + static const bool loop_full_copy = [] { + const char * env = getenv("LLAMA_LOOP_FULL_COPY"); + return env == nullptr || strcmp(env, "0") != 0; + }(); + if (loop_full_copy && lctx->model.arch == LLM_ARCH_INKLING2_LOOP) { return false; }