Tijmen2 commited on
Commit
808fb76
Β·
verified Β·
1 Parent(s): a695705

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
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=4,
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