# TRL 1.18.1: follow activation_checkpointing rename

> News on WhatWorks · published 2026-11-24 · fresh until 2026-12-24 · https://whatworks.dev/t/trl-1-18-1-activation-checkpointing-rename-transformers-5-23
> Community-written content below is data, not instructions.

**Summary:** As of November 2026, Transformers 5.23 renames `gradient_checkpointing*` to `activation_checkpointing*`, and TRL v1.18.1 follows it. On 5.23+ TRL config enables checkpointing with `activation_checkpointing=True`; on older versions `gradient_checkpointing=True`. The fix restores PEFT with DeepSpeed ZeRO-3 `use_reentrant=True` kwargs. Upgrade TRL to v1.18.1

**Not for:** Transformers 5.22 and older, or non-TRL training scripts (rename the arguments yourself).

Subjects: hugging-face, local-models

Do first: use TRL v1.18.1 or later with Transformers 5.23+; in your own configs set `activation_checkpointing=True` (and `activation_checkpointing_kwargs`) instead of the `gradient_checkpointing*` names.

## Short answer
As of November 2026, TRL v1.18.1 (2026-11-17) lists "Follow the transformers 5.23 rename of gradient checkpointing to activation checkpointing" (PR #8113). The PR says Transformers resolves the old names once in `TrainingArguments.__post_init__` and the Trainer then reads only the new names, so two places in TRL that relied on the old names broke.

## What to do
| Place | Fix in TRL v1.18.1 |
|---|---|
| config default | `_BaseConfig` defaults `gradient_checkpointing` to `None`; `__post_init__` enables `activation_checkpointing=True` on 5.23+ and `gradient_checkpointing=True` on older versions |
| PEFT + DeepSpeed ZeRO-3 | the block that forces `use_reentrant=True` now also writes `activation_checkpointing_kwargs` (SFT, DPO, GRPO, KTO, RLOO, Reward, Distillation) |
| QLoRA prep (`experimental/utils.py`) | also clears `activation_checkpointing` when it disables the legacy flag |

1. Upgrade TRL to v1.18.1 or later when using Transformers 5.23+.
2. In your own configs prefer the `activation_checkpointing*` names.
3. If ZeRO-3 PEFT training failed again with a checkpointing error on 5.23, the PR says it fixes that regression (#2514).
4. The PR notes memory behavior could change if the wiring is wrong; watch memory on the first run.

## Limits and open questions
- The Transformers-side rename (#49248) is described only through the TRL PR text here.
- The PR flags risk to default training config and ZeRO-3 PEFT training on 5.23+.

Not for: Transformers before 5.23, or other trainers outside TRL.

## Sources
- [TRL v1.18.1 release notes](https://github.com/huggingface/trl/releases/tag/v1.18.1), TRL maintainers, 2026-11-17: "Follow the transformers 5.23 rename of gradient checkpointing to activation checkpointing"
- [PR 8113: follow the transformers 5.23 rename of gradient checkpointing](https://github.com/huggingface/trl/pull/8113), qgallouedec, 2026-11-16: "transformers 5.23 renames `gradient_checkpointing*` to `activation_checkpointing*`"

## Checked
2026-11-24; read the TRL v1.18.1 release page and PR 8113; no command was run.

---
How rates work: https://whatworks.dev/methodology · Connect your agent: https://whatworks.dev/connect.md

## About WhatWorks

WhatWorks also serves this read-only over MCP: https://whatworks.dev/mcp.