Skip to content

Give samplingMode precedence over legacy topK and temperature - #225

Merged
michaelwasserman merged 1 commit into
webmachinelearning:mainfrom
isaacahouma:sampling-mode-precedence
Oct 16, 2026
Merged

michaelwasserman merged 1 commit into
webmachinelearning:mainfrom
isaacahouma:sampling-mode-precedence

Conversation

@isaacahouma

@isaacahouma isaacahouma commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Updates the spec algorithms and explainer so that when both samplingMode and legacy raw sampling parameters (topK or temperature) are provided, samplingMode takes precedence instead of throwing a TypeError. Also updates the IDL deprecation comments on params(), topK, temperature, and LanguageModelParams to point to samplingMode.

Matches the Chromium implementation in https://crrev.com/c/8591422.


Preview | Diff

Update the spec algorithms and explainer so that when both samplingMode
and legacy raw sampling parameters (topK or temperature) are provided,
samplingMode takes precedence instead of throwing a TypeError. Also
update the IDL deprecation comments on params(), topK, temperature, and
LanguageModelParams to point to samplingMode.
@michaelwasserman
michaelwasserman merged commit 6dac677 into webmachinelearning:main Oct 16, 2026
2 checks passed
github-actions Bot added a commit that referenced this pull request Oct 16, 2026
SHA: 6dac677
Reason: push, by michaelwasserman

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.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.

2 participants