Skip to content

Commit 7735706

Browse files
authored
model-conversion : run-org-model.py fails to run on mac m1 (#16213)
Signed-off-by: Jie Fu <[email protected]>
1 parent 4d9ea03 commit 7735706

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/model-conversion/scripts/causal/run-org-model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def fn(_m, input, output):
193193
print(f"Tokenized: {tokenizer.convert_ids_to_tokens(input_ids[0])}")
194194

195195
with torch.no_grad():
196-
outputs = model(input_ids)
196+
outputs = model(input_ids.to(model.device))
197197
logits = outputs.logits
198198

199199
# Extract logits for the last token (next token prediction)

0 commit comments

Comments
 (0)