Majid Al-RaimiGlossaryالمصطلحات

COE 592Lecture 5.2المحاضرة 5.2Glossaryالمصطلحات

Glossaryالمصطلحات

Every term in Quantization (II): Linear Quantization and Integer-Only Inference, defined once and used the same way in every part. Each entry links to the slides where the idea appears.كل مصطلح في محاضرة «التكميم (Quantization) الجزء الثاني: التكميم الخطي والاستدلال بالأعداد الصحيحة فقط»، معرّف مرة واحدة ومستخدم بالمعنى نفسه في كل الأجزاء. كل مدخل يربطك بالشرائح التي تظهر فيها الفكرة.

Termsالمصطلحات
42
Lettersالحروف
18

#

|r|max

The largest absolute value in a tensor, used as the half-range in symmetric quantization.أكبر قيمة مطلقة في الموتر (tensor)، وتُستخدم كنصف المدى في التكميم المتماثل.

32-bit accumulator

Wide integer register that sums N-bit products without overflow; int8 products need 16 bits, plus about log2(K) bits for K terms.مسجّل صحيح عريض يجمع حواصل الضرب ذات N بت دون فيضان (overflow)؛ حاصل ضرب int8 يحتاج 16 بت، إضافة إلى نحو log2(K) بت لجمع K حدًّا.

A

Activation zero point (Z_X)

The zero point of the input activations X. It stays nonzero, so its weight-only term -Z_X q_W is precomputed into q_bias; how to choose it is left to the next lecture.نقطة صفر تنشيطات الإدخال X. تبقى غير صفرية، لذا يُحسب حدها المعتمد على الأوزان فقط -Z_X q_W مسبقًا ويُدمج في q_bias؛ أما طريقة اختيارها فمؤجلة إلى المحاضرة القادمة.

Affine mapping

A linear map plus an offset. Here r = S(q - Z) maps integer q to real r, with scale S and offset Z.تحويل خطي مضاف إليه إزاحة. هنا r = S(q - Z) يحوّل العدد الصحيح q إلى العدد الحقيقي r، بمعامل مقياس S وإزاحة Z.

Asymmetric quantization

Linear quantization with a general range [r_min, r_max] and a nonzero zero point Z; it suits one-sided data such as ReLU activations.تكميم خطي بمدى عام [r_min, r_max] ونقطة صفر Z غير صفرية؛ وهو مناسب للبيانات أحادية الجانب مثل مخرجات ReLU.

B

Bias quantization

Quantizing b with Z_b = 0 and S_b = S_W S_X so it can be added directly into the int32 accumulator.تكميم الانحياز b بجعل Z_b = 0 و S_b = S_W S_X، بحيث يمكن إضافته مباشرةً إلى المُجمِّع int32.

Binary/Ternary quantization

Extreme quantization to 1 or 2 levels (plus zero). It is previewed as greyed-out on slide 2 and covered later.تكميم متطرف إلى مستوى واحد أو مستويين (مع الصفر). يظهر باللون الرمادي كمعاينة في الشريحة 2 ويُشرح لاحقًا.

Bit width (N)

The number of bits per quantized value; it fixes the number of levels at 2^N.عدد البتات لكل قيمة مكمَّمة؛ وهو يحدد عدد المستويات بـ 2^N.

C

Clipping

Forcing a code that falls outside [q_min, q_max] onto the nearest end code. In full range mode +|r|max maps to 2^(N-1), one step past q_max, so it is clipped.إجبار أي رمز يقع خارج [q_min, q_max] على أقرب رمز طرفي. في نمط المدى الكامل تُربط +|r|max بـ 2^(N-1)، أي بعد q_max بخطوة، فتُقصّ.

Codebook

The table of floating-point centroid values that K-means quantization indexes into when it reconstructs weights.جدول قيم المراكز العشرية (floating-point) الذي يفهرس فيه تكميم K-means عند إعادة بناء الأوزان.

E

Exact representation of zero

The requirement that real 0 maps to an integer code (Z) with no error, which keeps zero padding, ReLU zeros and pruned weights exact.اشتراط أن يُربط الصفر الحقيقي برمز صحيح (Z) دون أي خطأ، مما يُبقي الحشو بالأصفار (zero padding) وأصفار ReLU والأوزان المقلَّمة (pruned) دقيقة تمامًا.

F

Fixed-point multiplication

Applying the float rescale factor as an integer multiply by M0, a fixed-point number in [0.5, 1).تطبيق معامل إعادة القياس العشري كعملية ضرب صحيحة في M0، وهو عدد بفاصلة ثابتة ضمن [0.5, 1).

Full range mode

A symmetric scheme with S = |r|max / 2^(N-1) that uses q_min = -2^(N-1). Its largest positive value maps one step past q_max and gets clipped.مخطط متماثل فيه S = |r|max / 2^(N-1) ويستخدم q_min = -2^(N-1). أكبر قيمة موجبة فيه تقع بعد q_max بخطوة واحدة فتُقصّ (clipped).

I

INT8

