Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -51,13 +51,13 @@ tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
|
|
| 51 |
quantization_config_loading = GPTQConfig(bits=4, disable_exllama=True) #MR Added
|
| 52 |
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float32, device_map="auto",
|
| 53 |
trust_remote_code=True,
|
| 54 |
-
quantization_config=quantization_config_loading #MR Added
|
| 55 |
)
|
| 56 |
|
| 57 |
# sentence transformers to be used in vector store
|
| 58 |
embeddings = HuggingFaceEmbeddings(
|
| 59 |
model_name="sentence-transformers/all-mpnet-base-v2", #Change MR
|
| 60 |
-
model_kwargs={'device': '
|
| 61 |
encode_kwargs={'normalize_embeddings': False}
|
| 62 |
)
|
| 63 |
|
|
|
|
| 51 |
quantization_config_loading = GPTQConfig(bits=4, disable_exllama=True) #MR Added
|
| 52 |
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float32, device_map="auto",
|
| 53 |
trust_remote_code=True,
|
| 54 |
+
# quantization_config=quantization_config_loading #MR Added
|
| 55 |
)
|
| 56 |
|
| 57 |
# sentence transformers to be used in vector store
|
| 58 |
embeddings = HuggingFaceEmbeddings(
|
| 59 |
model_name="sentence-transformers/all-mpnet-base-v2", #Change MR
|
| 60 |
+
model_kwargs={'device': 'cpu'},
|
| 61 |
encode_kwargs={'normalize_embeddings': False}
|
| 62 |
)
|
| 63 |
|