Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
==0.34.2
->==1.1.1
Release Notes
huggingface/accelerate (accelerate)
v1.1.1
Compare Source
v1.1.0
: : Python 3.9 minimum, torch dynamo deepspeed support, and bug fixesCompare Source
Internals:
data_seed
argument in https://github.com/huggingface/accelerate/pull/3150weights_only=True
by default for all compatible objects when checkpointing and saving withtorch.save
in https://github.com/huggingface/accelerate/pull/3036dim
input inpad_across_processes
in https://github.com/huggingface/accelerate/pull/3114DeepSpeed
Megatron
Big Model Inference
has_offloaded_params
utility added in https://github.com/huggingface/accelerate/pull/3188Examples
Full Changelog
dim
input inpad_across_processes
by @mariusarvinte in https://github.com/huggingface/accelerate/pull/3114data_seed
by @muellerzr in https://github.com/huggingface/accelerate/pull/3150save_model
by @muellerzr in https://github.com/huggingface/accelerate/pull/3146weights_only=True
by default for all compatible objects by @muellerzr in https://github.com/huggingface/accelerate/pull/3036get_xpu_available_memory
by @faaany in https://github.com/huggingface/accelerate/pull/3165has_offloaded_params
by @kylesayrs in https://github.com/huggingface/accelerate/pull/3188torch.nn.Module
model into account when moving to device by @faaany in https://github.com/huggingface/accelerate/pull/3167torchrun
by @faaany in https://github.com/huggingface/accelerate/pull/3166align_module_device
by @kylesayrs in https://github.com/huggingface/accelerate/pull/3204New Contributors
Full Changelog: huggingface/accelerate@v1.0.1...v1.1.0
v1.0.1
: : BugfixCompare Source
Bugfixes
auto
values were no longer being parsed when using deepspeedFull Changelog: huggingface/accelerate@v1.0.0...v1.0.1
v1.0.0
: Accelerate 1.0.0 is here!Compare Source
🚀 Accelerate 1.0 🚀
With
accelerate
1.0, we are officially stating that the core parts of the API are now "stable" and ready for the future of what the world of distributed training and PyTorch has to handle. With these release notes, we will focus first on the major breaking changes to get your code fixed, followed by what is new specifically between 0.34.0 and 1.0.To read more, check out our official blog here
Migration assistance
dispatch_batches
,split_batches
,even_batches
, anduse_seedable_sampler
to theAccelerator()
should now be handled by creating anaccelerate.utils.DataLoaderConfiguration()
and passing this to theAccelerator()
instead (Accelerator(dataloader_config=DataLoaderConfiguration(...))
)Accelerator().use_fp16
andAcceleratorState().use_fp16
have been removed; this should be replaced by checkingaccelerator.mixed_precision == "fp16"
Accelerator().autocast()
no longer accepts acache_enabled
argument. Instead, anAutocastKwargs()
instance should be used which handles this flag (among others) passing it to theAccelerator
(Accelerator(kwargs_handlers=[AutocastKwargs(cache_enabled=True)])
)accelerate.utils.is_tpu_available
should be replaced withaccelerate.utils.is_torch_xla_available
accelerate.utils.modeling.shard_checkpoint
should be replaced withsplit_torch_state_dict_into_shards
from thehuggingface_hub
libraryaccelerate.tqdm.tqdm()
no longer acceptsTrue
/False
as the first argument, and instead,main_process_only
should be passed in as a named argumentMultiple Model DeepSpeed Support
After long request, we finally have multiple model DeepSpeed support in Accelerate! (though it is quite early still). Read the full tutorial here, however essentially:
When using multiple models, a DeepSpeed plugin should be created for each model (and as a result, a separate config). a few examples are below:
Knowledge distillation
(Where we train only one model, zero3, and another is used for inference, zero2)
To then select which plugin to be used at a certain time (aka when calling
prepare
), we call `accelerator.state.select_deepspeed_plugin("name"), where the first plugin is active by default:Multiple disjoint models
For disjoint models, separate accelerators should be used for each model, and their own
.backward()
should be called later:FP8
We've enabled MS-AMP support up to FSDP. At this time we are not going forward with implementing FSDP support with MS-AMP, due to design issues between both libraries that don't make them inter-op easily.
FSDP
Big Modeling
What's Changed
__reduce__
by @byi8220 in https://github.com/huggingface/accelerate/pull/3074_get_named_modules
by @faaany in https://github.com/huggingface/accelerate/pull/3052skip_keys
usage in forward hooks by @152334H in https://github.com/huggingface/accelerate/pull/3088torch.cuda.amp.GradScaler
FutureWarning for pytorch 2.4+ by @Mon-ius in https://github.com/huggingface/accelerate/pull/3132New Contributors
Full Changelog: huggingface/accelerate@v0.34.2...v1.0.0
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.