limcheekin commited on
Commit
863c492
1 Parent(s): a89e25b

feat: set n_threads=2

Browse files
Files changed (1) hide show
  1. main.py +1 -2
main.py CHANGED
@@ -2,10 +2,9 @@ from llama_cpp.server.app import create_app, Settings
2
  from fastapi.responses import HTMLResponse
3
  import os
4
 
5
- print("os.cpu_count()", os.cpu_count())
6
  app = create_app(
7
  Settings(
8
- n_threads=os.cpu_count(),
9
  model="model/ggmlv3-model.bin",
10
  embedding=False
11
  )
 
2
  from fastapi.responses import HTMLResponse
3
  import os
4
 
 
5
  app = create_app(
6
  Settings(
7
+ n_threads=2, # set to number of cpu cores
8
  model="model/ggmlv3-model.bin",
9
  embedding=False
10
  )