Skip to content

Commit

Permalink
fix self.device
Browse files Browse the repository at this point in the history
  • Loading branch information
MengqingCao committed Jul 19, 2024
1 parent 0bfa6f7 commit a9b5ca4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/axolotl/utils/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,7 @@ def load_model(self) -> Tuple[PreTrainedModel, Optional[PeftConfig]]:

self.apply_lora_patch(model)

if "cuda" in self.device:
if "cuda" in self.device.__str__():
for _ in range(3):
gc.collect()
torch.cuda.empty_cache()
Expand Down

0 comments on commit a9b5ca4

Please sign in to comment.