Skip to content

Fix logit scale calculation in zero_shot_iid.py#39

Draft
work4cs wants to merge 1 commit into
mainfrom
zero-shot-correction-on-logit
Draft

Fix logit scale calculation in zero_shot_iid.py#39
work4cs wants to merge 1 commit into
mainfrom
zero-shot-correction-on-logit

Conversation

@work4cs
Copy link
Copy Markdown
Contributor

@work4cs work4cs commented Apr 30, 2026

"logit_scale": self.logit_scale.exp()

Copy link
Copy Markdown
Member

@egrace479 egrace479 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Back to how it had been ✅

@hlapp
Copy link
Copy Markdown
Member

hlapp commented Apr 30, 2026

If this is the correct form, then we'll need to fix this in pybioclip as well.

And presumably this doesn't affect ordering after softmax()? But it does affect the reported probabilities?

@work4cs
Copy link
Copy Markdown
Contributor Author

work4cs commented Apr 30, 2026

If this is the correct form, then we'll need to fix this in pybioclip as well.

And presumably this doesn't affect ordering after softmax()? But it does affect the reported probabilities?

I am thinking of if double exp(), some values might become too large and overflow. Then, the ranking becomes meaningless and wrong. And probabilities/confidence, yes, it might make the result seems over-confident.

@egrace479
Copy link
Copy Markdown
Member

@work4cs is going to explore this more over the weekend before we make any changes.

@egrace479 egrace479 marked this pull request as draft May 1, 2026 19:29
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

Successfully merging this pull request may close these issues.

3 participants