← Mathematical compendium

Published equation contexts

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)

Why this formula appears here

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 full article-specific guide →

Read the representative guide

qmin⁡q_{\min}

Symbol q_min

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

Read this term in its guide →
qmax⁡q_{\max}

Symbol q_max

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

Read this term in its guide →

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.

Research cited beside this formula

Published contexts (1)

A symbol can carry a different meaning in another article. Each occurrence keeps its own guide and term definitions.

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)

Equation 22 · Edge AI & Electronics

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

This equation states an equality: the expressions on both sides have the same value under the article’s assumptions.

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 ] .

Meanings in this article

  • ss: the scale.
  • zz: the scale s and a zero-point.
  • x^\hat{x}: the dequantised approximation actually used in arithmetic.
Equation guide → · Article →