Loading…
20x Faster TRL Fine-tuning with RapidFire AI
Hugging FaceKamran Bigdely, Arun Kumar, Quentin Gallouédec
Summary
Hugging Face TRL now officially integrates with RapidFire AI to accelerate LLM fine-tuning and post-training experimentation through concurrent configuration evaluation. Instead of executing training configurations sequentially, the platform shards datasets into discrete chunks and cycles multiple model configurations across GPUs at chunk boundaries. The runtime handles automatic checkpointing via a shared-memory-based adapter and model spilling mechanism to maintain consistent training state. Experimenters can monitor live metrics on an MLflow-based dashboard and use Interactive Control Ops to stop underperforming runs or clone and warm-start promising configurations mid-flight. Benchmark results on NVIDIA A100 GPUs demonstrate experimentation speedups ranging from 15x to 20x over sequential runs when training TinyLlama-1.1B and Llama-3.2-1B models.
Context
Fine-tuning and post-training LLMs sequentially across multiple configurations wastes time and GPU cycles, leaving teams with insufficient budget or bandwidth to compare hyperparameters despite the potential for significant metric improvements.
Approach / What changed
RapidFire AI integrates into Hugging Face TRL using drop-in config replacements (RFSFTConfig, RFDPOConfig, RFGRPOConfig) and an adaptive chunk-based scheduler. The scheduler shards datasets into chunks, cycles configurations across GPUs at chunk boundaries via shared-memory model and adapter spilling, and enables real-time Interactive Control Ops from a dashboard to stop or clone runs mid-flight.
Takeaways
- RapidFire AI provides drop-in wrappers including RFSFTConfig, RFDPOConfig, and RFGRPOConfig to replace standard TRL configurations with minimal code changes.
- The scheduler shards datasets into chunks and alternates configurations at chunk boundaries, enabling early comparative metrics and reaching 95%+ GPU utilization.
- Mid-flight Interactive Control Ops allow users to stop, resume, delete, or clone and warm-start configurations directly from the dashboard without restarting jobs.
Related reading
NVIDIA Blackwell Tops MLPerf Training 6.0 with Industry-Leading Scale and Performance
NVIDIA submitted results across all MLPerf Training v6.0 benchmarks, setting performance records on workloads including the DeepSeek-V3 and GPT-OSS-20B Mixture of Experts models. To scale training up to 8,192 Blackwell GPUs, NVIDIA combined hardware cluster designs with scale-out networking via Spectrum-X Ethernet and Quantum InfiniBand. The engineering team eliminated CPU-GPU synchronization bottlenecks in token-dropless MoEs by implementing full-iteration CUDA graphs with synchronization-free operators and paged stashing. Further software optimizations included CuTe DSL kernel fusions, an MXFP8 attention block in the Transformer Engine, and transitioning router elementwise math to FP32. Across these benchmarks, the GB300 NVL72 platform achieved the fastest time to train at scale and the highest normalized per-accelerator performance.
Farshad Ghodsianhuggingface.co ·
Fit More and Train Faster With ZeRO via DeepSpeed and FairScale
Machine learning model sizes frequently outpace consumer GPU memory, preventing practitioners from loading or fine-tuning large architectures on standard hardware. To address these resource constraints, the Hugging Face Trainer introduced experimental support for Zero Redundancy Optimizer features from DeepSpeed and FairScale starting in transformers v4.2.0. In dual-GPU benchmarks with a t5-large model, FairScale and DeepSpeed integrations expanded allowable batch sizes and shortened training durations compared to baseline DistributedDataParallel runs. Furthermore, DeepSpeed permitted single-GPU fine-tuning of a t5-3b model on a 24GB RTX-3090 card at batch size 20, whereas the baseline execution crashed immediately with an out-of-memory error. These optimizations manage memory allocation internally to curb memory fragmentation while requiring changes only to training scripts rather than model code.