Optimizing large language models (LLMs) is vital for their use in real-world applications because of their massive size and high computational requirements. Important techniques like quantization, pruning, and knowledge distillation are used to decrease resource usage while keeping model accuracy intact. Reducing the precision of weights and activations through quantization compresses models and speeds up inference, utilizing mixed-precision formats like LLM.Int8() and GPTQ to maintain a balance between efficiency and accuracy. Selective preservation of higher precision in models with billions of parameters results in minimal quality loss. Pruning gets rid of unnecessary weights or structures. Techniques such as SparseGPT employ unstructured pruning for model sparsity, while structured pruning preserves the original architecture. Improvements in zeroshot pruning reduce the necessity for retraining, enhancing the efficiency of the optimization process. Knowledge distillation involves transferring knowledge from a bigger “teacher” model to a smaller “student” model. Approaches like MiniLLM (white-box) and LaMini-LM (black-box) showcase this method, effectively decreasing model size while maintaining performance levels. These enhancements are guided by limitations in hardware, speed of inference, and efficiency of memory, with evaluation of performance done on benchmarks specific to the task at hand. Furthermore, timely engineering plays a crucial role in optimizing LLM, and Bayesian Optimization provides efficient techniques for finding the best prompts.
Paper
The full text of this publication is not hosted on 44B due to licensing.
Read it at OpenAlex