AIGenLab
EN

UPDATEhugging-face-peft v0.22.0

PEFT v0.22.0 completes FSDP2 saves for multi-GPU LoRA

Version & typev0.22.0 · Feature
In short

This release fills in LoRA training, merging and export under FSDP2 and tensor parallelism, adds PaCA and two initializers, and moves adapter inspection before training. Python 3.11 is now the floor, and modules_to_save matches whole names.

What changed in this release

24 checkpoints in 5 groups, organized by task from the official notes. Checkpoints do not count separate features or commits.

New methods

  • PaCA replaces adapter layers with partial connections; the release claims 22% less training time and 16% less memory than LoRA.
  • Astra estimates output-activation covariance on a small calibration set and initializes LoRA in its lowest-variance subspace.
  • NoRA normalizes each column of A along the rank axis, keeps B at zero, and sets lora_alpha to rank r.

Distributed training

  • LoRA supports the embedding_colwise tensor-parallel plan.
  • Replicated LoRA weights start synchronized across TP ranks, including with init_lora_weights=False.
  • Full layer shape is inferred on FSDP2/HSDP meshes with custom dimension names.
  • Switching or temporarily disabling adapters preserves trainability on FSDP2 shards.
  • Exiting disable_adapter() reshards only when needed.
  • merge_adapter() and unmerge_adapter() update sharded parameters even with reshard_after_forward=False.

Saving and merging

  • Export gathers FSDP2/HSDP adapter DTensors and finds weights under nested FSDP or activation-checkpointing wrappers.
  • Sharded adapters need save_pretrained() on every participating rank and is_main_process=True only on the writing rank.
  • LoRA and several methods scale merge deltas in place, avoiding one full-size allocation per layer.
  • FSDP2 setup preserves registered MultiheadAttention parameter identities.

Inspection and validation

  • print_healthcheck() summarizes adapter state, dtypes, devices and trainable parameters.
  • healthcheck() returns a JSON-serializable report; the release recommends it instead of print_trainable_parameters().
  • Loading warns on missing and unexpected adapter keys by default; strict_adapter_check can be error or ignore.
  • Adapter injection validates every target before modifying the model.
  • create_dummy_lora_config() builds a dummy start adapter with enough rank and layer coverage for cross-layer hotswaps.
  • OFT, BOFT, DEFT, and standard and mini MiSS adapters can be converted to LoRA.

Compatibility and behaviour

  • Python 3.11 is the minimum; Python 3.10 has reached end of life.
  • modules_to_save now matches whole sub-module names instead of suffixes.
  • k-bit training without kwargs now uses Transformers' default non-reentrant activation checkpointing.
  • low_cpu_mem_usage=True preserves dtypes instead of restoring checkpoint dtypes.
  • The OFT Conv2d forward fix can change outputs from existing unmerged checkpoints.

Read the original announcement

On this page
  1. Release inventory
  2. Multi-GPU LoRA teams hit…
  3. PaCA and two new LoRA ini…
  4. FSDP2 and tensor parallel…
  5. New pre-training health c…
  6. Python 3.11 is the floor
  7. PEFT owns adapter layers…
  8. v0.21.3 patched one save…
  9. Release analysis
  10. Questions
  11. Sources & method

ContextMulti-GPU LoRA teams hit saving and merging first, and that is where this release cuts

Training can start under FSDP2 or tensor parallelism while the handoff still breaks. Swapping adapters, disabling one for a reference pass, merging into the base model and exporting to shared storage can each leave sharded parameters out of step.

This release centres on TP and FSDP2 and changes that path: layer-shape inference, trainability after adapter changes, sharded merges, and adapter weights found for export. It asks for Transformers v5.17 or newer.

Changes fall into 5 groups: new methods, distributed training, saving and merging, inspection and validation, and compatibility. The chart below spreads the release across them; the sections that follow give the action and cost for each.

Overview: v0.22.0 changes across five groups—new methods, distributed training, saving and merging, inspection and validation, and compatibility. Group size does not indicate importance or effort.
Where the 24 grouped changes landWhere the 24 grouped changes landNew methods3Distributed training6Saving and merging4Inspection and validation6Compatibility and behaviour5
AIGenLab original

PaCA and two new LoRA initializers make training time and memory the method-selection criteria

  1. PaCA tunes random input columns instead of adapter layers; the paper claims 22% less training time, 16% less memory and 23% longer sequences.
  2. For Astra, set init_lora_weights="astra" and run preprocess_astra before injection; for NoRA, use "nora", set lora_alpha=r, and keep B at zero.
  3. PaCA supports nn.Linear only; 22% and 16% are paper claims, not our tests.

FSDP2 and tensor parallelism now cover training, merging and export, with one save-call change per rank

  1. LoRA supports the embedding_colwise TP plan; replicated weights start synchronized across ranks, including with init_lora_weights=False.
  2. Custom FSDP2/HSDP meshes infer full shapes; swaps/temporary disables retain trainability; merge/unmerge reach shards with reshard_after_forward=False.
  3. Sharded exports need save_pretrained() on every participating rank, with is_main_process=True only on the writer rank.

New pre-training health check plus stricter loading and injection validation

  1. print_healthcheck() summarizes adapter state, dtypes and devices; healthcheck() returns JSON-serializable data.
  2. Loading warns on missing and extra keys; strict_adapter_check takes error or ignore.
  3. All targets are validated before the model is modified.

Python 3.11 is the floor, while modules_to_save and three defaults change existing scripts

  1. Python 3.11+ is required; the TP/FSDP2 improvements need Transformers v5.17+.
  2. modules_to_save now matches whole names: ["classifier"] no longer matches model.other_classifier; update old checkpoint configs.
  3. No kwargs: k-bit training uses the current non-reentrant default; pass activation_checkpointing_kwargs={"use_reentrant": True} to opt back in.

