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
{{ message }}
Repository navigation
[Bug] RuntimeError: No executable batch size found, reached zero. #2974
The issue is in the GRPOConfig at Gemma3_(1B)_GRPO.ipynb cell 36. The batch size starts at 4, but the accelerate library keeps reducing it when it runs out of memory, eventually reaching 0.
Solutions:
Reduce per_device_train_batch_size from 4 to 2
Reduce num_generations from 4 to 2
Reduce max_seq_length if possible
Increase gradient_accumulation_steps to maintain effective batch size
Try this configuration in cell 36:
training_args=GRPOConfig(
per_device_train_batch_size=2, # Reduce from 4 to 2gradient_accumulation_steps=8, # Increase from 4 to 8num_generations=2, # Reduce from 4 to 2# ... rest of config unchanged
)
From the provided information, this doesn't look like an unsloth issue for me. While you might be running out of memory and facing that issue, another user with a larger GPU configuration might not be . That's where choice of model but also hyperparameters are supposed to be made by the user himself. The notebooks are meant for illustration purposes of what unsloth is capable of only. For most cases, you need to change the parameters based on your use case, your data and also your hardware.
Activity
behroozazarkhalili commentedon Jul 15, 2025
The issue is in the GRPOConfig at Gemma3_(1B)_GRPO.ipynb cell 36. The batch size starts at 4, but the accelerate library keeps reducing it when it runs out of memory, eventually reaching 0.
Solutions:
Try this configuration in cell 36:
rolandtannous commentedon Jul 15, 2025
From the provided information, this doesn't look like an unsloth issue for me. While you might be running out of memory and facing that issue, another user with a larger GPU configuration might not be . That's where choice of model but also hyperparameters are supposed to be made by the user himself. The notebooks are meant for illustration purposes of what unsloth is capable of only. For most cases, you need to change the parameters based on your use case, your data and also your hardware.
maaaax commentedon Jul 24, 2025
Same here. With an older unsloth/transformers docker image the same py script works.