model-conversion : cast logits to float32 (#18009)

This commit is contained in:
Georgi Gerganov 2025-12-14 08:58:13 +02:00 committed by GitHub
parent 609a2d0268
commit 77ad8542bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -200,7 +200,7 @@ with torch.no_grad():
logits = outputs.logits
# Extract logits for the last token (next token prediction)
last_logits = logits[0, -1, :].cpu().numpy()
last_logits = logits[0, -1, :].float().cpu().numpy()
print(f"Logits shape: {logits.shape}")
print(f"Last token logits shape: {last_logits.shape}")