Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pythia 160M is giving unreasonable logit values #177

Open
danielmisrael opened this issue Oct 14, 2024 · 1 comment
Open

Pythia 160M is giving unreasonable logit values #177

danielmisrael opened this issue Oct 14, 2024 · 1 comment

Comments

@danielmisrael
Copy link

from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model = AutoModelForCausalLM.from_pretrained("EleutherAI/pythia-160m")
tokenizer = AutoTokenizer.from_pretrained("EleutherAI/pythia-160m")
input_ids = tokenizer.encode("Hello, my dog is cute", return_tensors="pt")
model.eval()
with torch.no_grad():   
     logits = model(input_ids).logits
print(logits)
print(torch.topk(logits, k = 5))`

This is my code and the output is

image

For no other model do the logit values get this large. The 410m model has maximum values of ~10. I was wondering if there is a bug in the way logits are computed?

@Tr1ple-F
Copy link

Tr1ple-F commented Dec 7, 2024

I can confirm the same, both 70m and 160m seem to have strange predictions in the final steps, particularly around
<|endoftext|>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants