Skip to content

Fix softmax masking for illegal moves in inference#14

Open
lilv98 wants to merge 5 commits intomainfrom
claude/summarize-github-issues-0D9hR
Open

Fix softmax masking for illegal moves in inference#14
lilv98 wants to merge 5 commits intomainfrom
claude/summarize-github-issues-0D9hR

Conversation

@lilv98
Copy link
Collaborator

@lilv98 lilv98 commented Mar 8, 2026

Multiplying logits by a binary 0/1 mask sets illegal move logits to 0,
but softmax(0) is not zero — it still contributes probability mass.
Use masked_fill with -inf so softmax correctly assigns exactly 0
probability to illegal moves.

Fixes the issue raised in PR #9.

https://claude.ai/code/session_01ELpknikQ4vWB4q8hWhxoVG

claude added 5 commits March 7, 2026 23:58
Multiplying logits by a binary 0/1 mask sets illegal move logits to 0,
but softmax(0) is not zero — it still contributes probability mass.
Use masked_fill with -inf so softmax correctly assigns exactly 0
probability to illegal moves.

Fixes the issue raised in PR #9.

https://claude.ai/code/session_01ELpknikQ4vWB4q8hWhxoVG
Use canonical PyPI name 'PyYAML' instead of 'pyyaml' in both
requirements.txt and pyproject.toml.

https://claude.ai/code/session_01ELpknikQ4vWB4q8hWhxoVG
Lichess PGN files include WhiteTitle/BlackTitle headers set to "BOT"
for bot accounts, including Maia itself. Skip any game where either
player has the BOT title.

Fixes #2

https://claude.ai/code/session_01ELpknikQ4vWB4q8hWhxoVG
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.

2 participants