ffreemt commited on
Commit
1774daa
1 Parent(s): c002b9c

Update 13b for hf

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -3,6 +3,7 @@
3
  # ruff: noqa: E501
4
  import gc
5
  import os
 
6
  import random
7
  import time
8
  from collections import deque
@@ -30,8 +31,6 @@ from loguru import logger
30
  deq = deque()
31
  sig_end = object() # signals the processing is done
32
 
33
- url = "https://huggingface.co/TheBloke/llama-2-70b-Guanaco-QLoRA-GGML/blob/main/llama-2-70b-guanaco-qlora.ggmlv3.q3_K_S.bin" # 29.7G
34
-
35
  prompt_template = """Below is an instruction that describes a task. Write a response that appropriately completes the request.
36
 
37
  ### Instruction: {user_prompt}
@@ -163,6 +162,11 @@ logger.debug(f"{cpu_count=}")
163
  LLM = None
164
  gc.collect()
165
 
 
 
 
 
 
166
  try:
167
  model_loc, file_size = dl_hf_model(url)
168
  except Exception as exc_:
 
3
  # ruff: noqa: E501
4
  import gc
5
  import os
6
+ import platform
7
  import random
8
  import time
9
  from collections import deque
 
31
  deq = deque()
32
  sig_end = object() # signals the processing is done
33
 
 
 
34
  prompt_template = """Below is an instruction that describes a task. Write a response that appropriately completes the request.
35
 
36
  ### Instruction: {user_prompt}
 
162
  LLM = None
163
  gc.collect()
164
 
165
+ if "forindo" in platform.node().lower():
166
+ url = "https://huggingface.co/TheBloke/llama-2-70b-Guanaco-QLoRA-GGML/blob/main/llama-2-70b-guanaco-qlora.ggmlv3.q3_K_S.bin" # 29.7G
167
+ else:
168
+ url = "https://huggingface.co/TheBloke/llama-2-13B-Guanaco-QLoRA-GGML/blob/main/llama-2-13b-guanaco-qlora.ggmlv3.q4_K_S.bin" # 8.14G
169
+ logger.debug(f"{url=}")
170
  try:
171
  model_loc, file_size = dl_hf_model(url)
172
  except Exception as exc_: