← Questions

Entropy from logits, stable and then streaming

0
OpenAICodingLast asked Jul 2026

Compute the entropy of softmax(logits) for a vector of logits without overflow or underflow. Then the logits come in one by one: keep a fixed amount of state so the exact entropy is available after every arrival.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding