VeganSquirrel commited on
Commit
579bbb3
·
verified ·
1 Parent(s): 873e3a7
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -34,9 +34,14 @@ index.add(embeddings)
34
 
35
 
36
  # Step 3: Load the Language Model
37
- model_name = "HuggingFaceH4/zephyr-7b-alpha"
38
- tokenizer = AutoTokenizer.from_pretrained(model_name)
39
- model = AutoModelForCausalLM.from_pretrained(model_name)
 
 
 
 
 
40
 
41
  # Step 4: Define the Retrieval Function
42
  def retrieve_documents(query, top_k=3):
 
34
 
35
 
36
  # Step 3: Load the Language Model
37
+ # model_name = "HuggingFaceH4/zephyr-7b-alpha"
38
+ # tokenizer = AutoTokenizer.from_pretrained(model_name)
39
+ # model = AutoModelForCausalLM.from_pretrained(model_name)
40
+
41
+ model_name = "TheBloke/zephyr-7B-beta-GPTQ"
42
+ tokenizer = AutoTokenizer.from_pretrained(model_name, use_fast=True)
43
+ model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto", trust_remote_code=False)
44
+
45
 
46
  # Step 4: Define the Retrieval Function
47
  def retrieve_documents(query, top_k=3):