Repository navigation
Move the Hugging Face images to TRL 1, hub 2 and PyTorch 2.14 - #71
Conversation
Review: the Hugging Face training stack (#71), with #73 and #78This covers all three PRs that change Verdict: not as it stands.
What was runEvery build was run the way Swale runs the definitions: on CPU, read-only as uid 1000, with each
In every build the pipeline gives the same scores (POSITIVE 0.9958, NEGATIVE 0.9997). What breaks
Also in these updates
Not covered: GPU-only paths (TRL 1's Triton loss kernel, For the maintainer
|
Folds #78 (huggingface_hub 2.4.0, trl 1.18.2) and #73 (pytorch 2.14.1) into this change, so both images publish once, as transformers-gpu:5.24.1 and trl:1.18.2, with no -r1 rebuilds in between. datasets 5.2 no longer depends on fsspec[http], so aiohttp is pinned for load_dataset over http(s). TRL 1 reports every training run to huggingface.co, so both images set HF_HUB_DISABLE_TELEMETRY=1. The transformers docs now name torch 2.14. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0007e1b to
8cc8347
Compare
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. |
Added on top of Renovate's update
This PR now carries #73 and #78 as well, so
transformers-gpuandtrlpublish once, astransformers-gpu:5.24.1andtrl:1.18.2, with no-r1rebuilds in between. Once it merges, Renovate closes #73 and #78 itself, since they have nothing left to update.huggingface_hub2.4.0 andtrl1.18.2 in both images.cuda13.0-cudnn9-runtime) for both images.aiohttp==3.14.5in bothrequirements.txtfiles. datasets 5.2.0 no longer depends onfsspec[http], and without itload_datasetover http(s) fails.HF_HUB_DISABLE_TELEMETRY=1in both Dockerfiles. TRL 1.5 and later report every training run to huggingface.co.tasks/transformers/task.mdnow names torch 2.14.The review and what it ran are in this comment. The final images were built from this branch and rechecked on CPU, read-only as uid 1000. The
transformersexample gives the same scores (POSITIVE 0.9958, NEGATIVE 0.9997).trl sfttrains 3 steps and saves the adapter, with both the conversational and the standard dataset format.load_dataset("csv", data_files="https://…")reads 150 rows. Lint passes.After merging, Renovate re-pins
transformersto 5.24.1 (a minor version, which merges itself) andtrl-sftto 1.18.2 (a major version, which waits for review).Note
This PR body was truncated due to platform limits.
This PR contains the following updates:
==1.11.0→==1.16.0==5.0.1→==5.2.0==0.18.0→==0.22.0==0.2.1→==0.2.3==5.10.1→==5.24.1Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Release Notes
huggingface/accelerate (accelerate)
v1.16.0: : broader accelerator support, launcher and FSDP improvementsCompare Source
Accelerator support
Accelerate now uses
torch.acceleratormore broadly to support registered PyTorch backends without requiring a separate device-specific branch throughout the library. Existing integrations retain their native APIs where needed for compatibility.This also includes initial improvements for single-chip TPU usage through
torch-tpu. Broader TPU support remains in progress.torch-tpuusage — @tengomucho (#4570).Launcher improvements
accelerate launchnow exits cleanly when interrupted with Ctrl+C or SIGTERM, cleaning up child workers. Distributed launches also handle torchrun shutdown signals without an extra launcher traceback.--quietand--debugbehavior — @SunMarc (#4573).simple_launcherwhile preserving live output — @albertvillanova (#4305).FSDP
Several fixes address RAM-efficient loading, including compatibility with Transformers loading models onto the meta device on nonzero ranks. FSDP1 now reconnects optimizer references when initialization replaces meta parameters, and FSDP2 correctly distinguishes those parameters when mapping them to their sharded replacements.
FSDP2 also supports preparing a model without an optimizer, allowing workflows such as
Trainer.evaluate()before training.🚨🚨🚨 ## Requirements and removals
Accelerate now requires Python 3.11+ and PyTorch 2.6+. This release also removes several deprecated integrations and APIs.
FP8RecipeKwargs. UseAORecipeKwargsfor TorchAO orTERecipeKwargsfor Transformer Engine — @SunMarc (#4464).Minor fixes
notebook_launchermixed precision to worker processes — @simpleqt (#4331).accelerate launchfrom forcingtorch.compile(dynamic=False)— @yupengtang (#4254).torch.distributedinmodel_has_dtensoron builds without distributed support — @shoemoney (#4250)._no_split_modulesclasses absent from the model when configuring auto-wrapping — @qgallouedec (#4384).clip_grad_value_under FSDP2 — @hjinnkim (#4386).compile_regions— @qgallouedec (#4524).Accelerator.clip_grad_norm_with Transformers — @michaelbenayoun (#4266).all_gather_singleover the deprecatedall_gather_into_tensor— @Yi-111-a (#4272).wait_for_everyone()in CPU distributed mode on machines with an accelerator — @JoeyTan21 (#4354).OffloadedWeightsLoader— @emme1t (#4281).balanced_low_0looking up memory limits by position instead of device ID — @Om-singhaI (#4298).IndexErrorwhen a tied parameter’s partner module is split — @simpleqt (#4344).unwrap_model(keep_fp32_wrapper=False)— @yupengtang (#4255).AlignDevicesHookto the offload path — @jiqing-feng (#4327).skip_first_batches, includingdrop_last, nonblocking transfers, the slicing function, and the device mesh — @truecallerabreham (#4296).skip_first_batches— @Excelius-Wang (#4235).split_between_processeson tuples withapply_padding=True— @shoutoutuoadi325 (#4307).ACCELERATE_BYPASS_DEVICE_MAPcase-insensitively — @Sreekant13 (#4241).ParallelismConfig.to_json()returningNone— @Linxiushen (#4326).New contributors
Thanks to everyone making their first contribution!
Full changelog: v1.15.0 → v1.16.0
v1.15.0: : FSDP2 activation memory, dtensor improvementsCompare Source
v1.15.0: FSDP2 activation memory, dtensor improvements
FSDP2
A large batch of FSDP2 work this release: two fixes that cut activation memory at long sequence lengths, tied-embedding support on torch >= 2.13, and a round of checkpointing correctness and scale fixes.
Activation checkpointing was wrapping each child of the matched layer (
self_attn,mlp, the norms) instead of the layer itself, so every inter-child activation stayed saved for backward. It now wraps the layer.There's also a new FSDP2-only
activation_checkpointing_offload, which moves the remaining per-layer checkpoint inputs to pinned CPU memory. Gradients are exactly those of plain activation checkpointing:activation_checkpointing_offload: offload checkpointed layer inputs to pinned CPU memory by @qgallouedec in #4175FULL_STATE_DICTdropping every rank's adapter shard except rank 0 by @AmineDiro in #4206DTensor
Two fixes for DTensor-sharded models, which you hit with FSDP2, tensor parallelism, or any N-D parallelism setup: gradient clipping no longer fails on the
foreachop when plain tensors and DTensors are mixed, andprepare_modelleaves an already-sharded model where it is:Offloading & Quantization
An entire model can now be dispatched to disk, including tied weights — useful for tools like
llm-compressorthat compress large models on machines that can't hold them:Trackers
Custom trackers can be registered by name and then selected from
log_with=like any built-in one:Device support
Neuron gains a torch dynamo backend (so
--torch-compileworks with the Transformers Trainer) and MPS is now reported and handled properly byaccelerate envandfind_executable_batch_size.neuronbackend for torch dynamo by @michaelbenayoun in #4097accelerate envby @xquantize in #4158CLI
estimate-memoryfor timm>=1.0.29 by adding thehf-hub:prefix by @iamsharduld in #4213Minor fixes
New Contributors
Full Changelog: huggingface/accelerate@v1.14.0...v1.15.0
v1.14.0: : AMD ROCm support, FSDP2 hardeningCompare Source
FSDP2 Improvements
This release brings a large batch of FSDP2 fixes and quality-of-life improvements: correct dtype handling on load, sharding of embeddings/norms, QLoRA crash prevention, and a more robust auto-wrap policy.
AMD ROCm support
Accelerate now works end-to-end on AMD ROCm devices. Thanks @Abdennacer-Badaoui!
Neuron
Further Neuron improvements to reduce recompilation and cover missing device cases.
Quantization & Offloading
We improved offloading support for quantized models, including Torchao, int8, and tied-weight handling.
Data Loading
Minor fixes
Full Changelog: huggingface/accelerate@v1.13.0...v1.14.0
v1.13.0: : Neuron support, IPEX removal, and distributed training fixesCompare Source
AWS Neuron support
We now have support for AWS Neuron (Trainium/Inferentia) devices. Thanks @michaelbenayoun for adding this.
XPU Improvements
We've removed IPEX dependency and improved device-agnostic code for XPU.
#3912
FSDP2 Improvements
We've added a bunch of important fixes for FSDP2 users: upcasting only grad-requiring params, better tied embedding errors, DCP optimizer loading, bf16 optimizer step crash fix, and torch < 2.7.0 compatibility.
DeepSpeed Sequence Parallelism
We've added several fixes to the DeepSpeed + Sequence Parallelism integration introduced in v1.12.0, including evaluation support during SP training and proper process group handling.
FP8
We've enhanced FP8 training. Thanks @shimizust for fixing torchao support.
Performance
Accelerate now imports faster by deferring heavy dependencies, and torch.compile hooks are disabled lazily.