Skip to content

Commit

Permalink
fix --cuda with --device_map
Browse files Browse the repository at this point in the history
  • Loading branch information
lbeurerkellner committed Jul 14, 2023
1 parent b30a4b1 commit eb4b756
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lmql/models/lmtp/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ def rename_model_args(model_args):

# parse cuda
if cuda:
model_args["device_map"] = "auto"
if "device_map" in model_args:
print("Warning: device_map is set, but cuda is True. Ignoring 'cuda' which would set device_map to 'auto'.")
else:
model_args["device_map"] = "auto"

return model_args

0 comments on commit eb4b756

Please sign in to comment.