"tests/benchmark/test_benchmark_tf.py" did not exist on "4bcc35cd693cc0f62d2b4853cd8a5db8608a4abd"
  • th茅o gigant's avatar
    Adding FlaxNoRepeatNGramLogitsProcessor (#29677) · fed27ffc
    th茅o gigant authored
    * fix issue with logit processor in beam search in Flax
    
    * adding FlaxNoRepeatNGramLogitsProcessor class + unit test
    
    * style correction and code verification
    
    * add FlaxNoRepeatNGramLogitsProcessor to the test_processor_list and test_processor_list_jitted tests
    
    * fix an issue where ngrams are banned only if they appear ==1 time + update description of get_previous_ngrams
    
    * replace non-jit compatible masking of ngrams that are not yet generated with jittable version
    
    * Revert "fix issue with logit processor in beam search in Flax"
    
    This reverts commit 09b70d7e4dc32d0cc4db61af09a835a9cd238b50.
    
    * add FlaxNoRepeatNGramLogitsProcessor to _get_logits_processor
    
    * change the method of casting to boolean of banned tokens indices
    
    * fix code style
    
    * remove some useless operations + significantly faster computation of update indices using jax.lax.fori_loop
    
    * remove useless loop iterations
    
    * set some variables that were calculated and used multiple times
    
    * fix format
    fed27ffc
test_flax_logits_process.py 14 KB