Skip to content

Top-p/Top-k Sampling Params handling in VLLM v1 #69

Closed

Description

@terrykong
No description provided.

Activity

  1. terrykong commented on May 8, 2025

    @terrykong
    CollaboratorAuthor

    #316 related

  2. wangshangsam commented on Jul 2, 2025

    @wangshangsam
    Contributor

    Assigning to @Dazz993

  3. github-actions commented on Aug 4, 2025

    @github-actions

    This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

  4. zhandaz commented on Aug 5, 2025

    @zhandaz
    Contributor

    Just for notes: there are some good discussions for Top-p/Top-k support in #766.


    raw logprobs are fine for now (same as v1). But are actually incorrect for top-k, top-p sampling (even though it appears as though it would work correctly). Both the logprobs from vllm and the training framework are incorrect since they haven't been processed, which introduces error. (I believe the claim from #773 that v1 is fine is incorrect)

    We have 2 options for how to mitigate this:

    I'm leaning strongly towards the latter as it leaves less room for us to make mistakes and not notice. We should track this in #69.

    Originally posted by @SahilJain314 in #766 (comment)


    raw logprobs are fine for now (same as v1). But are actually incorrect for top-k, top-p sampling (even though it appears as though it would work correctly). Both the logprobs from vllm and the training framework are incorrect since they haven't been processed, which introduces error. (I believe the claim from #773 that v1 is fine is incorrect)

    We have 2 options for how to mitigate this:

    I'm leaning strongly towards the latter as it leaves less room for us to make mistakes and not notice. We should track this in #69.

    I feel so too, although raw_logprobs is ok for temperature, the logits when using top-k/top-p will become incorrect if not actually applying top-k/top-p on them. And agreed with the latter one.

    I think we can get this PR with raw_logprobs merged first. Then with @Dazz993 's help on #773 and #774, to support it at training side (both dtensor and megatron) and change raw_logprobs to processed_logprobs that time.

    Originally posted by @YUki-666 in #766 (comment)

  5. zhandaz commented on Aug 6, 2025

    @zhandaz
    Contributor

    Please see #773 for up-to-date discussions.

  6. linked a pull request that will close this issuefeat: Support top-p and top-k #1578on Dec 4, 2025
  7. yuki-97 commented on May 25, 2026

    @yuki-97
    Contributor

    completed through #2053

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions