Skip to content

Fix docstring typo in nucleus sampling#298

Open
Chessing234 wants to merge 1 commit intolabmlai:masterfrom
Chessing234:fix-nucleus-sampling-docstring
Open

Fix docstring typo in nucleus sampling#298
Chessing234 wants to merge 1 commit intolabmlai:masterfrom
Chessing234:fix-nucleus-sampling-docstring

Conversation

@Chessing234
Copy link
Copy Markdown

Summary

  • Fixes Minor corrections in documentation for Nucleus Sampling implementation #293
  • Fixed "is less that $p$" to "is at least $p$" in the module docstring (line 22) — corrects both the typo ("that" -> "than") and the semantics ("less than" -> "at least"), since nucleus sampling selects the smallest set of tokens whose cumulative probability meets or exceeds p
  • Fixed "less that" to "less than" in an inline comment (line 64) — typo-only fix, semantics were correct there

Test plan

  • Verified the fix matches the formula already present in the docstring: $\sum_{x_i \in V^{(p)}} P(x_i | x_{1:i-1}) \ge p$

🤖 Generated with Claude Code

- Line 22: "is less that $p$" -> "is at least $p$" (fixes both typo and semantics)
- Line 64: "less that" -> "less than" (fixes typo)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

Minor corrections in documentation for Nucleus Sampling implementation

1 participant