Skip to content

Move the Hugging Face images to TRL 1, hub 2 and PyTorch 2.14 - #71

Merged
ItayPodhajcer merged 3 commits into
mainfrom
renovate/hugging-face-training-stack
Nov 25, 2026
Merged

ItayPodhajcer merged 3 commits into
mainfrom
renovate/hugging-face-training-stack

Conversation

@renovate

@renovate renovate Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Added on top of Renovate's update

This PR now carries #73 and #78 as well, so transformers-gpu and trl publish once, as transformers-gpu:5.24.1 and trl:1.18.2, with no -r1 rebuilds in between. Once it merges, Renovate closes #73 and #78 itself, since they have nothing left to update.

  • From Update Hugging Face training stack (major) - abandoned #78: huggingface_hub 2.4.0 and trl 1.18.2 in both images.
  • From Update pytorch/pytorch Docker tag to v2.14.1 #73: the PyTorch 2.14.1 base (cuda13.0-cudnn9-runtime) for both images.
  • aiohttp==3.14.5 in both requirements.txt files. datasets 5.2.0 no longer depends on fsspec[http], and without it load_dataset over http(s) fails.
  • HF_HUB_DISABLE_TELEMETRY=1 in both Dockerfiles. TRL 1.5 and later report every training run to huggingface.co.
  • tasks/transformers/task.md now 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 transformers example gives the same scores (POSITIVE 0.9958, NEGATIVE 0.9997). trl sft trains 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 transformers to 5.24.1 (a minor version, which merges itself) and trl-sft to 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:

Package Change Age Adoption Passing Confidence
accelerate ==1.11.0 → ==1.16.0 age adoption passing confidence
datasets ==5.0.1 → ==5.2.0 age adoption passing confidence
peft ==0.18.0 → ==0.22.0 age adoption passing confidence
sentencepiece ==0.2.1 → ==0.2.3 age adoption passing confidence
transformers ==5.10.1 → ==5.24.1 age adoption passing confidence

Warning

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 improvements

Compare Source

Accelerator support

Accelerate now uses torch.accelerator more 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.

Launcher improvements

accelerate launch now 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.

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.

Minor fixes

New contributors

Thanks to everyone making their first contribution!

Full changelog: v1.15.0 → v1.16.0

v1.15.0: : FSDP2 activation memory, dtensor improvements

Compare 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:

# fsdp2.yaml
fsdp_config:
  fsdp_version: 2
  fsdp_auto_wrap_policy: TRANSFORMER_BASED_WRAP
  fsdp_activation_checkpointing: true
  fsdp_activation_checkpointing_offload: true
accelerate launch --config_file fsdp2.yaml train.py
  • FSDP2 activation checkpointing: wrap the matched transformer layer itself, not each of its children by @​qgallouedec in #​4172
  • Add FSDP2 activation_checkpointing_offload: offload checkpointed layer inputs to pinned CPU memory by @​qgallouedec in #​4175
  • Fix FSDP2 tied-embedding models on torch >= 2.13: put the output embedding in the same fully_shard group by @​qgallouedec in #​4171
  • Fix FSDP2/PEFT/FULL_STATE_DICT dropping every rank's adapter shard except rank 0 by @​AmineDiro in #​4206
  • FSDP2: per-rank torch.save/load for SHARDED_STATE_DICT to fix 2800+ NPU checkpoint timeout by @​gygdh-001 in #​4105
  • Fix FSDP sharded checkpoint path resolution by @​HaomingSong in #​4119
  • Raise a clear error when FSDP is enabled on a mesh with no shard dimension by @​qgallouedec in #​4180

DTensor

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 foreach op when plain tensors and DTensors are mixed, and prepare_model leaves 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-compressor that 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:

from accelerate import Accelerator
from accelerate.tracking import register_tracker_class

register_tracker_class(MyTracker)  # MyTracker.name == "my_tracker"
accelerator = Accelerator(log_with="my_tracker")

Device support

Neuron gains a torch dynamo backend (so --torch-compile works with the Transformers Trainer) and MPS is now reported and handled properly by accelerate env and find_executable_batch_size.

CLI

Minor fixes

New Contributors

Full Changelog: huggingface/accelerate@v1.14.0...v1.15.0

v1.14.0: : AMD ROCm support, FSDP2 hardening

Compare 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

  • Feat: Support dynamic batch size in BatchSamplerShard with even_batches by @​yuxinyuan in #​3969
  • Fix iterable dataset sharding condition when n_shards == num_processes by @​SunMarc in #​3958
  • Fix implicit padding in split_between_processes when apply_padding=False and num_samples < num_processes by @​3manifold in #​4052

Minor fixes

Full Changelog: huggingface/accelerate@v1.13.0...v1.14.0

v1.13.0: : Neuron support, IPEX removal, and distributed training fixes

Compare 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.

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.

[!IMPORTANT]
✂ PR body was truncated to here.

@ItayPodhajcer

Copy link
Copy Markdown
Contributor

