transformers
FSDP x TP Saving / Loading
#48802
Merged

FSDP x TP Saving / Loading #48802

michaelbenayoun
michaelbenayoun wip: add script to track potential changes
4454e4be
michaelbenayoun feat: workaround for _StridedShard
ec979c45
michaelbenayoun feat: handle optimizer loading / saving
6d9a2399
michaelbenayoun wip: add clip_grad_norm_
6868815b
michaelbenayoun doc: add docstring to clip_grad_norm_
f20be8d4
michaelbenayoun Merge branch 'main' into fsdp_tp_saving
fec373e8
michaelbenayoun
michaelbenayoun commented on 2026-09-14
HuggingFaceDocBuilderDev
michaelbenayoun michaelbenayoun changed the title Fsdp tp saving FSDP x TP Saving / Loading 49 days ago
michaelbenayoun feat: uniformize the clip_grad_norm_ implem
f9341a88
michaelbenayoun refactor: use the proper function for clip_grad_norm_
b09c7eec
michaelbenayoun feat: save shards / consolidate utility functions
9f677ef2
michaelbenayoun feat: save / load sharded / consolidated optimizer states
9c742be7
michaelbenayoun feat: add checkpoint state check
dc192d93
michaelbenayoun Merge branch 'main' into fsdp_tp_saving
24558d8b
michaelbenayoun feat: add distributed checkpoint loading
b2719522
michaelbenayoun test: add saving, loading and clipping tests
6a5075c0
michaelbenayoun wip: remove .bin support
78d55a4a
michaelbenayoun doc: update docstring
607d7f9b
michaelbenayoun chore: remove testing script
55f0814b
3outeille 3outeille requested a review from 3outeille 3outeille 48 days ago
3outeille 3outeille requested a review from ArthurZucker ArthurZucker 48 days ago
3outeille
3outeille commented on 2026-09-18
michaelbenayoun Merge branch 'main' into fsdp_tp_saving
b5890fe8
michaelbenayoun align: match planner branch loader surface
6724f5ae
michaelbenayoun fix: remove method that was directly calling a util
2818860f
michaelbenayoun doc: rename word in docstring
61896f01
michaelbenayoun wip: add guards in utility functions
b58cdbb9
michaelbenayoun doc: add docstring explaining why `_StridedShard` is broken
7605b920
michaelbenayoun wip: main function to load checkpoints in DistributedMixin
c99185c3
michaelbenayoun test: add test for loading paths
1d012c12
michaelbenayoun wip: add strict for sharded checkpoints as well
afe8bcb8
michaelbenayoun doc: added tree_map comments
c1329666
michaelbenayoun doc: explain why options are required
e1e8048f
michaelbenayoun Merge branch 'main' into fsdp_tp_saving
f5d00940
3outeille
3outeille commented on 2026-09-22
3outeille
3outeille commented on 2026-09-25
3outeille
3outeille commented on 2026-09-25
michaelbenayoun Merge branch 'main' into fsdp_tp_saving
1ce39825
michaelbenayoun refactor: move functions to distributed/checkpoint.py
7384f704
michaelbenayoun feat: remove clip_grad_norm from current PR
2b6e7116
michaelbenayoun michaelbenayoun force pushed from 82e30bdf to 2b6e7116 35 days ago
michaelbenayoun fix: remove consolidate option
2e81400f
michaelbenayoun wip: refactor distributed tests
9ba6352a
michaelbenayoun fix: tiny fixes
c9751154
michaelbenayoun feat: add loading path in from_pretrained
3d5932d8
michaelbenayoun tests: tests for checkpointing
151017d9
michaelbenayoun
michaelbenayoun commented on 2026-09-29
michaelbenayoun chore: restore fsdp mixin
676e1b2b
michaelbenayoun fix: broken imports in tests
7b889135
3outeille 3outeille force pushed from 0e1cc55f to 7b889135 35 days ago
3outeille
3outeille commented on 2026-09-29
3outeille
3outeille commented on 2026-09-29
3outeille
3outeille commented on 2026-09-29
3outeille
3outeille commented on 2026-09-29
3outeille
3outeille commented on 2026-09-29
michaelbenayoun fix: remove the support for full optimizer loading
15913b5c
michaelbenayoun fix: remove consolidation support for optimizer saving
86827426
michaelbenayoun refactor: rename to load_model_checkpoint_distributed
14cfa9a8
michaelbenayoun refactor: group two if statements into a for loop
81f34cd8
michaelbenayoun refactor: separate the logic of finding the files and loading
332b3b3c
michaelbenayoun refactor: restore optimizer changes for stacking
e4b7ba0e
michaelbenayoun style: ruff
e8bdcde0
ArthurZucker
3outeille Merge branch 'main' into fsdp_tp_saving
0a46816a
3outeille
3outeille commented on 2026-10-06
3outeille
3outeille commented on 2026-10-06
3outeille
3outeille commented on 2026-10-06
3outeille
3outeille commented on 2026-10-06
3outeille
3outeille commented on 2026-10-06
3outeille
michaelbenayoun refactor: use custom error message for guard function
d843a519
michaelbenayoun fix: use is_torch_distributed_available
dec7bdad
michaelbenayoun feat: consolidate checkpoint feature
3cee2059
michaelbenayoun doc: add context for DTensor hooks
7d92bbd2
michaelbenayoun refactor: add get_distributed_checkpoint_dir helper
b5121aee
michaelbenayoun refactor: _load_and_finalize_distributed_pretrained_model in mixin
07874468
michaelbenayoun refactor: make helper private
e6c8604f
michaelbenayoun Merge branch 'main' into fsdp_tp_saving
f14062a2
michaelbenayoun style: ruff
ba38c786
3outeille
3outeille commented on 2026-10-09
michaelbenayoun doc: improve docstring
4bee2469
michaelbenayoun Merge branch 'main' into fsdp_tp_saving
0ea3898f
michaelbenayoun style: ruff
5707d839
michaelbenayoun feat: remove loading paths that cannot be reached
9dbd995f
michaelbenayoun refactor: refactor save_distributed_checkpoint
055acb28
michaelbenayoun
michaelbenayoun Merge branch 'main' into fsdp_tp_saving
b1aedd81
3outeille
3outeille commented on 2026-10-14
3outeille
3outeille commented on 2026-10-14
3outeille
3outeille commented on 2026-10-14
3outeille
3outeille commented on 2026-10-14
michaelbenayoun feat: remove consolidated dir if it exists
42e11bc3
michaelbenayoun feat: implement reverse logic for `_prepare_state_dict_for_dcp`
5bb6ab52
3outeille
3outeille commented on 2026-10-14
michaelbenayoun refactor: rename helper function
500998e1
3outeille
3outeille commented on 2026-10-15
3outeille
3outeille approved these changes on 2026-10-15
michaelbenayoun chore: add parameter name
837ae3bd
michaelbenayoun Merge branch 'main' into fsdp_tp_saving
d4a85ad5
ArthurZucker
ArthurZucker approved these changes on 2026-10-15
ArthurZucker
michaelbenayoun Merge branch 'main' into fsdp_tp_saving
dea96077
michaelbenayoun docs: add comment
25eb71e3
michaelbenayoun
michaelbenayoun refactor: move distributed utils to distributed/
321f5388
michaelbenayoun fix: broken test because of refactor
ec30f1d1
github-actions
michaelbenayoun michaelbenayoun merged 89d1c880 into main 19 days ago
michaelbenayoun michaelbenayoun deleted the fsdp_tp_saving branch 19 days ago

Login to write a write a comment.

Login via GitHub

Assignees
No one assigned
Labels
Milestone