Replies: 1 comment
-
|
The key you're looking for is actor_rollout_ref.actor.fsdp_config.model_dtype=bfloat16 \
actor_rollout_ref.ref.fsdp_config.model_dtype=bfloat16 \
# and, if you're running PPO with a critic:
critic.model.fsdp_config.model_dtype=bfloat16Accepted strings are anything
torch_dtype = fsdp_config.get("model_dtype", None)
if torch_dtype is None:
torch_dtype = torch.float32 if self._is_actor else torch.bfloat16
else:
torch_dtype = PrecisionType.to_dtype(torch_dtype)The default lives in # model dtype of fsdp
model_dtype: fp32The same default surfaces in
Recommendation
actor_rollout_ref.actor.fsdp_config.model_dtype=bfloat16 \
actor_rollout_ref.ref.fsdp_config.model_dtype=bfloat16 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I use training script from here qwen2-7b-fsdp2.log, and just change qwen2-7b to qwen3-0.6b.
Not only in log of qwen2-7b-fsdp2.log but also my script I see the warning: Flash Attention 2.0 only supports torch.float16 and torch.bfloat16 dtypes, but the current dype in Qwen2ForCausalLM is torch.float32.
I looked up configure guide in https://verl.readthedocs.io/en/latest/examples/config.html but not found key to set type of actor model.
What should I do to set model's type bf16 in training? Thanks so much
verl version: 0.5.x
Beta Was this translation helpful? Give feedback.
All reactions