You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[fsdp] feat: support fsdp2 training and inference in fsdp_workers (#1026)
# What does this PR do?
This PR supports fsdp2 for fsdp_worker. Torch version 2.4 or higher is
required.
# Usage Example
```
sh examples/grpo_trainer/run_qwen2-7b.sh \
actor_rollout_ref.ref.strategy=fsdp2 \
actor_rollout_ref.actor.strategy=fsdp2
```
To save more memory, you can add the parameter below to enable the fsdp2
OffloadPolicy:
```
actor_rollout_ref.actor.offload_policy=True
```
You can see the profile comparison between fsdp1 and fsdp2 here:
verl-project/verl#1026 (comment)
---------
Co-authored-by: lixiaoguang12 <lixiaoguang12@meituan.com>
Co-authored-by: shengguangming <shengguangming@bytedance.com>
Copy file name to clipboardExpand all lines: docs/experiment/ppo.rst
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,7 @@ NVIDIA GPUs
27
27
.. _Qwen0.5b PRIME Script: https://github.com/volcengine/verl/blob/main/recipe/prime/run_prime_qwen.sh
28
28
.. _Qwen0.5b PRIME Wandb: https://api.wandb.ai/links/zefan-wang-thu-tsinghua-university/rxd1btvb
29
29
.. _Megatron Qwen2 7b GRPO Script with Math and GSM8k: https://github.com/eric-haibin-lin/verl-data/blob/experiments/gsm8k/qwen2-7b_math_megatron.log
30
+
.. _Qwen7b GRPO FSDP2 Script and Logs: https://github.com/eric-haibin-lin/verl-data/blob/experiments/gsm8k/qwen2-7b-fsdp2.log
0 commit comments