• Isaac Chung's avatar
    Add early stopping for Bark generation via logits processor (#26675) · e2bffcfa
    Isaac Chung authored
    * add early stopping logits processor
    
    * black formmated
    
    * indent
    
    * follow method signature
    
    * actual logic
    
    * check for None
    
    * address comments on docstrings and method signature
    
    * add unit test under `LogitsProcessorTest` wip
    
    * unit test passing
    
    * black formatted
    
    * condition per sample
    
    * add to BarkModelIntegrationTests
    
    * wip BarkSemanticModelTest
    
    * rename and add to kwargs handling
    
    * not add to BarkSemanticModelTest
    
    * correct logic and assert last outputs tokens different in test
    
    * doc-builder style
    
    * read from kwargs as well
    
    * assert len of with less than that of without
    
    * ruff
    
    * add back seed and test case
    
    * add original impl default suggestion
    
    * doc-builder
    
    * rename and use softmax
    
    * switch back to LogitsProcessor and update docs wording
    
    * camelCase and spelling and saving compute
    
    * assert strictly less than
    
    * assert less than
    
    * expand test_generate_semantic_early_stop instead
    e2bffcfa
logits_process.py 85.5 KB