Skip to content

fix(ds4): honor sampler settings in decode#527

Draft
dusterbloom wants to merge 2 commits into
Luce-Org:mainfrom
dusterbloom:agent/ds4-sampler
Draft

fix(ds4): honor sampler settings in decode#527
dusterbloom wants to merge 2 commits into
Luce-Org:mainfrom
dusterbloom:agent/ds4-sampler

Conversation

@dusterbloom

@dusterbloom dusterbloom commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • thread GenerateRequest.sampler into DeepSeek4Backend::generate_impl
  • sample from logits when temperature or penalty settings are active
  • keep the existing greedy argmax fast path when the sampler is inert

Why

DeepSeek4 single-device decode was always using greedy argmax and never reading the request sampler, so temperature / top-k / top-p / repetition settings were silently ignored.

Validation

  • git diff --check
  • manual source inspection of the decode path

Review in cubic

@Graffioh

Graffioh commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

hey, here -> #507 in the commits i also tried to fix the sampler + broken greedy decode - can you take a look? let me know if i missed something, trying to learn while contributing

i know is a part of a bigger PR, so since i need a bit of time to test it, i/you can cherry pick that changes and put it in another independent PR

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