Update app.py
Browse files
app.py
CHANGED
@@ -13,13 +13,15 @@ model_path = hf_hub_download(
|
|
13 |
llm = Llama(
|
14 |
model_path=model_path,
|
15 |
n_ctx=2048,
|
16 |
-
n_threads=
|
17 |
chat_format="llama-3",
|
18 |
seed=42,
|
19 |
f16_kv=True,
|
20 |
logits_all=False,
|
21 |
use_mmap=True,
|
22 |
-
use_gpu=True
|
|
|
|
|
23 |
)
|
24 |
|
25 |
# Placeholder responses for when context is empty
|
@@ -100,7 +102,7 @@ with gr.Blocks(css=custom_css, theme=gr.themes.Soft(primary_hue="indigo", neutra
|
|
100 |
# π AstroSage: Your Cosmic AI Companion
|
101 |
|
102 |
Welcome to AstroSage, an advanced AI assistant specializing in astronomy, astrophysics, and cosmology.
|
103 |
-
Powered by the AstroSage-8B model, I'm here to help you explore the wonders of the universe!
|
104 |
|
105 |
### What Can I Help You With?
|
106 |
- πͺ Explanations of astronomical phenomena
|
|
|
13 |
llm = Llama(
|
14 |
model_path=model_path,
|
15 |
n_ctx=2048,
|
16 |
+
n_threads=8,
|
17 |
chat_format="llama-3",
|
18 |
seed=42,
|
19 |
f16_kv=True,
|
20 |
logits_all=False,
|
21 |
use_mmap=True,
|
22 |
+
use_gpu=True,
|
23 |
+
n_gpu_layers=-1, # to ensure all layers are on GPU
|
24 |
+
offload_kqv=True # for better memory management
|
25 |
)
|
26 |
|
27 |
# Placeholder responses for when context is empty
|
|
|
102 |
# π AstroSage: Your Cosmic AI Companion
|
103 |
|
104 |
Welcome to AstroSage, an advanced AI assistant specializing in astronomy, astrophysics, and cosmology.
|
105 |
+
Powered by the AstroSage-Llama-3.1-8B model, I'm here to help you explore the wonders of the universe!
|
106 |
|
107 |
### What Can I Help You With?
|
108 |
- πͺ Explanations of astronomical phenomena
|