Skip to content

fix temperature flag so it takes effect - #981

Open
RaviTriv wants to merge 1 commit into
google:devfrom
RaviTriv:fix-softmax-temperature
Open

fix temperature flag so it takes effect#981
RaviTriv wants to merge 1 commit into
google:devfrom
RaviTriv:fix-softmax-temperature

Conversation

@RaviTriv

@RaviTriv RaviTriv commented Aug 16, 2026

Copy link
Copy Markdown

Currently the temperature flag is not taking effect since its applied to the exponentiated logits and cancels against the normalization. Updating to divide the logits by temperature before exp so it affects the output.

Current

Temperature 0
image

Temperature 2
image

Updated

Temperature 0
image

Temperature 2
image

image

@RaviTriv
RaviTriv force-pushed the fix-softmax-temperature branch from 47d498d to ff1572b Compare August 16, 2026 17:02
@RaviTriv
RaviTriv marked this pull request as ready for review August 18, 2026 01:35
@RaviTriv RaviTriv changed the title divide logits by temperature before exp fix temperature flag so it takes effect Aug 19, 2026
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.

1 participant