Implement Min P as a sampler option in HF loaders (#4449)

This commit is contained in:
kalomaze 2023-11-02 14:32:51 -05:00 committed by GitHub
parent fcb7017b7a
commit 367e5e6e43
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 43 additions and 1 deletions

View file

@ -26,6 +26,7 @@ def build_parameters(body, chat=False):
'do_sample': bool(body.get('do_sample', True)),
'temperature': float(body.get('temperature', 0.5)),
'top_p': float(body.get('top_p', 1)),
'min_p': float(body.get('min_p', 1)),
'typical_p': float(body.get('typical_p', body.get('typical', 1))),
'epsilon_cutoff': float(body.get('epsilon_cutoff', 0)),
'eta_cutoff': float(body.get('eta_cutoff', 0)),