Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,17 +9,13 @@ model_path = hf_hub_download(
|
|
| 9 |
filename="AstroSage-8B-Q8_0.gguf"
|
| 10 |
)
|
| 11 |
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
)
|
| 20 |
-
return llm
|
| 21 |
-
|
| 22 |
-
llm = load_llm()
|
| 23 |
|
| 24 |
# Placeholder responses for when context is empty
|
| 25 |
GREETING_MESSAGES = [
|
|
|
|
| 9 |
filename="AstroSage-8B-Q8_0.gguf"
|
| 10 |
)
|
| 11 |
|
| 12 |
+
llm = Llama(
|
| 13 |
+
model_path=model_path,
|
| 14 |
+
n_ctx=2048,
|
| 15 |
+
chat_format="llama-3",
|
| 16 |
+
n_gpu_layers=-1, # ensure all layers are on GPU
|
| 17 |
+
)
|
| 18 |
+
return llm
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
# Placeholder responses for when context is empty
|
| 21 |
GREETING_MESSAGES = [
|