Skip to content

Commit

Permalink
Fix typo in LocalAgent (huggingface#24736)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamartin9 authored and Lorenzobattistela committed Jul 13, 2023
1 parent 420332e commit 97bac5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transformers/tools/agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ def from_pretrained(cls, pretrained_model_name_or_path, **kwargs):
def _model_device(self):
if hasattr(self.model, "hf_device_map"):
return list(self.model.hf_device_map.values())[0]
for param in self.mode.parameters():
for param in self.model.parameters():
return param.device

def generate_one(self, prompt, stop):
Expand Down

0 comments on commit 97bac5a

Please sign in to comment.