diff --git a/src/program/generate.cpp b/src/program/generate.cpp index 3a51eb8b..04d50256 100644 --- a/src/program/generate.cpp +++ b/src/program/generate.cpp @@ -3230,7 +3230,12 @@ int main(int argc, char** argv) { const bool asked = ev != nullptr && ev[0] != '\0' ? ev[0] != '0' : o.kv_grow; const bool on = asked && !multi_gpu && o.kv_resident <= 0 && !o.expert_profile.empty() && !o.resident_cpu_experts && o.expert_cache != 0 && !remote && - strata::core::vmm_available(); + strata::core::vmm_available() && + // the batch slots carve their own K/V and --vram-elastic's cache is not one VMM range + o.batch == 0 && !o.vram_elastic && o.peer_device < 0; + if (asked && !on) + std::fprintf(stderr, "strata generate: --kv-grow is off (one GPU, a profile, the whole K/V in VRAM, " + "every expert in RAM, no --batch, --vram-elastic or --peer-device)\n"); const char* iv = std::getenv("STRATA_KV_GROW_INIT"); strata::core::qsa_set_kv_elastic(on, iv != nullptr && std::atoll(iv) > 0 ? std::atoll(iv) : 16384); strata::core::ExpertCache::set_vmm(on);