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

Get acc_norm for HF models in log_samples #2722

Open
Kartik21 opened this issue Feb 21, 2025 · 1 comment
Open

Get acc_norm for HF models in log_samples #2722

Kartik21 opened this issue Feb 21, 2025 · 1 comment

Comments

@Kartik21
Copy link

Hello, I am using the acc_norm metric to analyze the score of multiple options normalized by the length. However, I believe the unnormalized scores are displayed in .jsonl file generated by log_samples=True. Is it possible to display normalized scores since the decision is based on that instead of unnormalized scores?

Line 1241 in models/huggingface.py:
answer = (float(logits.sum()), bool(max_equal))

@Kartik21
Copy link
Author

I have modified it to (float(logits.sum())/logits.shape[-1], bool(max_equal)) and set the metric to acc instead of acc_norm for now. Since we only want the sum of log probs of continuations (normalized by the continuation length), we think that this is acceptable instead of adding another feature. Any help will be greatly appreciated!

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

1 participant