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

Min P generation parameter #1885

Open
LawrenceGrigoryan opened this issue May 13, 2024 · 2 comments
Open

Min P generation parameter #1885

LawrenceGrigoryan opened this issue May 13, 2024 · 2 comments

Comments

@LawrenceGrigoryan
Copy link

LawrenceGrigoryan commented May 13, 2024

Feature request

Hey! I've noticed that min_p parameter is now available in transformers but haven't found it in TGI. Are you planning to add it in the nearest future?

The parameter itself is very well described here

I have implemented it in TGI for myself locally and I would be glad to contribute by submitting a PR :)

@avacaondata
Copy link

How have you implemented this locally? I'm seeking to do the same , would appreciate some guidance :) @LawrenceGrigoryan

@LawrenceGrigoryan
Copy link
Author

@avacaondata
so basically you need to add MinPLogitsWarper to /server/text_generation_server/utils/logits_process.py and the min_p parameter to NextTokenChooser class in /server/text_generation_server/utils/tokens.py

Then go over a ton of files and add the min_p parameter wherever needed. Here I would suggest you searching for one of the existing generation params like top_p and adding the missing lines of code for the new parameter min_p

After you done that, just build the image with the default Dockerfile and use it as you usually do

If you have any further questions, feel free to ask :)

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

No branches or pull requests

2 participants