7.3.3
Configuring Memory and Performance Settings
Understand mixed precision, gradient checkpointing, gradient clipping and vLLM generation settings in the source implementation.
What is it?
The source example includes memory and performance settings for training. These settings enable mixed precision, gradient checkpointing, gradient clipping and faster generation through vLLM.
Key points
bf16 = True enables bfloat16 training.
gradient_checkpointing = True reduces activation memory requirements.
max_grad_norm = 0.5 sets gradient clipping.
logging_steps = 10 controls logging frequency.
use_vllm = True enables vLLM generation.
vllm_gpu_memory_utilization = 0.7 sets the vLLM GPU memory utilization target.
Memory and Generation Performance Settings
The example enables bfloat16, gradient checkpointing and a maximum gradient norm of 0.5. It also enables vLLM with GPU memory utilization set to 0.7. The source highlights vLLM generation as important because GRPO requires multiple generations per prompt.
Real-world application
Use these settings when configuring a GRPO run. Check hardware compatibility and available GPU memory before enabling the selected acceleration options.
Key takeaway
Memory and generation settings help make multi-response GRPO training more practical.