fix(deps): update dependency accelerate to v1 #80
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:
| Package | Type | Update | Change |
|
Generated Summary
accelerate
dependency version from^0.30.1
to^1.0.0
.accelerate
library.This summary was generated with ❤️ by rigging
| accelerate | extras | major |
^0.30.1
->^1.0.0
|Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Release Notes
huggingface/accelerate (accelerate)
v1.6.0
: : FSDPv2, DeepSpeed TP and XCCL backend supportCompare Source
FSDPv2 support
This release introduces the support for FSDPv2 thanks to @S1ro1.
If you are using python code, you need to set
fsdp_version=2
inFullyShardedDataParallelPlugin
:If want to convert a YAML config that contains the FSDPv1 config to FSDPv2 one , use our conversion tool:
To learn more about the difference between FSDPv1 and FSDPv2, read the following documentation.
DeepSpeed TP support
We have added initial support for DeepSpeed + TP. Not many changes were required as the DeepSpeed APIs was already compatible. We only needed to make sure that the dataloader was compatible with TP and that we were able to save the TP weights. Thanks @inkcherry for the work ! https://github.com/huggingface/accelerate/pull/3390.
To use TP with deepspeed, you need to update the setting in the deepspeed config file by including
tensor_parallel
key:More details in this deepspeed PR.
Support for XCCL distributed backend
We've added support for XCCL which is an Intel distributed backend which can be used with XPU devices. More details in this torch PR. Thanks @dvrogozh for the integration !
What's Changed
log_artifact
,log_artifacts
andlog_figure
capabilities to the MLflowTracker. by @luiz0992 in https://github.com/huggingface/accelerate/pull/3419New Contributors
Full Changelog: huggingface/accelerate@v1.5.2...v1.6.0
v1.5.2
: Patch: v1.5.2Compare Source
Bug Fixes:
torch.get_default_device()
requiring a higher version than what we supportpytest
import in prodFull Changelog: huggingface/accelerate@v1.5.0...v1.5.2
v1.5.1
Compare Source
v1.5.0
: : HPU supportCompare Source
HPU Support
What's Changed
import torch
by @faaany in https://github.com/huggingface/accelerate/pull/3396device=torch.get_default_device()
intorch.Generator
s by @saforem2 in https://github.com/huggingface/accelerate/pull/3420New Contributors
Full Changelog: huggingface/accelerate@v1.4.0...v1.5.0
v1.4.0
: :torchao
FP8, TP & dataLoader support, fix memory leakCompare Source
torchao
FP8, initial Tensor Parallel support, and memory leak fixestorchao
FP8This release introduces a new FP8 API and brings in a new backend:
torchao
. To use, pass inAORecipeKwargs
to theAccelerator
while settingmixed_precision="fp8"
. This is initial support, as it matures we will incorporate more into it (such asaccelerate config
/yaml) in future releases. See our benchmark examples hereTensorParallel
We have intial support for an in-house solution to TP when working with accelerate dataloaders. check out the PR here
Bug fixes
memory leak
] Replace GradientState -> DataLoader reference with weakrefs by @tomaarsen in https://github.com/huggingface/accelerate/pull/3391What's Changed
tests/test_quantization.py
on XPU by @faaany in https://github.com/huggingface/accelerate/pull/3349require_non_xpu
test markers by @faaany in https://github.com/huggingface/accelerate/pull/3301memory leak
] Replace GradientState -> DataLoader reference with weakrefs by @tomaarsen in https://github.com/huggingface/accelerate/pull/3391get_quantized_model_device_map
by @faaany in https://github.com/huggingface/accelerate/pull/3397New Contributors
Full Changelog: huggingface/accelerate@v1.3.0...v1.4.0
v1.3.0
: Bug fixes + Require torch 2.0Compare Source
Torch 2.0
As it's been ~2 years since torch 2.0 was first released, we are now requiring this as the minimum version for Accelerate, which similarly was done in
transformers
as of its last release.Core
keep_torch_compile
param tounwrap_model
andextract_model_from_parallel
for distributed compiled model. by @ggoggam in https://github.com/huggingface/accelerate/pull/3282Big Modeling
Examples
Full Changelog
What's Changed
keep_torch_compile
param tounwrap_model
andextract_model_from_parallel
for distributed compiled model. by @ggoggam in https://github.com/huggingface/accelerate/pull/3282New Contributors
Full Changelog: huggingface/accelerate@v1.2.1...v1.3.0
v1.2.1
: : PatchfixCompare Source
Full Changelog: huggingface/accelerate@v1.2.0...v1.2.1
v1.2.0
: : Bug Squashing & Fixes across the boardCompare Source
Core
find_executable_batch_size
on XPU by @faaany in https://github.com/huggingface/accelerate/pull/3236numpy._core
instead ofnumpy.core
by @qgallouedec in https://github.com/huggingface/accelerate/pull/3247data_loader
] Optionally also propagate set_epoch to batch sampler by @tomaarsen in https://github.com/huggingface/accelerate/pull/3246accelerate config
prompt text by @faaany in https://github.com/huggingface/accelerate/pull/3268Big Modeling
align_module_device
, ensure only cpu tensors forget_state_dict_offloaded_model
by @kylesayrs in https://github.com/huggingface/accelerate/pull/3217get_state_dict_from_offload
by @kylesayrs in https://github.com/huggingface/accelerate/pull/3253preload_module_classes
is lost for nested modules by @wejoncy in https://github.com/huggingface/accelerate/pull/3248DeepSpeed
Documentation
Update code in tracking documentation by @faaany in https://github.com/huggingface/accelerate/pull/3235
Replaced set/check breakpoint with set/check trigger in the troubleshooting documentation by @relh in https://github.com/huggingface/accelerate/pull/3259
Update set-seed by @faaany in https://github.com/huggingface/accelerate/pull/3228
Fix typo by @faaany in https://github.com/huggingface/accelerate/pull/3221
Use real path for
checkpoint
by @faaany in https://github.com/huggingface/accelerate/pull/3220Fixed multiple typos for Tutorials and Guides docs by @henryhmko in https://github.com/huggingface/accelerate/pull/3274
New Contributors
Full Changelog
align_module_device
, ensure only cpu tensors forget_state_dict_offloaded_model
by @kylesayrs in https://github.com/huggingface/accelerate/pull/3217find_executable_batch_size
on XPU by @faaany in https://github.com/huggingface/accelerate/pull/3236data_loader
] Optionally also propagate set_epoch to batch sampler by @tomaarsen in https://github.com/huggingface/accelerate/pull/3246numpy._core
instead ofnumpy.core
by @qgallouedec in https://github.com/huggingface/accelerate/pull/3247accelerate config
prompt text by @faaany in https://github.com/huggingface/accelerate/pull/3268get_state_dict_from_offload
by @kylesayrs in https://github.com/huggingface/accelerate/pull/3253preload_module_classes
is lost for nested modules by @wejoncy in https://github.com/huggingface/accelerate/pull/3248checkpoint
by @faaany in https://github.com/huggingface/accelerate/pull/3220Code Diff
Release diff: huggingface/accelerate@v1.1.1...v1.2.0
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 enable
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 has been generated by Renovate Bot.