transformers
Pipeline parallel naive inference
#47289
Merged
Go
Login via GitHub
Home
FAQ
Install
Login
via GitHub
Overview
Commits
317
Changes
View On
GitHub
Pipeline parallel naive inference
#47289
3outeille
merged 317 commits into
main
from
pp_inference
Merge branch 'split/a-pr-2-fsdp-module' into split/a-pr-3-dual-path-l…
70544cd9
Merge branch 'split/a-pr-3-dual-path-loading' into split/a-pr-4-fsdp-…
17c6d402
add fsdp plan to 2 models for now
00eb1166
add tests fsdp mixin
be296ddf
linting
05900d60
refactor test fsdp mixin
fc2423bd
test fsdp mixin cleaning
5bbd8201
remove fsdp policy in tests + trim down further
b6d0b67a
test fsdp clean
ea361231
restore test_modeling_utils
bec4d23a
linting
8d3d3298
start trim down stuff
6316ee1e
fix
6e9004ec
breaking: cleaning modeling_utils.py
68df491a
load path with fsdp (dtensor) and tp (old tp) is linked
16b0b291
linting
e976a44c
add saving
a2fb155f
styling
5f52f196
fix tp ci
7f543017
add fsdp to ci
99f79acc
linting
b4514906
pick one model only for this PR
54ff4d1d
restore
33995399
trigger fsdp ci
11cf79c2
doc cleaning + tp_size remove
5b7ac3e5
fix tp ci for ep
06b0c394
edit doc
7a94d77a
move distributed function to utils + guarding
f3c742b7
linting
37df13ee
Merge branch 'main' into split/a-pr-2-fsdp-module
dd1000bb
expand_fsdp_plan iterate over modules
5c95559e
Merge branch 'split/a-pr-2-fsdp-module' of https://github.com/hugging…
00a11b6a
Merge branch 'split/a-pr-2-fsdp-module' into split/a-pr-3-dual-path-l…
fd3d4b08
Merge branch 'split/a-pr-3-dual-path-loading' into split/a-pr-4-fsdp-…
86875d22
comment about tie embedding
e4613e67
Merge branch 'split/a-pr-2-fsdp-module' into split/a-pr-3-dual-path-l…
c2b8451a
add comment tied embedding
d558f999
Merge branch 'split/a-pr-2-fsdp-module' into split/a-pr-3-dual-path-l…
aed1818b
Merge branch 'split/a-pr-3-dual-path-loading' into split/a-pr-4-fsdp-…
450579ba
add DistributedMixin
91260ba4
Merge branch 'main' into split/a-pr-2-fsdp-module
1541674d
Merge branch 'split/a-pr-2-fsdp-module' into split/a-pr-3-dual-path-l…
9fd759d8
solve merge conflict
84dd1078
Merge branch 'main' into split/a-pr-2-fsdp-module
9fae1b40
some cleaning
eb653bda
Merge branch 'split/a-pr-3-dual-path-loading' of https://github.com/h…
dcaa20ae
cleaning + comment
d03499fa
rename function for clarity
fb5533e1
Apply suggestion from @ArthurZucker
7838dc6c
doc
877052b5
Merge branch 'split/a-pr-3-dual-path-loading' of https://github.com/h…
59f666fa
comment
17643a7b
Merge branch 'split/a-pr-2-fsdp-module' into split/a-pr-3-dual-path-l…
7bb152cd
Merge branch 'main' into split/a-pr-2-fsdp-module
0b4d1e06
Merge branch 'split/a-pr-2-fsdp-module' into split/a-pr-3-dual-path-l…
101562d0
Merge branch 'split/a-pr-3-dual-path-loading' into split/a-pr-4-fsdp-…
99576ee8
linting
22215b7c
Merge branch 'split/a-pr-4-fsdp-orchestration' of https://github.com/…
f6ed4657
refactor
18d709c6
abstract to mixin
566ef6e4
typo
b632db38
Add FSDP plans to all models from distributed branch.
0eec8c78
fsdp plans
a1f4b71e
add fsdp plans
a07e5bf8
linting
0dfe224d
linting
e5a65357
3outeille
changed the title
Pipeline parallel native inference
Pipeline parallel naive inference
136 days ago
3outeille
marked this pull request as ready for review
135 days ago
3outeille
marked this pull request as draft
135 days ago
Add distributed runtime utils and DistributedMixin (FSDP orchestratio…
e764cebd
Wire DistributedConfig through from_pretrained and save_pretrained (F…
61362b74
Add FSDP CI and end-to-end FSDP tests (FSDP orchestration 3/3).
eb34d37f
addd ep_plan
b866f008
Merge branch 'split/a-pr-4-1-distributed-runtime' into split/a-pr-4-2…
3da6fb9a
Merge branch 'split/a-pr-4-2-orchestration' into split/a-pr-4-3-fsdp-…
ca8d0370
restore validate module
b3f45385
Wire DistributedConfig through from_pretrained and save_pretrained.
b1fb1b93
revert
1bf32cc4
Merge branch 'split/a-pr-4-1-distributed-runtime' into split/a-pr-4-2…
1620c0f2
Merge branch 'split/a-pr-4-2-orchestration' into split/a-pr-4-3-fsdp-…
fe0dcf7d
inline distribute_model
e52fda3f
revert
71dde8aa
remove saving/loading
4e23dbf1
leaner mixin
5742a2ef
downgrade torch version guarding
5c81035d
remove
004354f8
linting
6d03414a
Merge branch 'split/a-pr-4-1-distributed-runtime' into split/a-pr-4-3…
450987f3
revert
47d85adb
Merge branch 'split/a-pr-4-2-fsdp-tests-ci' of https://github.com/hug…
c577f337
revert
b319d6ac
3outeille
changed the base branch from
split/a-pr-4-fsdp-orchestration
to
split/a-pr-4-1-distributed-runtime
134 days ago
3outeille
changed the base branch from
split/a-pr-4-1-distributed-runtime
to
split/a-pr-4-fsdp-orchestration
134 days ago
post_init() parallel plan move to mixin
eb9a081e
Merge branch 'split/a-pr-4-1-distributed-runtime' into split/a-pr-4-2…
d5358f3e
revert tp mixin
9a783c8c
Merge branch 'split/a-pr-4-1-distributed-runtime' into split/a-pr-4-2…
0448e72f
add save/load
259bff43
Merge branch 'main' into split/a-pr-4-1-distributed-runtime
b15b63e1
Merge branch 'main' into split/a-pr-4-1-distributed-runtime
17d611b4
Merge branch 'main' into split/a-pr-4-1-distributed-runtime
7fe841b7
Merge branch 'split/a-pr-4-1-distributed-runtime' into split/a-pr-4-2…
5f9b5ab2
3outeille
changed the base branch from
split/a-pr-4-fsdp-orchestration
to
split/a-pr-4-2-fsdp-tests-ci
130 days ago
3outeille
changed the base branch from
split/a-pr-4-2-fsdp-tests-ci
to
split/a-pr-4-fsdp-orchestration
130 days ago
3outeille
changed the base branch from
split/a-pr-4-fsdp-orchestration
to
split/a-pr-4-2-fsdp-tests-ci
129 days ago
adapt distributed config to handle pp_size
e04218b7
edit validate
e10e395b
init pipeline parallelism
37138033
avoid loading weights with TP when pp_size>1
6fcf61b2
cleaning args in initialize_pipeline_parallelism
1a191df6
add very dumb layers splitting
eb6e1779
add test pipeline parallel
f8c04ba6
draft pp + generate test to be clean
ecb93e57
add weight loading logging
7d7fb75f
cleaning
f370a7fe
remove comm_device to make it an attribute
cdb88870
begin to refactor
052c786a
avoid loading report when tp is enabled
5abdb538
cleaning pp
e2d73c13
better cleaning pp
477df095
cleaning pp
a04d7deb
better cleaning broadcast_from_last
a9652149
cleaning pp
f1055b57
pp tests no mixing
2831886b
handle tied embeddings
5113318f
linting
2abb1285
doc
8bc87b4a
unecessary if
b2fda896
comment
cd287c8f
linting
2b98d8b3
make sure pp doesnt go into tp shard and distribute
d7d7b09d
3outeille
force pushed
from
f91b8ce5
to
d7d7b09d
129 days ago
Merge branch 'main' into split/a-pr-4-2-fsdp-tests-ci
b95be32b
3outeille
changed the base branch from
split/a-pr-4-2-fsdp-tests-ci
to
main
129 days ago
3outeille
changed the base branch from
main
to
split/a-pr-4-2-fsdp-tests-ci
129 days ago
only FSDP save/load for now
d6257574
Merge branch 'split/a-pr-4-2-fsdp-tests-ci' of https://github.com/hug…
9e810e40
Merge branch 'split/a-pr-4-2-fsdp-tests-ci' into pp_inference
fd0d8ee4
revert
049b89c0
Merge remote-tracking branch 'origin/split/a-pr-4-2-fsdp-tests-ci' in…
a03f35a0
3outeille
marked this pull request as ready for review
129 days ago
Merge branch 'split/a-pr-4-2-fsdp-tests-ci' into pp_inference
4f843f98
refactor
6b35d0e3
Merge branch 'split/a-pr-4-2-fsdp-tests-ci' into split/a-pr-5-fsdp-plans
862b428b
Merge branch 'split/a-pr-4-2-fsdp-tests-ci' into pp_inference
5ca6805f
modular
e5032053
Merge branch 'split/a-pr-5-fsdp-plans' of https://github.com/huggingf…
c7fa8437
Merge branch 'main' into split/a-pr-4-2-fsdp-tests-ci
047bd41d
Merge branch 'main' into split/a-pr-4-2-fsdp-tests-ci
8c96054e
Merge branch 'split/a-pr-4-2-fsdp-tests-ci' into split/a-pr-5-fsdp-plans
a1b0d779
Base automatically changed from
split/a-pr-4-2-fsdp-tests-ci
to
main
127 days ago
Merge branch 'main' into split/a-pr-5-fsdp-plans
c364a541
ea
36ca137e
Merge branch 'main' into split/a-pr-5-fsdp-plans
2f87b7db
begin migration TP
a171a192
clean up
71255bfa
Merge branch 'main' into split/a-pr-5-fsdp-plans
d44d5db9
add it to pretrained model
507a3c7d
Merge branch 'main' into pp_inference
6337fcc1
linting
258ab19f
fix the test by moving in init class the fsdp plan instead of post init
70de2959
edit
830f0e40
replace everything
0ddc1722
Merge branch 'split/a-pr-5-fsdp-plans' into distributed_guarding
7193907c
adapt distributed config to handle pp_size
de324e6f
init pipeline parallelism
2c76ecb6
avoid loading weights with TP when pp_size>1
ae94c9eb
cleaning args in initialize_pipeline_parallelism
f42ea7a7
add very dumb layers splitting
e5b951f2
add test pipeline parallel
d5708213
draft pp + generate test to be clean
7978a176
add weight loading logging
e65ec3a3
cleaning
70d8dff5
remove comm_device to make it an attribute
923d62b8
begin to refactor
7bddd7bd
avoid loading report when tp is enabled
e22ef09e
cleaning pp
b1d38144
better cleaning pp
ad82b9bb
cleaning pp
22aad905
better cleaning broadcast_from_last
7b84af8f
cleaning pp
b2800488
pp tests no mixing
f39fef83
handle tied embeddings
03246b7c
linting
aa2df976
doc
556e5ac4
unecessary if
1e38cf57
comment
99551ff1
linting
2a80cece
make sure pp doesnt go into tp shard and distribute
85580c7e
3outeille
changed the base branch from
main
to
distributed_guarding
123 days ago
Merge branch 'distributed_guarding' into pp_inference
55247efd
Merge branch 'pp_inference' of https://github.com/huggingface/transfo…
6499c1f2
Merge branch 'distributed_guarding' into split/b-pr-0-dual-path-tp
4cb403f9
begin migration TP
ad7248f8
clean up
1dcd5d25
revert merge conflict
2cccb891
local params for forward
4098e00d
merged
ed5c136e
cleaning
b9727826
Base automatically changed from
distributed_guarding
to
main
122 days ago
Merge branch 'main' into split/b-pr-0-dual-path-tp
2469b2b9
migration from integration.tensor_parallel to distributed.tensor_pa…
c4166955
xMerge branch 'split/b-pr-0-dual-path-tp' of github.com:huggingface/t…
68e932d2
revert models
673188fd
revert
d2ecb9b2
Merge branch 'main' into split/b-pr-0-dual-path-tp
7aacfdfc
fix
5f392ffc
breaking: cleaner way to_local for quantize weight(almost done need t…
a2aaec77
fix all tests
21198651
Merge branch 'main' into split/b-pr-0-dual-path-tp
48bf5b5c
Merge branch 'main' into split/b-pr-0-dual-path-tp
911ac802
TP dtensor handle natively the to_local() for deepgem + fp8 (#47634)
42edef62
bench: dtensor vs legacy TP
dec01875
Merge branch 'main' into split/b-pr-0-dual-path-tp
c1bc2ca0
bench: dtensor vs legacy TP (#47728)
d31aa8c0
Merge branch 'split/b-pr-0-dual-path-tp' of github.com:huggingface/tr…
632724bf
remove helper script
610f3ffa
Merge branch 'main' into split/b-pr-0-dual-path-tp
c10dd03b
remove dead code in mxfp4
d0cdd9cf
Merge branch 'split/b-pr-0-dual-path-tp' of github.com:huggingface/tr…
02077aed
Merge branch 'main' into split/b-pr-0-dual-path-tp
57cf7622
remove old TP
6c4063d9
Merge branch 'split/b-pr-0-dual-path-tp' of github.com:huggingface/tr…
078f128f
cleaning
8c66c74f
cleaning
8b5f3627
claening
8e26b066
add test_shard_tensor_shape_consistency
7febb1bf
cleaning
13334320
small fix
7eaf7873
typo
e62fff92
comment
2af11756
Merge branch 'main' into pp_inference
deb163d1
clean
5495d702
typo
c28140df
Merge branch 'main' into split/b-pr-0-dual-path-tp
5e450f32
rename colwise_gather_output to colwise_rep
a29469ea
Merge branch 'split/b-pr-0-dual-path-tp' of github.com:huggingface/tr…
637e37a4
keep tp import to avoid breaking chnges
b41ddc94
remove async_op=True for redistribute
488b801b
linting
12309893
renaming MoeExpertsParallel class
1fc95b3c
ep router doc
351a4cd7
ArthurZucker
commented on 2026-08-17
Merge branch 'main' into pp_inference
98ba6764
mlinter
2fd62de3
Merge branch 'main' into split/b-pr-0-dual-path-tp
ddced0c4
add todo
2a37985b
Merge branch 'split/b-pr-0-dual-path-tp' of github.com:huggingface/tr…
4eb31262
fix
78f88a27
Merge branch 'main' into split/b-pr-0-dual-path-tp
d88b9b50
new name
d08e9241
Merge branch 'pp_inference' of github.com:huggingface/transformers in…
b9bf8d54
guard import
7def7421
cache inspect signature
69dbbd2b
merge init and from_device_mesh
ac85619d
add todo
7c429768
avoid nesting
5f4adfd4
pp stages logs only ad INFO level
f5cd40cb
better doc func
4cfd6963
Merge branch 'main' into pp_inference
9793b089
Merge branch 'main' into split/b-pr-0-dual-path-tp
e2644a68
3outeille
changed the base branch from
main
to
split/b-pr-0-dual-path-tp
99 days ago
Merge branch 'split/b-pr-0-dual-path-tp' into pp_inference
9bb57577
linting
3fbe5528
linting
b091ef90
3outeille
requested a review
from
ArthurZucker
99 days ago
fix
30e080f6
Base automatically changed from
split/b-pr-0-dual-path-tp
to
main
98 days ago
Merge branch 'main' into pp_inference
997df9d4
ArthurZucker
approved these changes on 2026-08-25
3outeille
merged
b0c8d427
into main
94 days ago
3outeille
deleted the pp_inference branch
94 days ago
Login to write a write a comment.
Login via GitHub
Reviewers
ArthurZucker
Assignees
No one assigned
Labels
None yet
Milestone
No milestone
Login to write a write a comment.
Login via GitHub