zac commited on
Commit
360ead8
·
1 Parent(s): 4eae1dc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -6,8 +6,8 @@ from llama_cpp import Llama
6
  from huggingface_hub import hf_hub_download #load from huggingfaces
7
 
8
 
9
- llm = Llama(model_path= hf_hub_download(repo_id="TheBloke/Vigogne-2-7B-Instruct-GGML", filename="vigogne-2-7b-instruct.ggmlv3.q4_1.bin"))
10
- llm.load_model() #pre load model(as suggested by chatGPT)
11
 
12
  def generate_text(input_text):
13
  output = llm(f"Q: {input_text} A:", max_tokens=521, stop=["Q:", "\n"], echo=True)
 
6
  from huggingface_hub import hf_hub_download #load from huggingfaces
7
 
8
 
9
+ llm = Llama(model_path= hf_hub_download(repo_id="TheBloke/Vigogne-2-7B-Instruct-GGML", filename="vigogne-2-7b-instruct.ggmlv3.q4_1.bin"), n_ctx=2048) #download model from hf/ n_ctx=2048 for high ccontext length
10
+
11
 
12
  def generate_text(input_text):
13
  output = llm(f"Q: {input_text} A:", max_tokens=521, stop=["Q:", "\n"], echo=True)