Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Min P Sampler #1642

Merged
merged 4 commits into from
Nov 18, 2023
Merged

Support Min P Sampler #1642

merged 4 commits into from
Nov 18, 2023

Conversation

esmeetu
Copy link
Collaborator

@esmeetu esmeetu commented Nov 13, 2023

Reference:

oobabooga/text-generation-webui#4449
ggml-org/llama.cpp#3841

It seems sample better result than normal top_k/top_p method. And i tested min_p = 0.05 when inferencing code LLM, it gave me a better explanation.

@esmeetu esmeetu changed the title Support Min p Sampler Support Min P Sampler Nov 13, 2023
@esmeetu
Copy link
Collaborator Author

esmeetu commented Nov 18, 2023

@zhuohan123 Thanks for you reviews! In terms of first problem, i removed the min_tokens_to_keep params which need sorting to take from original logits. Why i removed that params is because i want to keep this implement simpler, and align with top_p/top_k.

Copy link
Member

@zhuohan123 zhuohan123 left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you for your great contribution!

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