Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 314ce7d

Browse filesBrowse files
committed
Fix cpu count default
1 parent 3fbc063 commit 314ce7d
Copy full SHA for 314ce7d

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎llama_cpp/llama.py

Copy file name to clipboardExpand all lines: llama_cpp/llama.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def __init__(
7474
self.tokens_consumed = 0
7575
self.n_batch = min(n_ctx, n_batch)
7676

77-
self.n_threads = n_threads or multiprocessing.cpu_count()
77+
self.n_threads = n_threads or max(multiprocessing.cpu_count() // 2, 1)
7878

7979
if not os.path.exists(model_path):
8080
raise ValueError(f"Model path does not exist: {model_path}")

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.