diff --git a/src/qwen35/q36_engine.cu b/src/qwen35/q36_engine.cu index 7bb26ec3..61af1115 100644 --- a/src/qwen35/q36_engine.cu +++ b/src/qwen35/q36_engine.cu @@ -1543,7 +1543,9 @@ struct Engine { static const bool all = std::getenv("STRATA_Q36_STREAM_ALL") != nullptr; const int ne = (int) m->g.n_expert; const Hy& H = hy[(size_t) stream_seq[(size_t) i]]; - if (all || L.n_slots <= 0) { + // fewer than half the experts resident (a 12 GB card): the one whole-layer copy is faster than many small ones + // (RTX 3060, UD-Q4_K_XL at 37 of 256: pp2048 1970 whole vs 1540 in runs) + if (all || 2 * L.n_slots < ne) { CK(cudaMemcpyAsync(stage[b], L.hblobs, L.stride * (size_t) ne, cudaMemcpyHostToDevice, cst)); } else { for (int x = 0; x < ne;) {