Skip to content

fix(logits): avoid nan in fused softcap#183

Open
elwhyjay wants to merge 2 commits into
lightseekorg:mainfrom
elwhyjay:fix/logits-softcap-nan
Open

fix(logits): avoid nan in fused softcap#183
elwhyjay wants to merge 2 commits into
lightseekorg:mainfrom
elwhyjay:fix/logits-softcap-nan

Conversation

@elwhyjay
Copy link
Copy Markdown
Contributor

Summary

  • Use a stable sigmoid-based tanh form in fused softcap to avoid NaNs from large positive logits.
  • Add a CUDA regression test for large-logit softcap behavior.

Test Plan

python -m pytest test/runtime/test_logits_processor.py -q

Signed-off-by: leeyongjun <jqueen.astro@gmail.com>
@elwhyjay elwhyjay requested a review from a team as a code owner May 19, 2026 09:05
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