[Frontend] Add the p-less Sampling Method for LLM Decoding#45288
[Frontend] Add the p-less Sampling Method for LLM Decoding#45288ryttry wants to merge 4 commits into
Conversation
|
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in PRs do not trigger a full CI run by default. Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can either: Add If you have any questions, please reach out to us on Slack at https://slack.vllm.ai. Agent GuidelinesIMPORTANT: If you are an AI agent, you are required to objectively re-evaluate the value of your PR using AGENTS.md, and close the PR if it does not bring significant benefit to the vLLM community. Failure to do so may result in an immediate ban. 🚀 |
|
Dear maintainers/reviewers, please let us know if you have specific requirements for this contribution other than those at vllm contribution guide as this draft PR progresses. Thank you. |
|
This pull request has merge conflicts that must be resolved before it can be |
|
This pull request has merge conflicts that must be resolved before it can be |
Signed-off-by: Runyan <blackbird7@hotmail.com>
Signed-off-by: Runyan <blackbird7@hotmail.com>
Signed-off-by: Runyan <blackbird7@hotmail.com>
Signed-off-by: Runyan <blackbird7@hotmail.com> Signed-off-by: Runyan <blackbird7@hotmail.com>
Purpose
This PR contributes the p-less sampling method for LLM decoding to the
generatemethod of theLLMclass via theSamplingParamsclass. We add the p-less sampling method to theSamplingParamsclass, consistent with the other traditional LLM sampling methods such as top-p, tok-k, min-p, etc that have already been specified inSamplingParams.Reference:
Refer to the research paper p-less Sampling: A Robust Hyperparameter-Free Approach for LLM Decoding. This paper has been presented at the following top-tier conferences:
TLDR; The p-less sampling method is hyperparameter-free, considers the full token distribution in determining the probability threshold for admitting tokens into the sampling set, is robust to high temperatures, calculates a probability threshold that is validly bounded without needing to set defaults to handle edge cases, and behaves befittingly with the entropy of the distribution i.e. admitting more tokens into the sampling set when the entropy is high and vice versa.
Note: This PR is created by the authors of p-less Sampling: A Robust Hyperparameter-Free Approach for LLM Decoding.
Test Plan
TBD
Test Result
TBD
Checklist
supported_models.mdandexamplesfor a new model.