[Paper Review] Cost-Effective Hyperparameter Optimization for Large Language Model Generation Inference
EcoOptiGen jointly tunes inference hyperparameters under budget constraints using cost-aware Bayesian/local search with pruning, improving utility over default HELM settings across multiple LLM tasks.
Large Language Models (LLMs) have sparked significant interest in their generative capabilities, leading to the development of various commercial applications. The high cost of using the models drives application builders to maximize the value of generation under a limited inference budget. This paper presents a study of optimizing inference hyperparameters such as the number of responses, temperature and max tokens, which significantly affects the utility/cost of text generation. We design a framework named EcoOptiGen which leverages economical hyperparameter optimization and cost-based pruning. Experiments with the GPT-3.5/GPT-4 models on a variety of tasks verify its effectiveness. EcoOptiGen is implemented in the `autogen' package of the FLAML library: \url{https://aka.ms/autogen}.
Motivation & Objective
- Motivate the need to optimize inference-time hyperparameters to maximize utility under a fixed cost budget.
- Propose EcoOptiGen, an economical hyperparameter optimization framework with cost-based pruning.
- Show that joint hyperparameter tuning yields better results than naive, default, or single-parameter adjustments.
- Demonstrate effectiveness across code generation, math problem solving, and text summarization tasks.
Proposed method
- Define tuning data and a utility function to quantify generation quality under a cost budget.
- Use an economical search strategy (BlendSearch) combining Bayesian optimization and local search for efficiency.
- Introduce a configuration evaluator with a pruning strategy to discard invalid trials early based on cost/tokens.
- Provide a default search space and allow user customization of hyperparameters like n, max_tokens, temperature, top_p, and prompts.
- Conduct progressive data subsampling and Hoeffding-Serfling bounds to prune trials and save tokens.
- Apply EcoOptiGen to GPT-3.5/GPT-4 style models on APPS, HumanEval, MATH, and XSum to compare against HELM and other baselines.
Experimental results
Research questions
- RQ1How much utility can EcoOptiGen gain under a given inference budget compared to default HELM settings?
- RQ2How does varying the inference budget affect EcoOptiGen’s optimization outcomes?
- RQ3How does EcoOptiGen perform across different GPT-3.5/ChatGPT models when tuned?
- RQ4Is joint hyperparameter optimization more effective than increasing the number of responses alone?
- RQ5What is the impact of pruning on optimization efficiency and final utility?
Key findings
- EcoOptiGen outperforms the best untuned GPT-3.5 model in HELM across all four datasets.
- Pruning and the joint tuning of multiple hyperparameters yield substantial efficiency and performance gains over non-pruned or single-parameter approaches.
- Tuned models can differ from HELM-recommended models; the best performing model varies by dataset and budget.
- Increasing the inference budget generally enables higher optimized utility, provided the optimization budget is sufficient.
- When evaluating ChatGPT models on MATH, tuned GPT-3.5-turbo can outperform untuned GPT-4 in certain levels, illustrating model choice is task- and budget-dependent.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.