8-bit signed integer format with range [-128, 127]; it is the standard target for deployed linear quantization.صيغة عدد صحيح بإشارة بعرض 8 بت ومداها [-128, 127]؛ وهي الهدف المعتاد عند نشر نماذج التكميم الخطي.

Integer-only dataflow

The layer pipeline with bit widths: int q_W and q_X enter Conv, the int32 result adds the int32 q_bias, the sum is scaled by S_W S_X / S_Y back to int, and Z_Y is added to give int q_Y.مسار الطبقة مع عرض البتات: يدخل q_W و q_X الصحيحان إلى Conv، وتُضاف نتيجة int32 إلى q_bias من نوع int32، ثم يُقاس المجموع بـ S_W S_X / S_Y عائدًا إلى عدد صحيح، ويُضاف Z_Y لنحصل على q_Y الصحيح.

Integer-only inference

Running a layer entirely with integer multiplies, adds and shifts, so no floating-point unit is needed at runtime.تشغيل الطبقة بالكامل بعمليات ضرب وجمع وإزاحة صحيحة فقط، فلا حاجة إلى وحدة فاصلة عائمة وقت التشغيل.

J

Jacob et al. (CVPR 2018)

"Quantization and Training of Neural Networks for Efficient Integer-Arithmetic-Only Inference", the source of the affine scheme and the integer-only pipeline.الورقة "Quantization and Training of Neural Networks for Efficient Integer-Arithmetic-Only Inference"، وهي مصدر المخطط التآلفي ومسار الاستدلال بالأعداد الصحيحة فقط.

K

K-means-based quantization

Clusters weights into a codebook of float centroids and stores per-weight integer indices; computation still uses floating-point arithmetic.يجمّع الأوزان في عناقيد ضمن جدول رموز (codebook) من مراكز عشرية، ويخزّن لكل وزن فهرسًا صحيحًا؛ لكن الحساب نفسه يبقى بالفاصلة العائمة.

L

Latency-accuracy trade-off

The frontier of top-1 accuracy against latency. In the slides' MobileNet plot on Snapdragon 835, INT8 models reach higher accuracy than float models at the same latency.منحنى دقة top-1 مقابل زمن الاستجابة. في رسم MobileNet على Snapdragon 835 في الشرائح، تحقق نماذج INT8 دقة أعلى من النماذج العشرية عند نفس زمن الاستجابة.

Linear quantization

Quantization that maps integers to reals by an affine function r = S(q - Z), so stored values are integers and arithmetic can be done in integers.تكميم يربط الأعداد الصحيحة بالأعداد الحقيقية عبر دالة تآلفية r = S(q - Z)، فتُخزَّن القيم كأعداد صحيحة ويمكن إجراء الحسابات بالأعداد الصحيحة.

Linear quantized convolution layer

The integer-only convolution layer: q_Y = (S_W S_X / S_Y)(Conv(q_W, q_X) + q_bias) + Z_Y.طبقة الالتفاف بالأعداد الصحيحة فقط: q_Y = (S_W S_X / S_Y)(Conv(q_W, q_X) + q_bias) + Z_Y.

Linear quantized fully-connected layer

The integer-only FC layer: q_Y = (S_W S_X / S_Y)(q_W q_X + q_bias) + Z_Y.الطبقة كاملة الاتصال (FC) بالأعداد الصحيحة فقط: q_Y = (S_W S_X / S_Y)(q_W q_X + q_bias) + Z_Y.

M

M0 and bit shift

The decomposition S_W S_X / S_Y = 2^(-n) M0 with M0 in [0.5, 1); the 2^(-n) factor is a right shift by n bits.تفكيك S_W S_X / S_Y = 2^(-n) M0 حيث M0 ضمن [0.5, 1)؛ والعامل 2^(-n) هو إزاحة لليمين بمقدار n بت.

P

Precomputation

Evaluating terms that depend only on weights and fixed parameters (such as -Z_X q_W + Z_W Z_X) offline, so they cost nothing at inference time.حساب الحدود التي تعتمد فقط على الأوزان والمعاملات الثابتة (مثل -Z_X q_W + Z_W Z_X) مسبقًا خارج وقت التشغيل، فلا تكلّف شيئًا أثناء الاستدلال.

Q

q_bias

The precomputed 32-bit term q_b - Z_X q_W (or q_b - Conv(q_W, Z_X) for convolution) that absorbs the activation zero-point correction.الحد المحسوب مسبقًا بعرض 32 بت q_b - Z_X q_W (أو q_b - Conv(q_W, Z_X) في الالتفاف)، والذي يستوعب تصحيح نقطة صفر التنشيطات.

q_min and q_max

The ends of the signed N-bit integer range: q_min = -2^(N-1) and q_max = 2^(N-1) - 1 (for example, -128 and 127 for 8 bits).طرفا مدى الأعداد الصحيحة ذات الإشارة بعرض N بت: q_min = -2^(N-1) و q_max = 2^(N-1) - 1 (مثلًا -128 و 127 عند 8 بت).

Quantization error

