critic optmizer warning grad_norm is not finite when trained with FSDP multi-node
when I run run_deepseek7b_llm.sh on single node, everything seems to be fine.
I changed the trainer.nnodes=1 \ to trainer.nnodes=2 and leave everything else the same, then i got a lot of
(WorkerDict pid=9092) WARN: grad_norm is not finite: nan
(WorkerDict pid=9209) WARN: grad_norm is not finite: nan
(WorkerDict pid=9205) WARN: grad_norm is not finite: nan
(WorkerDict pid=9206) WARN: grad_norm is not finite: nan
(WorkerDict pid=9204) WARN: grad_norm is not finite: nan
(WorkerDict pid=9210) WARN: grad_norm is not finite: nan
(WorkerDict pid=9207) WARN: grad_norm is not finite: nan
(WorkerDict pid=9208) WARN: grad_norm is not finite: nan
from the critic optimizer.
The other metrics are looking normal, but wonder why grad_norm for critic would become nan. A similar issue was reported with transformers before but it should have been resolved with transformers>=4.47. So I guess this is something else.
Hi I also had this issue, do you know the cause yet?
+1 anyone can solve it?
me2, grad_norm for critic is nan
my transformers version: 4.51.2, but had this issue too....
I am facing the same issue as well
self.model: PreTrainedModel = AutoModelForCausalLM.from_pretrained( local_model_path, config=config, torch_dtype=torch.float32, #torch_dtype=torch.bfloat16 if self.config.fp16 else torch.float16, attn_implementation="flash_attention_2", trust_remote_code=trust_remote_code, )
i encounterec this issue when setting bfloat16, i change torch_dtype=torch.float32, and it didnt occur
Similar issue +1, any update on how this is solved? @XiaohanZhangCMU
same issue. verl has a big bug for sft.
same issue
Hey guys, try other frameworks for SFT; I think the team did not have the bandwidth to diagnose the issue : (
定时清理检查结果:这个 issue 最近一次由当前运行账号以外账号产生的公开回复或公开引用是 2025-11-06T08:12:21Z。本轮检查日期为 2026-07-04,该时间已经超过 6 个月。检查来源包括 issue comments API https://api.github.com/repos/verl-project/verl/issues/870/comments?per_page=100 和 timeline API https://api.github.com/repos/verl-project/verl/issues/870/timeline?per_page=100。
按照本仓库的定时 issue 清理标准,我会先留下这条说明并关闭该 issue。若作者或社区成员仍能提供新的复现、证据或需求背景,请继续评论请求重开,或创建新的 issue 并引用这里的上下文。
Scheduled cleanup check: the latest public reply or public reference from an account other than the current automation account was 2025-11-06T08:12:21Z. The check date for this run is 2026-07-04, so that activity is more than 6 months old. The checked public sources were the issue comments API https://api.github.com/repos/verl-project/verl/issues/870/comments?per_page=100 and the timeline API https://api.github.com/repos/verl-project/verl/issues/870/timeline?per_page=100.
Following the scheduled issue cleanup policy, I am leaving this note first and then closing the issue. If the author or community can still provide a fresh reproduction, evidence, or requirement context, please comment to request reopening or open a new issue that links back to this one.
This response was generated by a scheduled Codex GPT5.5 issue processing task.