Add implementation of typical sampling (#15504)

* typical decoding

* changing arg name

* add test config params

* forgotten arg rename

* fix edge case where scores are same

* test for typical logits warper

* code quality fixes
This commit is contained in:
Clara Meister
2022-02-09 16:48:41 +01:00
committed by GitHub
parent f588cf4050
commit 0113aae5b7
5 changed files with 94 additions and 3 deletions

View File

@@ -58,6 +58,7 @@ config_common_kwargs = {
"temperature": 2.0,
"top_k": 10,
"top_p": 0.7,
"typical_p": 0.2,
"repetition_penalty": 0.8,
"length_penalty": 0.8,
"no_repeat_ngram_size": 5,