We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5fa248c commit 83d31f6Copy full SHA for 83d31f6
src/main/java/org/myrobotlab/service/Llama.java
@@ -2,6 +2,7 @@
2
3
import de.kherud.llama.LlamaModel;
4
import de.kherud.llama.Parameters;
5
+import org.myrobotlab.framework.Platform;
6
import org.myrobotlab.framework.Service;
7
import org.myrobotlab.logging.Level;
8
import org.myrobotlab.logging.LoggingFactory;
@@ -37,7 +38,7 @@ public Llama(String reservedKey, String inId) {
37
38
public void loadModel(String modelPath) {
39
Parameters params = new Parameters.Builder()
40
.setNGpuLayers(0)
- .setNThreads(java.lang.Runtime.getRuntime().availableProcessors())
41
+ .setNThreads(Platform.getLocalInstance().getNumPhysicalProcessors())
42
.setTemperature(0.7f)
43
.setPenalizeNl(true)
44
.setMirostat(Parameters.MiroStat.V2)
0 commit comments