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

Add Min-P sampling for the GPT model in the web UI #1118

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

PocketDocLabs
Copy link

The intent of this PR is to add Min-P sampling for the GPT model in the web UI.

Min-P sampling selects tokens with a probability above min_p * max_prob, where max_prob is the maximum probability in the distribution and min_p is a float between 0.0 and 1.0. This allows the model to adapt to situations with multiple viable logit choices, without sacrificing reliability when only the top logit is suitable.

In my testing a value of 0.95 is a good balance between reliability and sample variance. This almost certainly depends on the specific fine tune and personal preference.

	modified:   GPT_SoVITS/AR/models/t2s_model.py
	modified:   GPT_SoVITS/AR/models/utils.py
	modified:   GPT_SoVITS/inference_webui.py
	modified:   GPT_SoVITS/inference_webui.py
	modified:   GPT_SoVITS/inference_webui.py
	modified:   sweight.txt
	deleted:    sweight.txt
@frammiie
Copy link

Very nice! 💯

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