Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OOMptimizer: bucketing batch size profiles to make GPUs go 🔥 (#9763)
* Initial working draft of the OOMptimizer. Signed-off-by: Piotr Żelasko <[email protected]> * Support model config. Add bucket merging. Signed-off-by: Piotr Żelasko <[email protected]> * fix Signed-off-by: Piotr Żelasko <[email protected]> * code review Signed-off-by: Piotr Żelasko <[email protected]> * Support bucket_batch_size option for lhotse dataloading Signed-off-by: Piotr Żelasko <[email protected]> * Ability to force a memory fraction to be unused in OOMptimizer Signed-off-by: Piotr Żelasko <[email protected]> * Ability to force a memory fraction to be unused in OOMptimizer Signed-off-by: Piotr Żelasko <[email protected]> * Fix for autocast and configurable dtype Signed-off-by: Piotr Żelasko <[email protected]> * Allow token-per-second filtering Signed-off-by: Piotr Żelasko <[email protected]> * Fix an issue with canary tokenizer Signed-off-by: Piotr Żelasko <[email protected]> * Lift the requirement to use CanaryTokenizer with canary prompt format * Fixes Signed-off-by: Piotr Żelasko <[email protected]> * Initial 2D bucketing draft Signed-off-by: Piotr Żelasko <[email protected]> * Separate script for 2D bucket estimation Signed-off-by: Piotr Żelasko <[email protected]> * Full 2D bucketing support: estimate_uduration_bins_2d, oomptimizer, training Signed-off-by: Piotr Żelasko <[email protected]> * fix Signed-off-by: Piotr Żelasko <[email protected]> * fix Signed-off-by: Piotr Żelasko <[email protected]> * fix Signed-off-by: Piotr Żelasko <[email protected]> * fix Signed-off-by: Piotr Żelasko <[email protected]> * fix Signed-off-by: Piotr Żelasko <[email protected]> * fix Signed-off-by: Piotr Żelasko <[email protected]> * Unit tests for bucket_batch_size and 2D bucketing for audio Signed-off-by: Piotr Żelasko <[email protected]> * Docs for 2D estimate duration bins Signed-off-by: Piotr Żelasko <[email protected]> * Fixes Signed-off-by: Piotr Żelasko <[email protected]> * Preliminary support for prompt format in estimate_duration_bins_2d Signed-off-by: Piotr Żelasko <[email protected]> * fixes Signed-off-by: Piotr Żelasko <[email protected]> * fix for bucket selection edge case Signed-off-by: Piotr Żelasko <[email protected]> * Add more info about the distribution to estimate_duration_bins_2d.py Signed-off-by: Piotr Żelasko <[email protected]> * Include CUDA RAM usage tracking in OOMptimizer Signed-off-by: Piotr Żelasko <[email protected]> * Track batch_size, num frames/tokens, and their padding ratio for AED multi task models Signed-off-by: Piotr Żelasko <[email protected]> * OOMptimizer documentation Signed-off-by: Piotr Żelasko <[email protected]> * Resolve TODOs and support any combination of (audio|text)->(audio|text) modalities Signed-off-by: Piotr Żelasko <[email protected]> * Add missing property decorator Signed-off-by: Piotr Żelasko <[email protected]> * fixes Signed-off-by: Piotr Żelasko <[email protected]> * Add docs about 2D bucketing with tokenizer and prompts Signed-off-by: Piotr Żelasko <[email protected]> * Fix bucket allocation logic for 2D bucketing Signed-off-by: Piotr Żelasko <[email protected]> * Bump lhotse version Signed-off-by: Piotr Żelasko <[email protected]> * fix... Signed-off-by: Piotr Żelasko <[email protected]> * Reverse bucket iteration order; move oomptimizer_schema to AsrModel Signed-off-by: Piotr Żelasko <[email protected]> * Make OOMptimizer compatible with dataclass mini-batches Signed-off-by: Piotr Żelasko <[email protected]> * Refine the schema Signed-off-by: Piotr Żelasko <[email protected]> * fixes after merging main Signed-off-by: Piotr Żelasko <[email protected]> * fix oomptimizer with pretrained models; verified canary, parakeet tdt and ctc Signed-off-by: Piotr Żelasko <[email protected]> * Disable concurrent bucketing to prevent spawning extra threads in tests Signed-off-by: Piotr Żelasko <[email protected]> * fix tests and make life more colorful Signed-off-by: Piotr Żelasko <[email protected]> * formatting Signed-off-by: Piotr Żelasko <[email protected]> * more reasonable starting batch size settings Signed-off-by: Piotr Żelasko <[email protected]> * Disable clearing of cuda memory cache Signed-off-by: Piotr Żelasko <[email protected]> * Even more conservative profile by incorporating DDP overhead simulation Signed-off-by: Piotr Żelasko <[email protected]> * Bucket selection fix and an extended unit test * Refactor registered_prompt_format_fn to enable prompt formatting before Sampler Signed-off-by: Piotr Żelasko <[email protected]> * porting fix Signed-off-by: Piotr Żelasko <[email protected]> * Fixes, move fast-path to prompted dataset Signed-off-by: Piotr Żelasko <[email protected]> * Changes from Daniel's review Signed-off-by: Piotr Żelasko <[email protected]> * OOMptimizer tests + fixes for 1D bucketing case Signed-off-by: Piotr Żelasko <[email protected]> * estimate duration bins tests Signed-off-by: Piotr Żelasko <[email protected]> * address Daniel's review Signed-off-by: Piotr Żelasko <[email protected]> * fix CPU unit test Signed-off-by: Piotr Żelasko <[email protected]> * try to fix CI test Signed-off-by: Piotr Żelasko <[email protected]> * Apply suggestions from code review Co-authored-by: oliver könig <[email protected]> Signed-off-by: Piotr Żelasko <[email protected]> * Disable 2D bucketing test with prompt due to quoting issue Signed-off-by: Piotr Żelasko <[email protected]> --------- Signed-off-by: Piotr Żelasko <[email protected]> Signed-off-by: Piotr Żelasko <[email protected]> Co-authored-by: oliver könig <[email protected]>
- Loading branch information