Skip to content

Add typical-p (locally typical) sampler#1663

Merged
Blaizzy merged 2 commits into
Blaizzy:mainfrom
Lazarus-931:typical-p
Jul 23, 2026
Merged

Add typical-p (locally typical) sampler#1663
Blaizzy merged 2 commits into
Blaizzy:mainfrom
Lazarus-931:typical-p

Conversation

@Lazarus-931

Copy link
Copy Markdown
Collaborator

Adds locally typical sampling (arXiv 2202.00666): keeps the most typical tokens (surprisal closest to the distribution entropy) until their cumulative probability reaches typical_p. Wired through make_sampler, generate_step, and the server (schemas/generation/request), with a numpy-reference test and validation coverage.

Sampler series from #1648

Adds locally typical sampling (arXiv 2202.00666): keeps the most typical
tokens (surprisal closest to the distribution entropy) until their
cumulative probability reaches typical_p. Wired through make_sampler,
generate_step, and the server (schemas/generation/request), with a
numpy-reference test and validation coverage.
@Lazarus-931
Lazarus-931 requested a review from Blaizzy July 23, 2026 12:48

@Blaizzy Blaizzy left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@Blaizzy
Blaizzy merged commit b739dfa into Blaizzy:main Jul 23, 2026
1 check passed
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