transformers
e2bffcfa - Add early stopping for Bark generation via logits processor (#26675)

Comment changes are shownComment changes are hidden
Commit
1 year ago
Add early stopping for Bark generation via logits processor (#26675) * 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
Author
Parents
  • src/transformers
    • generation
      • File
        logits_process.py
    • models/bark
      • File
        generation_configuration_bark.py
      • File
        modeling_bark.py
  • tests
    • generation
      • File
        test_logits_process.py
    • models/bark
      • File
        test_modeling_bark.py