Smart compute allocation approach for LLM inference yields dramatic efficiency gains
https://arxiv.org/abs/2410.22480
π― Original Problem:
When using LLMs for inference, we need to decide how to allocate limited compute budget across different sampling configurations (model, temperature, language). Current approaches focus on finding a single optimal configuration, missing the fact that different problems may require different configurations.
-----
π§ Solution in this Paper:
OSCA (Optimizes Sample Compute Allocation) algorithm finds optimal mix of sampling configurations through:
β Estimates pass probabilities for each configuration-problem pair using small sample size
β Formulates compute allocation as convex optimization problem
β Uses hill-climbing to find allocation maximizing accuracy on training problems
β Dynamically adjusts allocation based on problem characteristics
-----
π‘ Key Insights:
β Mixed allocation outperforms single configuration approaches significantly
β Different problems require different optimal configurations
β Temperature and model diversity are crucial for optimal performance
β Small training data (50 samples) sufficient for learning good allocations
-----
π Results:
β 128x less compute needed for same accuracy on code generation tasks
β 25x compute reduction on reasoning tasks while matching baseline performance
β 3x compute efficiency improvement on agent workflows
β Achieves 73.3% pass@8 rate compared to baseline's 512 samples requirement










