Update app.py
Browse files
app.py
CHANGED
@@ -37,7 +37,7 @@ QA_PROMPT = PromptTemplate(
|
|
37 |
model_id = "microsoft/phi-2"
|
38 |
|
39 |
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
|
40 |
-
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float32, device_map="
|
41 |
|
42 |
# sentence transformers to be used in vector store
|
43 |
embeddings = HuggingFaceEmbeddings(
|
|
|
37 |
model_id = "microsoft/phi-2"
|
38 |
|
39 |
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
|
40 |
+
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float32, device_map="cpu", trust_remote_code=True)
|
41 |
|
42 |
# sentence transformers to be used in vector store
|
43 |
embeddings = HuggingFaceEmbeddings(
|