Coool2 commited on
Commit
441185f
·
1 Parent(s): 40c30ca

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +2 -4
agent.py CHANGED
@@ -209,11 +209,9 @@ def initialize_models(use_api_mode=False):
209
  # Embedding model
210
  embed_model = HuggingFaceEmbedding(
211
  model_name="llamaindex/vdr-2b-multi-v1",
212
- device="cpu",
213
  trust_remote_code=True,
214
- model_kwargs={
215
- "torch_dtype": "auto"
216
- }
217
  )
218
 
219
  return proj_llm, code_llm, embed_model
 
209
  # Embedding model
210
  embed_model = HuggingFaceEmbedding(
211
  model_name="llamaindex/vdr-2b-multi-v1",
 
212
  trust_remote_code=True,
213
+ backend="onnx",
214
+ model_kwargs={"provider": "CPUExecutionProvider"}
 
215
  )
216
 
217
  return proj_llm, code_llm, embed_model