Just in case

This commit is contained in:
Kawrakow
2026-02-21 18:14:14 +00:00
parent d93fe37ba7
commit 52285a5ee7

View File

@@ -422,7 +422,7 @@ struct llama_model {
size_t max_nodes(int n_tokens) const {
auto n_tensors = tensors_by_name.size();
if (split_mode == LLAMA_SPLIT_MODE_GRAPH) n_tensors *= devices.size();
if (split_mode == LLAMA_SPLIT_MODE_GRAPH && !devices.empty()) n_tensors *= devices.size();
if (arch == LLM_ARCH_QWEN3NEXT || arch == LLM_ARCH_QWEN35MOE) {
return std::max<size_t>(n_tokens * 40, 32u * n_tensors);
}