Skip to content

Commit c654be5

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

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
@@ -197,7 +197,7 @@ def fn(_m, input, output):
197197
print(f"Tokenized: {tokenizer.convert_ids_to_tokens(input_ids[0])}")
198198

199199
with torch.no_grad():
200-
outputs = model(input_ids)
200+
outputs = model(input_ids.to(model.device))
201201
logits = outputs.logits
202202

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

0 commit comments

Comments
 (0)