Liger-Kernel icon indicating copy to clipboard operation
Liger-Kernel copied to clipboard

[WIP]: Autotune Chunk Size

Open pramodith opened this issue 1 year ago • 0 comments
trafficstars

Summary

Our chunked loss functions currently statically set the chunk size to 1. However, this might lead to underutilized gpu memory resources. In this PR we show how the chunk size can be dynamically set, based on the additional peak memory consumed by the forward pass of the chunked loss being used.

Testing Done

On A100 80 GB SMX

Benchmarking against chunked orpo shows very marginal improvement in speed compared to a static chunk size. Screenshot 2024-11-19 at 10 58 59 AM

Screenshot 2024-11-19 at 10 46 43 AM

  • Hardware Type: <BLANK>
  • [ ] run make test to ensure correctness (wip)
  • [X] run make checkstyle to ensure code style
  • [X] run make test-convergence to ensure convergence

pramodith avatar Nov 19 '24 10:11 pramodith