Mixed Precision Quantization for AI Model Layers

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing AI model quantization techniques face challenges in achieving optimal performance in terms of power consumption, memory allocation, and computational efficiency, particularly in electronic devices, due to uniform bit precision across neural networks, which can lead to reduced accuracy and increased energy consumption.

Innovation Solution

A method for mixed precision quantization of AI models is introduced, where each layer of the AI model is assigned a specific bit precision based on its sensitivity, determined through perturbation and gradient analysis, allowing for optimal bit-precision allocation across layers for improved power consumption, memory usage, and computational efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Device complexity

If uniform quantization is applied across all layers of the neural network, then device complexity is reduced and ease of operation is improved, but manufacturing precision deteriorates due to loss of accuracy

Engineering Contradiction:
Improvequantization complexityVSAvoidmodel accuracy
Core Design Contradiction:
Device complexityVSManufacturing precision

Solution Approach 1:

The patent applies different bit precisions to different layers of the neural network based on their individual sensitivity metrics. Layers are categorized into first group layers (higher sensitivity) and second group layers (lower sensitivity), with each group receiving appropriate precision levels. This local differentiation optimizes accuracy for critical layers while reducing complexity for less sensitive layers.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The neural network is segmented into multiple layers with different quantization precision levels. The patent divides layers into distinct groups (first group and second group) that receive different bit precision treatments, allowing the system to balance between accuracy and complexity by treating different segments of the network differently.

Inventive Principle:
Principle #1Segmentation

2Use of energy by moving object

If bit precision is reduced to improve memory usage and energy consumption, then use of energy is improved, but manufacturing precision deteriorates due to accuracy loss

Engineering Contradiction:
Improveenergy consumptionVSAvoidmodel accuracy
Core Design Contradiction:
Use of energy by moving objectVSManufacturing precision

Solution Approach 1:

Different layers are assigned different bit precisions based on their sensitivity to quantization. First group layers with higher sensitivity metrics receive higher precision (e.g., 16-bit) to maintain accuracy, while second group layers with lower sensitivity receive lower precision (e.g., 8-bit or 4-bit) to reduce energy consumption. This selective approach optimizes the energy-accuracy tradeoff.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent changes the precision parameter (bit width) of different layers based on their sensitivity characteristics. By dynamically adjusting the precision parameter for each layer rather than applying a uniform reduction, the system achieves energy efficiency while preserving necessary accuracy in critical layers.

Inventive Principle:
Principle #35Parameter changes

3Manufacturing precision

If search-based methods like reinforcement learning are used for mixed precision quantization, then manufacturing precision is improved through optimal precision assignment, but productivity deteriorates due to time-consuming computation

Engineering Contradiction:
Improveprecision assignment accuracyVSAvoidquantization speed
Core Design Contradiction:
Manufacturing precisionVSProductivity

Solution Approach 1:

The patent pre-calculates sensitivity metrics for all layers before final quantization assignment. By performing sensitivity analysis and gradient computations in advance, the system establishes a foundation for rapid precision assignment without requiring time-consuming search-based optimization during deployment, thus improving productivity while maintaining precision.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent uses computationally inexpensive sensitivity metrics and gradient-based approximations instead of expensive reinforcement learning searches. These lighter computational objects enable rapid precision assignment that achieves good results without the heavy computational burden of iterative search methods, thereby improving productivity.

Inventive Principle:
Principle #27Cheap short-living objects (Disposable)

4Manufacturing precision

If criterion-based methods using second-order approximations are used, then manufacturing precision is improved, but use of energy worsens due to increased computational requirements

Engineering Contradiction:
Improveprecision optimizationVSAvoidcomputation energy
Core Design Contradiction:
Manufacturing precisionVSUse of energy by moving object

Solution Approach 1:

The patent replaces complex second-order approximation methods (Hessian-based approaches) with first-order gradient-based sensitivity metrics. This substitution reduces the computational machinery required, lowering energy consumption while still achieving effective precision optimization through the simplified but efficient gradient sensitivity analysis.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Data Source

PatentUS20240220783A1Mixed precision quantization of an artificial intelligence model
Publication Date: 2024.07.04 SAMSUNG ELECTRONICS CO LTD
  • US20240220783A1 patent drawing
  • US20240220783A1 patent drawing
  • US20240220783A1 patent drawing

AI summary

A method for mixed precision quantization of an artificial intelligence (AI) model by an electronic device is included. The method includes performing, by the electronic device, perturbation in weights of each layer of a plurality of layers of the AI model for a pre-defined number of times, determining, by the electronic device, a change in an output of each layer of a plurality of layers of the AI model based on a perturbation in weights of each layer of the plurality of layers, determining, by the electronic device, a sensitivity metric for each layer of the plurality of layers of the AI model as a measure of the change in the output of each layer, assigning, by the electronic device, a bit-precision to each layer of the plurality of layers of the AI model based on the determined sensitivity metric, and performing, by the electronic device, the mixed precision quantization of the AI model using the bit-precision assigned to each layer of the plurality of layers of the AI model.