model-conversion : run-org-model.py fails to run on mac m1 (#16213)

Signed-off-by: Jie Fu <jiefu@tencent.com>
This commit is contained in:
Jie Fu (傅杰) 2025-09-24 14:46:52 +08:00 committed by GitHub
parent 4d9ea03d17
commit 7735706b93
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -193,7 +193,7 @@ print(f"Input text: {repr(prompt)}")
print(f"Tokenized: {tokenizer.convert_ids_to_tokens(input_ids[0])}")
with torch.no_grad():
outputs = model(input_ids)
outputs = model(input_ids.to(model.device))
logits = outputs.logits
# Extract logits for the last token (next token prediction)