pypi accelerate 0.12.0
v0.12.0 New doc, gather_for_metrics, balanced device map and M1 support

latest releases: 0.30.1, 0.30.0, 0.30.0rc0...
21 months ago

New documentation

The whole documentation has been revamped, just go look at it here!

New gather_for_metrics method

When doing distributed evaluation, the dataloader loops back at the beginning of the dataset to make batches that have a round multiple of the number of processes. This causes the predictions to be slightly bigger than the length of the dataset, which used to require some truncating. This is all done behind the scenes now if you replace the gather your did in evaluation by gather_for_metrics.

Balanced device maps

When loading big models for inference, device_map="auto" used to fill the GPUs sequentially, making it hard to use a batch size > 1. It now balances the weights evenly on the GPUs so if you have more GPU space than the model size, you can do predictions with a bigger batch size!

M1 GPU support

Accelerate now supports M1 GPUs, to learn more about how to setup your environment, see the documentation.

What's new?

Significant community contributions

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

  • @sywangyi
    • ccl version check and import different module according to version (#567)
    • set default num_cpu_threads_per_process to improve oob performance (#562)
    • fix some parameter setting does not work for CPU DDP and bf16 fail in… (#527)
  • @ZhiyuanChen
    • add on_main_process decorators (#488)

Don't miss a new accelerate release

NewReleases is sending notifications on new releases.