Token Lab검색

← 모든 실험
양자화와 이상치 / 2 OF 5

8비트 복원

More quantization levels usually reduce reconstruction error.

로컬 계산 / 시뮬레이션

외부 API 없는 로컬 교육용 실험입니다. 합성 데이터는 운영 환경 측정이 아닙니다.

Study guide & lesson outlineLEARNING CONTRACT

Understand → implement → investigate

Goal: explain the mechanism in this lesson, reproduce one example and test a failure case. Reading alone does not mark mastery.

02 · 예측 및 설정

기술 설명, 매개변수 이름과 참고 답변은 현재 영어입니다.

03 · 근거 확인

실행하면 결과가 표시됩니다.

방법과 참고 문헌

Symmetric per-tensor scalar quantizer with range ±(2^(bits−1)−1). This is not LLM.int8(), GPTQ or AWQ. Ideal compression ignores scale metadata and runtime packing. Scalar error does not measure language-model accuracy.

Text / 原始公式
scale=max|x|/(2^(bits−1)−1); q=round(x/scale); x̂=q×scale

Low scalar MSE does not guarantee stable downstream model quality.

LLM.int8() · outliers and mixed precision ↗

연습 문제

quantization-2 / 01What does “Eight-bit reconstruction” test?

More quantization levels usually reduce reconstruction error.

Original teaching answer / local derivation. Method reference: LLM.int8() · outliers and mixed precision ↗

실험 열기 →
quantization-2 / 02Which computation produces the result in “Eight-bit reconstruction”?

; ; ×scale

Original teaching answer / local derivation. Method reference: LLM.int8() · outliers and mixed precision ↗

실험 열기 →
quantization-2 / 03What is the baseline configuration for “Eight-bit reconstruction”?

{"values":"-1,-0.7,-0.2,0,0.15,0.4,0.8,1","bits":8}

Original teaching answer / local derivation. Method reference: LLM.int8() · outliers and mixed precision ↗

실험 열기 →
quantization-2 / 04What numerical result should you check for “Eight-bit reconstruction”?

{"MSE":0.0000028868807737615443,"Max absolute error":0.003149606299212626,"Ideal compression vs FP32":4,"Scale":0.007874015748031496}

Original teaching answer / local derivation. Method reference: LLM.int8() · outliers and mixed precision ↗

실험 열기 →
quantization-2 / 05How would you run a controlled comparison for “Eight-bit reconstruction”?

Keep the supplied fixture and other settings fixed; change bits. Compare reconstruction error, MSE, scale and ideal compression.

Original teaching answer / local derivation. Method reference: LLM.int8() · outliers and mixed precision ↗

실험 열기 →
quantization-2 / 06What failure could invalidate a conclusion from “Eight-bit reconstruction”?

Low scalar MSE does not guarantee stable downstream model quality.

Original teaching answer / local derivation. Method reference: LLM.int8() · outliers and mixed precision ↗

실험 열기 →
quantization-2 / 07Is “Eight-bit reconstruction” a benchmark of a deployed language model?

No. Symmetric per-tensor scalar quantizer with range ±(2^(bits−1)−1). This is not LLM.int8(), GPTQ or AWQ. Ideal compression ignores scale metadata and runtime packing. Scalar error does not measure language-model accuracy.

Original teaching answer / local derivation. Method reference: LLM.int8() · outliers and mixed precision ↗

실험 열기 →
quantization-2 / 08Which evidence should you report for “Eight-bit reconstruction”?

Compare reconstruction error, MSE, scale and ideal compression. Export inputs, engine, result and method; distinguish synthetic fixtures from observed production data.

Original teaching answer / local derivation. Method reference: LLM.int8() · outliers and mixed precision ↗

실험 열기 →
quantization-2 / 09How can another researcher reproduce “Eight-bit reconstruction”?

Open quantization-2, reset the preset, retain the exact inputs and run. The calculation is deterministic for identical inputs.

Original teaching answer / local derivation. Method reference: LLM.int8() · outliers and mixed precision ↗

실험 열기 →
quantization-2 / 10What is the next validation step after “Eight-bit reconstruction”?

Low scalar MSE does not guarantee stable downstream model quality. Test the hypothesis on a representative held-out workload and document a baseline, success metric and stopping rule before claiming deployment readiness.

Original teaching answer / local derivation. Method reference: LLM.int8() · outliers and mixed precision ↗

실험 열기 →
MATHEMATICAL REVIEW · 2026-10-26

Assumptions, implementation & acceptance

This is symmetric per-tensor rounding; metadata is excluded from ideal compression. All-zero tensors use a safe scale of 1. Do not interpret scalar reconstruction MSE as LLM quality.

Engine formulas, scenario presets and numerical safeguards reviewed. Seeded synthetic inputs are not a production benchmark.

Finite tensor values → Scale = max magnitude / qmax → Round and clamp integers → Dequantize → reconstruction error
Mechanism map: follow the transformations from top to bottom.

Before running: predict a boundary case

More quantization levels usually reduce reconstruction error.

Hint: isolate the assumption

Keep the baseline input fixed, change one parameter or boundary, and compare both the numerical result and the claimed units. A passing example verifies this fixture only.

Minimal executable example

Save the example and linked modules in one folder. Use Node.js 22 or newer, then run node quantization-2.mjs. No third-party runtime dependencies.

import {calculate,network} from './academy-core.mjs';
const params={
  "values": "-1,-0.7,-0.2,0,0.15,0.4,0.8,1",
  "bits": 8
};
const result=calculate('quantization',params);
console.log(result.metrics);

Test and transfer

More quantization levels usually reduce reconstruction error.

Record input, code version, expected result and observed result in the notebook below. Then construct a counterexample that violates the assumption above and explain why the original conclusion no longer follows.

Download complete kit (.tar.gz) · Complete reference kit and regression checks

Predict, test and keep evidence

Before revealing an answer, predict one result. After the exercise, record the discrepancy and a transfer test. Saved locally across language editions.

Open notebook / export / clear →

The mathematical review scope is recorded per lesson. It does not establish empirical paper reproduction; report suspected errors in your notes. Review scope