The difference between an original value and its reconstruction. For any value that is not clipped, its magnitude is at most S/2.الفرق بين القيمة الأصلية وقيمتها المُعاد بناؤها. لأي قيمة لم تُقصّ (clipping)، لا يتجاوز مقدار هذا الخطأ S/2.

Quantized matrix multiplication

Computing Y = WX as q_Y = (S_W S_X / S_Y)(q_W - Z_W)(q_X - Z_X) + Z_Y, so the inner products use integers only.حساب Y = WX على صورة q_Y = (S_W S_X / S_Y)(q_W - Z_W)(q_X - Z_X) + Z_Y، بحيث تُجرى الضروب الداخلية بالأعداد الصحيحة فقط.

Quantized value (q)

The stored integer code for a real value, computed as q = clamp(round(r / S) + Z, q_min, q_max).الرمز الصحيح المخزَّن مقابل قيمة حقيقية، ويُحسب بالعلاقة q = clamp(round(r / S) + Z, q_min, q_max).

R

r_min and r_max

The minimum and maximum of the floating-point range being quantized, which map to q_min and q_max.أصغر وأكبر قيمة في المدى العشري المراد تكميمه، ويُربطان بـ q_min و q_max على الترتيب.

Reconstructed weights

The real values recovered from codes by S(q - Z); they lie on a uniform grid of spacing S.القيم الحقيقية المستعادة من الرموز عبر S(q - Z)؛ وهي تقع على شبكة منتظمة المسافة بين نقاطها S.

Requantization (rescale)

Multiplying the int32 accumulator by S_W S_X / S_Y and adding Z_Y to produce the N-bit output code.ضرب المُجمِّع int32 في S_W S_X / S_Y ثم إضافة Z_Y للحصول على رمز المخرج بعرض N بت.

Rescale factor (S_W S_X / S_Y)

The single real multiplier in front of the integer sum in q_Y. Empirically it always lies in (0, 1), which is why it can be written as 2^(-n) M0.المضاعف الحقيقي الوحيد أمام المجموع الصحيح في q_Y. تجريبيًا يقع دائمًا ضمن (0, 1)، ولهذا يمكن كتابته على صورة 2^(-n) M0.

Restricted range mode

A symmetric scheme with S = |r|max / (2^(N-1) - 1) and q in [-(2^(N-1) - 1), 2^(N-1) - 1], for example [-127, 127] for INT8. It is not on the slides but is common in practice.مخطط متماثل فيه S = |r|max / (2^(N-1) - 1) و q ضمن [-(2^(N-1) - 1), 2^(N-1) - 1]، مثلًا [-127, 127] في INT8. غير موجود في الشرائح لكنه شائع عمليًا.

Rounding (round)

Taking the nearest integer. The zero point is Z = round(q_min - r_min / S) so that it is an integer code, for example round(-2 - (-1.08 / 1.07)) = -1.أخذ أقرب عدد صحيح. نقطة الصفر Z = round(q_min - r_min / S) لتكون رمزًا صحيحًا، مثلًا round(-2 - (-1.08 / 1.07)) = -1.

S

Scale (S)

Floating-point quantization parameter equal to the real-valued step between adjacent integer levels: S = (r_max - r_min) / (q_max - q_min).معامل تكميم عشري يساوي المسافة الحقيقية بين مستويين صحيحين متجاورين: S = (r_max - r_min) / (q_max - q_min).

Symmetric quantization

Linear quantization with Z = 0 and a range of [-|r|max, |r|max]; it is typically used for weights.تكميم خطي فيه Z = 0 والمدى [-|r|max, |r|max]؛ ويُستخدم عادةً للأوزان.

T

Top-1 accuracy

The share of test images whose single highest-scoring class is correct; the y-axis of the MobileNet latency plot on ImageNet.نسبة صور الاختبار التي يكون فيها الصنف صاحب أعلى درجة هو الصحيح؛ وهي المحور الرأسي في رسم زمن استجابة MobileNet على ImageNet.

Two's complement

The signed binary encoding used for the codes, where 2 bits give 10 = -2, 11 = -1, 00 = 0, 01 = 1.الترميز الثنائي ذو الإشارة المستخدم للرموز، حيث يعطي 2 بت: 10 = -2، 11 = -1، 00 = 0، 01 = 1.

W

Weight distribution

Trained weights are typically bell-shaped and centred near 0, which makes symmetric quantization a good fit for them.الأوزان المدرَّبة عادةً على شكل جرس ومتمركزة قرب 0، ولهذا يناسبها التكميم المتماثل.

Z

Z_W = 0

Setting the weight zero point to 0 through symmetric weight quantization, which removes the runtime term Z_W q_X.جعل نقطة صفر الأوزان تساوي 0 عبر التكميم المتماثل للأوزان، مما يحذف الحد Z_W q_X من وقت التشغيل.

Zero point (Z)

Integer quantization parameter that is the code representing real 0 exactly: Z = round(q_min - r_min / S).معامل تكميم صحيح يمثّل الرمز الذي يعبّر عن الصفر الحقيقي بدقة تامة: Z = round(q_min - r_min / S).