mirror of
https://github.com/huggingface/transformers.git
synced 2025-08-02 19:21:31 +06:00
![]() * Fix issues in test_exponential_decay_length_penalty Fix tests which were broken and add validation of negative scores. Current test didn't take into account that ExponentialDecayLengthPenalty updates the score inplace, resulting in updates to base tested Tensor. In addition, the gt assert had empty Tensors due to indexing along the batch dimension. Test is currently expected to fail to show ExponentialDecayLengthPenalty issues with negative scores * Fix ExponentialDecayLengthPenalty negative logits issue In cases where the scores are negative, ExponentialDecayLengthPenalty decreases the score of eos_token_id instead of increasing it. To fix this issue we compute the penalty of the absolute value and add it to the original score. * Add examples for ExponentialDecayLengthPenalty * Fix styling issue in ExponentialDecayLengthPenalty doc * Apply suggestions from code review Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com> * Style and quality fix * Fix example outputs --------- Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com> |
||
---|---|---|
.. | ||
__init__.py | ||
test_beam_constraints.py | ||
test_beam_search.py | ||
test_configuration_utils.py | ||
test_flax_logits_process.py | ||
test_flax_utils.py | ||
test_framework_agnostic.py | ||
test_logits_process.py | ||
test_stopping_criteria.py | ||
test_streamers.py | ||
test_tf_logits_process.py | ||
test_tf_utils.py | ||
test_utils.py |