Review: the Hugging Face training stack (#71), with #73 and #78

This covers all three PRs that change images/transformers-gpu (the transformers definition) and images/trl (trl-sft), because they only work in a certain combination.

Verdict: not as it stands.

What was run

Every build was run the way Swale runs the definitions: on CPU, read-only as uid 1000, with each task.md's own command and env. Two checks:

  • the transformers example's pipeline (device=-1) through the definition's wrapper;
  • trl sft --config … with a config shaped like trl-sft's example: LoRA, trl-internal-testing/tiny-Qwen2ForCausalLM-2.5 on trl-internal-testing/zen, bf16: false, 3 steps.
Build Base transformers datasets trl huggingface_hub Result
main (control) torch 2.13.0 5.10.1 5.0.1 0.29.1 1.33.0 both pass
this PR torch 2.13.0 5.24.1 5.2.0 0.29.1 1.33.0 both pass
#73 torch 2.14.1 5.10.1 5.0.1 0.29.1 1.33.0 both pass
this PR + #73 + #78 torch 2.14.1 5.24.1 5.2.0 1.18.2 2.4.0 both pass
this PR + #78 on torch 2.13.0 torch 2.13.0 5.24.1 5.2.0 1.18.2 2.4.0 both pass

In every build the pipeline gives the same scores (POSITIVE 0.9958, NEGATIVE 0.9997). trl sft trains 3 steps to the same train_loss (11.93) and saves adapter_config.json and adapter_model.safetensors with the same LoRA settings. An empty HF_TOKEN still means anonymous access on hub 2.4.0.

What breaks

  • aiohttp is gone (this PR). datasets 5.0.1 depended on fsspec[http], which brought aiohttp; 5.2.0 depends on plain fsspec (#8825). On this PR, load_dataset("csv", data_files="https://…") fails with HTTPFileSystem requires "requests" and "aiohttp" to be installed. It works on main, and again with aiohttp==3.14.5 pinned in both requirements.txt files.
  • Update Hugging Face training stack (major) - abandoned #78 can't install yet. Its CI fails with transformers 5.10.1 depends on huggingface-hub<2.0 (run). datasets 5.0.1 has the same cap, so Update Hugging Face training stack (major) - abandoned #78 needs both of this PR's bumps. Transformers 5.24.1 and datasets 5.2.0 both accept hub <3.0.
  • Two trl-sft config keys stop working (this PR). Transformers 5.15.0 removed warmup_ratio and logging_dir from TrainingArguments (#46917). A config using either now exits 2 (unrecognized arguments) within seconds; warmup_steps: 0.1 replaces warmup_ratio. The definition's example uses neither.
  • With TRL 1 (Update Hugging Face training stack (major) - abandoned #78), keys for other trainers fail. trl sft now launches with plain python or torchrun instead of accelerate launch (#7180), so a key the SFT script doesn't know, such as GRPO's num_generations, exits 2 where 0.29.1 ignored it. The trl sft CLI, --config handling and every key in the example are unchanged (MIGRATION.md).
  • With hub 2 (Update Hugging Face training stack (major) - abandoned #78): import httpx fails in the images, and huggingface-cli is gone; use hf (v2.0.0). The definitions' docs mention neither.

Also in these updates

  • Security: Transformers 5.17.0 fixes custom generation code being downloaded before the trust_remote_code check (#48620, GHSA-x9r9-c232-4q39, high). The advisory lists <= 5.8.1 with no patched version, but per the fix 5.10.1 still downloads first.
  • Telemetry (Update Hugging Face training stack (major) - abandoned #78): from TRL 1.5.0, each trainer start sends huggingface.co the trainer name, model architecture, whether PEFT is on, the dataset source and the GPU name; no token is sent (#5758). HF_HUB_DISABLE_TELEMETRY=1 turns it off.
  • PyTorch 2.14.1 (Update pytorch/pytorch Docker tag to v2.14.1 #73): nothing breaks the pinned libraries. It keeps CUDA 13.0.3 and the same GPU architectures, and the images grow from 6.09 to 6.75 GB. tasks/transformers/task.md says "torch 2.13 (CUDA 13.0)", which needs updating with it.
  • For users' own scripts on Transformers 5.24: pipe.generation_config is gone (#49269), the cache API was removed (#49605), and past_key_values is renamed to cache, though the old name still works (#50585).

Not covered: GPU-only paths (TRL 1's Triton loss kernel, device_map="auto", multi-GPU torchrun).

For the maintainer

renovate Bot and others added 2 commits November 25, 2026 09:33
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>
@ItayPodhajcer
ItayPodhajcer force-pushed the renovate/hugging-face-training-stack branch from 0007e1b to 8cc8347 Compare November 25, 2026 07:36
@ItayPodhajcer ItayPodhajcer changed the title Update Hugging Face training stack Move the Hugging Face images to TRL 1, hub 2 and PyTorch 2.14 Nov 25, 2026
@renovate

renovate Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

Edited/Blocked Notification

Renovate 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.

⚠️ Warning: custom changes will be lost.

@ItayPodhajcer
ItayPodhajcer merged commit d4f4e1a into main Nov 25, 2026
8 checks passed
@ItayPodhajcer
ItayPodhajcer deleted the renovate/hugging-face-training-stack branch November 25, 2026 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant