Skip to content

Commit

Permalink
move to device
Browse files Browse the repository at this point in the history
  • Loading branch information
skaulintel committed Mar 6, 2025
1 parent cd7d2c7 commit 0b18c67
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/question-answering/run_qa.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,8 @@ def main():
token=model_args.token,
trust_remote_code=model_args.trust_remote_code,
)
device = torch.device("hpu")
model = model.to(device)

# Tokenizer check: this script requires a fast tokenizer.
if not isinstance(tokenizer, PreTrainedTokenizerFast):
Expand Down

0 comments on commit 0b18c67

Please sign in to comment.