PEFT owns adapter layers while Axolotl and ms-swift own the full training pipeline

Use PEFT to swap adapters in your own training loop; use Axolotl or ms-swift for framework-managed training and checkpointing. PEFT is an adapter library on Transformers, while the other two provide training and checkpoint flows. Their configuration, save duties and validation defaults therefore sit at different layers.

Bottom line: choose PEFT for adapter swapping and method support; choose Axolotl or ms-swift for framework workflows. Neither replaces an adapter library for inference-side LoRA loading or PaCA, OFT and BOFT.

UpdateAxolotl v0.21.1ms-swift v4.6.1PEFT v0.22.0
New training-side method or optionMerge-aware BF16 LoRA (lora_merge_aware: bf16) trains on the BF16 weights a merged vLLM sync servesEntropack flexible quantization for QLoRA-style training (#10415)PaCA, Astra and NoRA; init_lora_weights takes astra or nora
Multi-GPU sharded trainingAxolotl reports FSDP2 LoRA/QLoRA checkpoints without a rank 0 gather; Beam EP=8 fell from about 2:20 to 11.6 s (#4188)Megatron-Core 0.18 (#10087); TP/PP/CP/EP/ETP divisibility checked before process groups start (#10393)embedding_colwise TP plan; full layer shapes on custom FSDP2/HSDP meshes (#4112, #3838)
Sharded save or exportadapter_checkpoint_format: sharded writes sharded adapter checkpoints (#4188)The final GPTQ checkpoint format persists after export (#10425)Export gathers FSDP2/HSDP adapter DTensors; every participating rank calls save_pretrained(), and only the writing rank sets is_main_process=True (#4065, #4108)
Configuration or load validationThe CCE plugin raises at load time for an unpatched logit softcap or scale (#4182)Parallel-argument preflight gives actionable errors (#10393)Targets validated before injection; strict_adapter_check takes error or ignore (#3981, #3832)

v0.21.3 patched one save path; v0.22.0 completes the sharded adapter chain

v0.21.3 patched DTensor TP saves; v0.22.0 completes the FSDP2/HSDP sharded adapter chain. The older release saved only adapter weights when writing a DTensor tensor-parallel model. That avoids Trainer gathering the whole sharded model when save_pretrained runs on every rank.

v0.22.0 goes further, adding layer-shape inference on FSDP2 and HSDP, trainability after adapter changes, sharded merges and adapter lookup under nested wrappers. The Python floor and the state report change too.

Featurev0.21.3v0.22.0
Sharded or DTensor adapter save#3963 gathers only adapter weights when saving a DTensor TP model, avoiding a whole-model gather on every rankExport gathers FSDP2/HSDP adapter DTensors and finds weights under nested wrappers; every participating rank calls save_pretrained() (#4065, #4108)
Minimum Pythonsetup.py requires >=3.10.0 and lists classifiers through 3.13python_requires rises to >=3.11.0 and the classifiers add 3.14
Adapter state reportpeft_model.py has print_trainable_parameters(), which prints trainable parameters, all parameters and a percentagehealthcheck() and print_healthcheck() report state, dtypes and devices instead of print_trainable_parameters() (#3798, #3944)

Release analysisUpgrade first for FSDP2, HSDP, TP exports and affected compatibility paths

Our view, not independently tested: upgrade first for FSDP2/HSDP/TP adapter exports, k-bit training, suffix-based modules_to_save, old OFT Conv2d checkpoints or Python 3.10. Single-GPU LoRA inference without export can wait for the next maintenance window.

Axolotl v0.21.1 exposes adapter_checkpoint_format: sharded; ms-swift v4.6.1 checks parallel arguments before process groups start; PEFT leaves per-rank saves to your loop. Our view, not independently tested: borrow their acceptance habits first.

Start with print_healthcheck() and strict_adapter_check="error" on a small model, then verify multi-GPU saves rank by rank, and upgrade Python and Transformers last. Do not replace a production LoRA baseline with PaCA. Our view, not independently tested.

Record the changed ranks, Python and Transformers versions, and healthcheck report location in the upgrade ticket. That separates configuration, shard and checkpoint failures without a full retraining run.

AIGenLab views

Not independently tested

Multi-GPU adapter projects should put health checks, strict loading and rank-by-rank save validation on the upgrade checklist.

The release changes state reporting, load validation and sharded export together, and all three determine whether a training handoff can be reproduced.

PaCA is a useful comparison run when training time or activation memory is constrained, not a direct replacement for a proven production LoRA baseline.

The release cites paper gains while limiting layer type, tokens per step and target modules; we did not reproduce them on the same data.

Validate on a small model first, then upgrade Python and Transformers, and only then change multi-GPU save calls to keep the change surface small.

The release changes the Python floor, dependency floor, checkpoint defaults and save responsibilities at once, so staged validation isolates failures.

Questions

Which ranks call save_pretrained() when exporting sharded adapters?
Every participating rank calls it; only the rank writing the files sets is_main_process=True.
What are the Python and Transformers minimums in this release?
PEFT requires Python 3.11 or newer; the TP and FSDP2 improvements require Transformers v5.17 or newer.
Are PaCA's 22% and 16% figures AIGenLab test results?
No. They come from the paper cited in the release and cover training time and memory; we did not reproduce them on the same data.

Official sources and scope

Dates beside sources indicate when we consulted them, not when the vendor released the update. Procedures are editorial guidance, not independently tested.