Tijmen2 commited on
Commit
37d0929
·
verified ·
1 Parent(s): 7320ca6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -11
app.py CHANGED
@@ -9,17 +9,13 @@ model_path = hf_hub_download(
9
  filename="AstroSage-8B-Q8_0.gguf"
10
  )
11
 
12
- @spaces.GPU(duration=119)
13
- def load_llm():
14
- llm = Llama(
15
- model_path=model_path,
16
- n_ctx=2048,
17
- chat_format="llama-3",
18
- n_gpu_layers=-1, # ensure all layers are on GPU
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 = [