leofltt commited on
Commit
8e450dd
·
1 Parent(s): 59bec4e

remove map auto

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -129,7 +129,7 @@ class GaiaAgent:
129
 
130
  # Initialize the LLM
131
  logging.info("Loading LLM... This may take a few minutes on first startup.")
132
- # Using a smaller, CPU-friendly model to avoid memory issues on Hugging Face Spaces
133
  llm = HuggingFacePipeline.from_model_id(
134
  model_id="microsoft/Phi-3-mini-4k-instruct",
135
  task="text-generation",
@@ -141,7 +141,6 @@ class GaiaAgent:
141
  },
142
  torch_dtype="auto",
143
  trust_remote_code=True, # Required for Phi-3
144
- device_map="auto",
145
  )
146
  logging.info("LLM loaded successfully.")
147
 
 
129
 
130
  # Initialize the LLM
131
  logging.info("Loading LLM... This may take a few minutes on first startup.")
132
+ # Removing device_map for better compatibility with ZeroGPU environments
133
  llm = HuggingFacePipeline.from_model_id(
134
  model_id="microsoft/Phi-3-mini-4k-instruct",
135
  task="text-generation",
 
141
  },
142
  torch_dtype="auto",
143
  trust_remote_code=True, # Required for Phi-3
 
144
  )
145
  logging.info("LLM loaded successfully.")
146