← Back to article

Equation 22 · How a Model Actually Gets Small Enough to Run on a Phone

What does this equation mean?

xq=clip(⌊xs⌉+z, qmin⁡, qmax⁡),x^=s(xq−z)x_q = \mathrm{clip}\left(\left\lfloor \frac{x}{s} \right\rceil + z,\ q_{\min},\ q_{\max}\right), \qquad \hat{x} = s\left(x_q - z\right)

Read the formula alongside the article passage below. Each part has a deeper page with its role in the equation, the supporting passage and nearby citations.

Start withx
Divide bys
This relates tox_q
How to read the two sides of this formula. Follow the article passage for the meaning of each quantity.

This equation states an equality: the expressions on both sides have the same value under the article’s assumptions. Read the equation part by part below; each part has a contextual explanation and a link to its mathematical background.

Read it piece by piece

xqx_q

Symbol x_q

xqx_q is the quantity selected or evaluated by the optimization written on the right.

Understand this part →

xx

Symbol x

x occurs above the fraction bar. The numerator is divided by the entire denominator below it.

Understand this part →

ss

Symbol s

the scale.

Understand this part →

zz

Symbol z

the scale s and a zero-point.

Understand this part →

qmin⁡q_{\min}

Symbol q_min

qmq_min appears in the objective or constraint used by the optimization on the right.

Understand this part →

qmax⁡q_{\max}

Symbol q_max

qmq_max appears in the objective or constraint used by the optimization on the right.

Understand this part →

x^\hat{x}

Symbol hatx

the dequantised approximation actually used in arithmetic.

Understand this part →

=

=

The expressions on both sides represent the same quantity under the stated assumptions.

Understand this part →

See an illustrated explanation →
fraction

fraction

Divide the expression above the line by the one below it.

Understand this part →

See an illustrated explanation →
addition

addition

Add the term after the plus sign to the term or group before it.

Understand this part →

subtraction

subtraction

Subtract the following term or group from the preceding one. A leading minus marks a negative quantity.

Understand this part →

subscript

subscript

The lower label selects a particular version, component, or indexed member of the quantity. For example, x₀ and xₜ can be values at different positions.

Understand this part →

How to interpret it

With a fixed numerator, increasing a nonzero denominator reduces the fraction. Read it with the definitions, units, and assumptions supplied by the article.

What the article says around this equation

The standard affine mapping takes a real value x , a scale s and a zero-point z , and produces an integer xq=clip(⌊xs⌉+z, qmin⁡, qmax⁡),x^=s(xq−z)x_q = \mathrm{clip}\left(\left\lfloor \frac{x}{s} \right\rceil + z,\ q_{\min},\ q_{\max}\right), \qquad \hat{x} = s\left(x_q - z\right). where ⌊\lfloor ⋅\cdot ⌉\rceil is round-to-nearest and x^\hat{x} is the dequantised approximation actually used in arithmetic. Jacob and colleagues’ integer-arithmetic scheme, still the reference formulation for this mapping, showed that with weights and activations quantized this way, “inference can be carried out using integer-only arithmetic” end to end on ordinary integer hardware, with no floating-point unit required at all, which is what makes the technique valuable on the cheapest edge silicon rather than merely on the largest [ 7 ] .

Read the equation in its article →

Sources cited in the surrounding passage

These citations give research context. Read each source to check which claims it supports.

Return to How a Model Actually Gets Small Enough to Run on a Phone

See this formula across 1 published context →

Browse the mathematical compendium →