Update app.py
Browse files
app.py
CHANGED
|
@@ -28,7 +28,7 @@ server = subprocess.Popen([
|
|
| 28 |
"-ngl", "0",
|
| 29 |
"--host", "0.0.0.0",
|
| 30 |
"--port", "8080",
|
| 31 |
-
|
| 32 |
])
|
| 33 |
|
| 34 |
print("Starting llama-server, waiting 8 seconds...")
|
|
@@ -116,7 +116,7 @@ def chat(user_fact, history):
|
|
| 116 |
{"role": "user", "content": f"الفعل: {user_fact}"}
|
| 117 |
],
|
| 118 |
"stream": True,
|
| 119 |
-
"temperature": 0.
|
| 120 |
"top_p": 0.9,
|
| 121 |
"max_tokens": 512, # legal output is short; cap prevents runaway gen
|
| 122 |
"repeat_penalty": 1.1,
|
|
|
|
| 28 |
"-ngl", "0",
|
| 29 |
"--host", "0.0.0.0",
|
| 30 |
"--port", "8080",
|
| 31 |
+
# avoids page-fault stalls on cold reads
|
| 32 |
])
|
| 33 |
|
| 34 |
print("Starting llama-server, waiting 8 seconds...")
|
|
|
|
| 116 |
{"role": "user", "content": f"الفعل: {user_fact}"}
|
| 117 |
],
|
| 118 |
"stream": True,
|
| 119 |
+
"temperature": 0.9, # low = more deterministic / accurate
|
| 120 |
"top_p": 0.9,
|
| 121 |
"max_tokens": 512, # legal output is short; cap prevents runaway gen
|
| 122 |
"repeat_penalty": 1.1,
|