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 c2e690b

Browse filesBrowse files
authored
Merge pull request abetlen#29 from MillionthOdin16/main
Fixes and Tweaks to Defaults
2 parents 38f7dea + 2e91aff commit c2e690b
Copy full SHA for c2e690b

File tree

Expand file treeCollapse file tree

4 files changed

+8
-7
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+8
-7
lines changed

‎.gitignore

Copy file name to clipboardExpand all lines: .gitignore
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,4 +163,4 @@ cython_debug/
163163
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
164164
# and can be added to the global gitignore or merged into this file. For a more nuclear
165165
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
166-
#.idea/
166+
.idea/

‎examples/high_level_api/fastapi_server.py

Copy file name to clipboardExpand all lines: examples/high_level_api/fastapi_server.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
class Settings(BaseSettings):
2828
model: str
2929
n_ctx: int = 2048
30-
n_batch: int = 2048
31-
n_threads: int = os.cpu_count() or 1
30+
n_batch: int = 8
31+
n_threads: int = int(os.cpu_count() / 2) or 1
3232
f16_kv: bool = True
33-
use_mlock: bool = True
33+
use_mlock: bool = False # This causes a silent failure on platforms that don't support mlock (e.g. Windows) took forever to figure out...
3434
embedding: bool = True
3535
last_n_tokens_size: int = 64
3636

‎llama_cpp/server/__main__.py

Copy file name to clipboardExpand all lines: llama_cpp/server/__main__.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
class Settings(BaseSettings):
2828
model: str
2929
n_ctx: int = 2048
30-
n_batch: int = 2048
31-
n_threads: int = os.cpu_count() or 1
30+
n_batch: int = 8
31+
n_threads: int = int(os.cpu_count() / 2) or 1
3232
f16_kv: bool = True
33-
use_mlock: bool = True
33+
use_mlock: bool = False # This causes a silent failure on platforms that don't support mlock (e.g. Windows) took forever to figure out...
3434
embedding: bool = True
3535
last_n_tokens_size: int = 64
3636

‎setup.py

Copy file name to clipboardExpand all lines: setup.py
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
entry_points={"console_scripts": ["llama_cpp.server=llama_cpp.server:main"]},
2020
install_requires=[
2121
"typing-extensions>=4.5.0",
22+
"pydantic==1.10.7",
2223
],
2324
extras_require={
2425
"server": ["uvicorn>=0.21.1", "fastapi>=0.95.0", "sse-starlette>=1.3.3"],

0 commit comments

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