Spaces:
Sleeping
Sleeping
Nicolai Berk
commited on
Commit
·
5740900
1
Parent(s):
456bc55
Update used model
Browse files
app.py
CHANGED
@@ -25,8 +25,8 @@ index.add(corpus_embeddings_np)
|
|
25 |
reranker = CrossEncoder("cross-encoder/ms-marco-MiniLM-L-6-v2")
|
26 |
|
27 |
# Generator (choose one: local HF model or OpenAI)
|
28 |
-
tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-Instruct-v0.
|
29 |
-
model = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-Instruct-v0.
|
30 |
generator = pipeline("text-generation", model=model, tokenizer=tokenizer, max_new_tokens=150)
|
31 |
|
32 |
def rag_pipeline(query):
|
|
|
25 |
reranker = CrossEncoder("cross-encoder/ms-marco-MiniLM-L-6-v2")
|
26 |
|
27 |
# Generator (choose one: local HF model or OpenAI)
|
28 |
+
tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-Instruct-v0.3")
|
29 |
+
model = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-Instruct-v0.3", device_map="auto", torch_dtype=torch.float16)
|
30 |
generator = pipeline("text-generation", model=model, tokenizer=tokenizer, max_new_tokens=150)
|
31 |
|
32 |
def rag_pipeline(query):
|