Speculative Rejection for aligning LLM: Making Best-of-N work on 1 GPU instead of 32
Early rejection of low-quality LLM responses and dynamic batch pruning saves 32x GPU compute while maintaining quality.
π https://arxiv.org/abs/2410.20290
π― Original Problem:
Best-of-N decoding, while effective for aligning LLM outputs with human preferences, requires massive computational resources (16-32 GPUs) to generate multiple responses. This makes it impractical for real-world deployment despite its effectiveness.
-----
π οΈ Solution in this Paper:
β’ Introduces Speculative Rejection - a method that starts with large batch size and progressively rejects low-quality generations early
β’ Uses reward model to evaluate partial responses during generation
β’ Halts generations unlikely to achieve high final scores
β’ Dynamically reduces batch size to prevent memory exhaustion
β’ Requires minimal hyperparameter tuning (only rejection rate Ξ±)
β’ Works with any reward model and integrates with existing inference systems
-----
π‘ Key Insights:
β’ Partial response scores strongly correlate with final response quality
β’ GPU memory is underutilized in early stages of generation
β’ Early rejection of unpromising responses saves computational resources
β’ Dynamic batch size adjustment prevents memory exhaustion
β’ Simple implementation yields substantial speedup
-----
π Results:
β’ Achieves 16-32x computational efficiency vs Best-of-N
β’ Requires only single GPU vs multiple GPUs for Best-of-N
β’ Maintains similar latency and generation quality
β’ Shows 85.5% token savings through early stopping
β’ Achieves higher win rates in GPT-4 evaluations (70.01% vs 63.04% baseline)










