github huggingface/accelerate v0.22.0
v0.22.0: Distributed operation framework, Gradient Accumulation enhancements, FSDP enhancements, and more!

latest releases: v1.13.0, v1.12.0, v1.11.0...
2 years ago

Experimental distributed operations checking framework

A new framework has been introduced which can help catch timeout errors caused by distributed operations failing before they occur. As this adds a tiny bit of overhead, it is an opt-in scenario. Simply run your code with ACCELERATE_DEBUG_MODE="1" to enable this. Read more in the docs, introduced via #1756

Accelerator.load_state can now load the most recent checkpoint automatically

If a ProjectConfiguration has been made, using accelerator.load_state() (without any arguments passed) can now automatically find and load the latest checkpoint used, introduced via #1741

Multiple enhancements to gradient accumulation

In this release multiple new enhancements to distributed gradient accumulation have been added.

  • accelerator.accumulate() now supports passing in multiple models introduced via #1708
  • A util has been introduced to perform multiple forwards, then multiple backwards, and finally sync the gradients only on the last .backward() via #1726

FSDP Changes

  • FSDP support has been added for NPU and XPU devices via #1803 and #1806
  • A new method for supporting RAM-efficient loading of models with FSDP has been added via #1777

DataLoader Changes

  • Custom slice functions are now supported in the DataLoaderDispatcher added via #1846

What's New?

Significant community contributions

The following contributors have made significant changes to the library over the last release:

  • @yuxinyuan
    • Support wrapping multiple models in Accelerator.accumulate() (#1708)
    • Fix errors when optimizer is not a Pytorch optimizer. (#1733)
    • Get rid of calling get_scale() by patching the step method of optimizer. (#1720)
  • @NouamaneTazi
    • Better control over DDP's no_sync (#1726)
  • @abhilash1910
    • Add FSDP for XPU (#1803)
    • Ipex bug fix for device properties in modelling (#1834)
  • @statelesshz
    • Add FSDP for NPU (#1806)
    • fix failing test on 8GPU (#1724)
    • fix the bug in npu (#1728)
  • @thevasudevgupta
    • support custom slice function in DataLoaderDispatcher (#1846)

Full Changelog: v0.21.0...v0.22.0

Don't miss a new accelerate release

NewReleases is sending notifications on new releases.