Skip to content

Commit

Permalink
fix/janhq#1650-hogging-resources (janhq#1663)
Browse files Browse the repository at this point in the history
  • Loading branch information
hiento09 authored Jan 18, 2024
1 parent 81e2b8d commit 42c416e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extensions/inference-nitro-extension/src/node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 42c416e

Please sign in to comment.