fix/#1650-hogging-resources (#1663)

This commit is contained in:
hiento09 2024-01-18 19:10:37 +07:00 committed by GitHub
parent 81e2b8d885
commit 42c416ebd5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -123,7 +123,7 @@ async function runModel(
llama_model_path: currentModelFile,
...wrapper.model.settings,
// This is critical and requires real system information
cpu_threads: nitroResourceProbe.numCpuPhysicalCore,
cpu_threads: Math.max(1, Math.round(nitroResourceProbe.numCpuPhysicalCore / 2)),
};
return runNitroAndLoadModel();
}