Reconstruction perspective for GPTQ: Quantifying how to compensate for output errors

Post-training quantification can write the problem as follows: keeping as much output as possible from a level of calibration input with a low priority.

Thematic shorts • In-depthCollate in 2 self-measured2 First-hand sources
Start Body
Learning objectives and first steps2 objectives . 1 first fix

Try to do it after reading

  • Explain the reconstruction perspective of GPTQ: mechanisms and prerequisites for quantifying how to compensate for output errors
  • Positioning the mechanism ' s fault limits with fixed examples

Suggested first

  • Secondary approximation and matrix reconstruction

Issues and mechanisms

Post-training quantification can write the problem as follows: keeping as much output as possible from a level of calibration input with a low priority. GPTQ uses information similar to second-order information to quantify errors in steps and allocates the impact of errors to weights that have not yet been quantified. This is different from a separate element-by-element rounding, where the target is closer to the output of the layers of the input distribution; However, it is still not equal to the direct optimization of all downstream tasks.

If the linear layer weight is W and the calibrated input matrix is X, you can compare the square difference between the original output WX and the quantitative output WqX. Enter a range describing which weight directions are more sensitive and the pathological or inadequate coverage of calibration data affects the estimation. The actual algorithm uses block, block and efficiency approximation, and this paper explains only the idea of error compensation and does not recreate a full two-dimensional example of GPTQ.

A concrete example

Synthetic input is always [1,1] with weight [0.3,0.7], output one. If the first quantity is zero and the second is 0.7, the output is reduced to 0.7; Allows a second to one to be added, and the output can be restored on such input. For [10], however, there were still errors in the original output of 0.3, quantified zero. The example shows that compensation on a limited calibration distribution does not represent that all directions are retained.

Borders and checks

Calibration input should contain enough changes to select only samples that can be easily rebuilt. The barrier improves numerical conditions and changes approximation and needs to be recorded. The document called four bits is not sufficient to compare the impact of the realization options of Quantified Order, Grouping and Activating Sorting. (b) Rebuilding errors, stand-alone tasks and physical memory are preserved separately at the time of verification; The thesis history hardware speed cannot be used as a valid machine.

A method of verification

The reconstruction objective can be compared with a missing matrix with a full input matrix. The former binds more weighting directions, while the latter allow multiple weights to be the same in calibrated output. If only validated on missing samples, the error compensation may shift the problem away. It is also important to record second-degree proximate barriers and sequencing that affect numerical conditions and the spread of progressive errors; When a quantified asset is restored, knowledge of the size and model name alone is not sufficient to recreate the same result.

Check understanding

Is it clear that the weight function is identical if there is a zero error in the calibration input?

No, it's not. The calibration matrix may cover only some directions, and this example is immediately separated on [10]; Independent input checks and clear scope of application are required.

Why can't we just go to the nearest weight of each weight and separate it?

Such baselines could be defined, but it did not use input orientation and error compensation. Whether it is worth using a more sophisticated method should be compared with the data under fixed bit width.

Sources and reconciliations

Definitions, methods and interfaces are available.

  1. GPTQ — Accurate Post-Training Quantization
  2. AWQ — Activation-aware Weight Quantization

Figures and calculations are reorganized according to this chapter. Mathematical measurements, framework operations and real business effects are described separately in the body of the text.

← Back to the knowledge directory
Ask Max Ask about this site
Ask Max ↗

Opening the assistant…

Paper figure

Photo comments

LEAVE A NOTE

About this photograph

Connecting to the discussion board…

    Comments become public after moderation. You can delete your own comments from this browser.
    No email is required. Clearing cookies prevents this browser from claiming earlier comments.

    MAX WANG / INDEX

    Find something

    Enter a keyword, or explore the directory below.