Skip to content

Bump transformers from 4.57.1 to 5.0.0rc3 in /.ci/docker#1

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/pip/dot-ci/docker/transformers-5.0.0rc3
Open

Bump transformers from 4.57.1 to 5.0.0rc3 in /.ci/docker#1
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/pip/dot-ci/docker/transformers-5.0.0rc3

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Apr 8, 2026

Copy link
Copy Markdown

Bumps transformers from 4.57.1 to 5.0.0rc3.

Release notes

Sourced from transformers's releases.

Release candidate v5.0.0rc3

New models:

What's Changed

We are getting closer and closer to the official release! This RC is focused on removing more of the deprecated stuff, fixing some minors issues, doc updates.

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    You can disable automated security fix PRs for this repo from the Security Alerts page.

Bumps [transformers](https://github.com/huggingface/transformers) from 4.57.1 to 5.0.0rc3.
- [Release notes](https://github.com/huggingface/transformers/releases)
- [Commits](huggingface/transformers@v4.57.1...v5.0.0rc3)

---
updated-dependencies:
- dependency-name: transformers
  dependency-version: 5.0.0rc3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python Pull requests that update python code labels Apr 8, 2026
ryan-li-ryanllli-aws pushed a commit that referenced this pull request Jun 11, 2026
…nto canonicalize_graph_pass (pytorch#3488)

## Summary

Two related graph-pass changes in `graph_trainer`:

1. **Add `remove_b2b_transpose_pass`** — collapses back-to-back
`aten.t(aten.t(x))` transpose pairs. These appear in traced fwd+bwd
graphs from `F.linear` when `simple_fsdp` redistributes weight tensors.
Two consecutive `aten.t` form an involution (identical shape *and*
strides), so removing them is **bitwise numerics-preserving**. The pass
also handles chains (`t(t(t(x))) -> t(x)`) and keeps the inner transpose
when it still feeds other consumers.

2. **Bundle the no-op cleanup passes into a single
`canonicalize_graph_pass` entry** in `compile_time_passes`:
   - `remove_detach_pass`
   - `remove_identity_view_pass`
   - `remove_b2b_transpose_pass`
   - `remove_identity_slice_pass`
   - `normalize_view_ops_as_reshape`

`normalize_view_ops_as_reshape` moves from `passes.py` into
`remove_noop_passes.py` alongside the other graph-cleanup passes. The
sub-passes stay public so each is unit-tested in isolation.

## Why

The cleanup passes are all numerics-preserving local rewrites that ran
as four separate pass-list entries. Folding them into one
`canonicalize_graph_pass` keeps `compile_time_passes` readable and
groups them as one logical step, while the new b2b-transpose rewrite
removes redundant transpose pairs that `F.linear` + FSDP introduce.

## Behavior note

`--compile.disable_passes` now toggles `canonicalize_graph_pass` as a
whole rather than the individual sub-passes. No callsite
(configs/scripts/README) disabled them individually, so nothing breaks.

## Verification

Ran the llama3 debug model (FSDP=4, TP=2, `aot_fx_trace`,
`--compile.debug_graph_passes`). `remove_b2b_transpose_pass` logs its
removal count directly:

```
[rank0]:[titan] - root - INFO - Removed 129 back-to-back transpose node(s) from the graph
```

`canonicalize_graph_pass` is pass #1; its op-count diff confirms the
same 129 nodes (`t.default: 215 -> 86`):

```
nodes: 2460 -> 1851 (-609)
  t.default:        215 -> 86  (-129)   <- remove_b2b_transpose_pass
  detach.default:    40 -> 0   (-40)
  view.default:     634 -> 0   (-634)
  _unsafe_view:      43 -> 0   (-43)
  slice.Tensor:      40 -> 0   (-40)
  reshape.default:    0 -> 277 (+277)
```

3 training steps, loss `8.11353 -> 7.80330 -> 7.09355`.

## Test plan

```bash
pytest torchtitan/experiments/graph_trainer/tests/test_passes.py \
  -k "TestRemoveB2BTransposePass or TestCanonicalizeGraphPass or \
      TestNormalizeViewOpsAsReshape or TestRemoveDetachPass or \
      TestRemoveIdentityViewPass or TestRemoveIdentitySlicePass"
```

Added `TestRemoveB2BTransposePass` (pair removal + numerics, lone
transpose kept, inner transpose with another user kept, chain collapse,
no-op on transpose-free graphs) and `TestCanonicalizeGraphPass`
(end-to-end bundle). All pass; `pre-commit run --all-files` clean.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python Pull requests that update python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants