gemma-3-4b-it got nan probs_ratio in both FSDP1/FSDP2
repro:
commit id: 0d05ba2d493907a24fc48e949da1cda192967907
RUN_COMMAND="uv run python examples/run_grpo_math.py \
--config examples/configs/grpo_math_8B.yaml \
grpo.max_num_steps=100 \
grpo.val_period=1000 \
policy.model_name=google/gemma-3-4b-it \
policy.dtensor_cfg.enabled=true \
policy.dtensor_cfg.tensor_parallel_size=2 \
policy.generation.vllm_cfg.tensor_parallel_size=2 \
checkpointing.enabled=false \
logger.wandb_enabled=true \
logger.tensorboard_enabled=false \
logger.monitor_gpus=true \
logger.wandb.project={WANDB_PROJECT} \
logger.wandb.name=${EXP_NAME} \
cluster.num_nodes=${NUM_ACTOR_NODES} \
cluster.gpus_per_node=8"
at step15, some metrics are still normal, but the probs_ratio is nan.
at step16, almost all the metrics become abnormal.
Hi :-) @yuki-666
I am encountering difficulties running the Gemma-3-4B-IT model with GRPO implementation. Specifically, I consistently receive the following error: AttributeError: 'Gemma3TextModel' object has no attribute 'model'. Could you provide guidance on the proper configuration and execution methodology for this setup?
Hi @Minniesse , uv run python examples/run_grpo_math.py policy.model_name=google/gemma-3-4b-it could run well.
I feel it may be because of the version of transformers, transformers==4.51.3 is ok.
Can you provide your run script and transformers version?
Trace another issue for AttributeError: 'Gemma3TextModel' object has no attribute 'model' here: https://github.com/NVIDIA/NeMo-RL/issues/453
This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been inactive for 7 days since being marked as stale.