Table of Contents
Fetching ...

Optimizing Large Language Models through Quantization: A Comparative Analysis of PTQ and QAT Techniques

Jahid Hasan

TL;DR

A novel theoretical framework for mixed-precision quantization is introduced, deriving optimal bit allocation strategies based on layer sensitivity and weight variance and enabling up to 2.4x throughput improvement for INT8 and 3x power reduction compared to full-precision models.

Abstract

This paper presents a comprehensive analysis of quantization techniques for optimizing Large Language Models (LLMs), specifically focusing on Post-Training Quantization (PTQ) and Quantization-Aware Training (QAT). Through empirical evaluation across models ranging from 10M to 1B parameters, we demonstrate that quantization can achieve up to 68% reduction in model size while maintaining performance within 6% of full-precision baselines when utilizing our proposed scaling factor γ. Our experiments show that INT8 quantization delivers a 40% reduction in computational cost and power consumption, while INT4 quantization further improves these metrics by 60%. We introduce a novel theoretical framework for mixed-precision quantization, deriving optimal bit allocation strategies based on layer sensitivity and weight variance. Hardware efficiency evaluations on edge devices reveal that our quantization approach enables up to 2.4x throughput improvement for INT8 and 3x for INT4, with 60% power reduction compared to full-precision models.

Optimizing Large Language Models through Quantization: A Comparative Analysis of PTQ and QAT Techniques

TL;DR

A novel theoretical framework for mixed-precision quantization is introduced, deriving optimal bit allocation strategies based on layer sensitivity and weight variance and enabling up to 2.4x throughput improvement for INT8 and 3x power reduction compared to full-precision models.

Abstract

This paper presents a comprehensive analysis of quantization techniques for optimizing Large Language Models (LLMs), specifically focusing on Post-Training Quantization (PTQ) and Quantization-Aware Training (QAT). Through empirical evaluation across models ranging from 10M to 1B parameters, we demonstrate that quantization can achieve up to 68% reduction in model size while maintaining performance within 6% of full-precision baselines when utilizing our proposed scaling factor γ. Our experiments show that INT8 quantization delivers a 40% reduction in computational cost and power consumption, while INT4 quantization further improves these metrics by 60%. We introduce a novel theoretical framework for mixed-precision quantization, deriving optimal bit allocation strategies based on layer sensitivity and weight variance. Hardware efficiency evaluations on edge devices reveal that our quantization approach enables up to 2.4x throughput improvement for INT8 and 3x for INT4, with 60% power reduction compared to full-precision models.

Paper Structure

This paper contains 37 sections, 5 theorems, 17 equations, 2 figures, 5 tables, 2 algorithms.

Key Result

Lemma 2

For uniform quantization with step size $\Delta$, the maximum quantization error is bounded by:

Figures (2)

  • Figure 1: Model Size Comparison Across Configurations
  • Figure 2: Summary Comparison of Model Performance

Theorems & Definitions (11)

  • Definition 1: Quantization Function Cellier2006
  • Lemma 2: Quantization Error Bound
  • proof
  • Definition 3: Linear Quantization
  • Theorem 4: Optimal Scale Factor
  • proof
  • Definition 5: Log-Based Quantization
  • Proposition 6: Error Distribution
  • Lemma 7: Error Accumulation
  • proof
  • ...and 1 more