# Kwantyzacja samych wag

EN: **Weight-only quantization** · id `weightquant`

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Inferencja i infrastruktura](https://aiatlasgraph.com/t/systems.md) › [Kwantyzacja i kompresja](https://aiatlasgraph.com/t/compression.md) › Kwantyzacja samych wag

## Description

- PL: Zapis wag w niskiej precyzji z kalibracją warstwa po warstwie, żeby utrzymać jakość przy 4 bitach i mniej.
- EN: Storing weights in low precision with layer-by-layer calibration to keep quality at 4 bits and below.

## In one sentence

- PL: To zapisywanie ustawień modelu mniej dokładnymi liczbami, żeby zajmowały mniej miejsca.
- EN: This stores model parameters with lower-precision numbers so they occupy less space.

## Problem it solves

- PL: Sam zapis ustawień modelu jest zbyt duży dla dostępnej pamięci.
- EN: The model's parameter storage alone is too large for available memory.

## What it does

- PL: Wartości zaokrągla się do mniejszej liczby poziomów, dobierając skalę na przykładach i sprawdzając wpływ na odpowiedzi.
- EN: Values are rounded to fewer levels, with scales calibrated on examples and effects on responses checked.

## Everyday example

- PL: Pobierasz oszczędniej zapisany model, który mieści się na laptopie, i testujesz go na swoich pytaniach.
- EN: You download a compactly stored model that fits on a laptop and test it on your questions.

## This concerns you if you…

- PL: ustawienia modelu zajmują zbyt dużo pamięci
- PL: porównujesz różne poziomy dokładności zapisu
- EN: find model parameters take too much memory
- EN: compare different storage-precision levels

## Keywords

GPTQ · AWQ · EXL2 · absmax scaling · zero points · group size · weight-only INT4

## How it works

- PL: Zakres wag mapuje się na ograniczony zestaw wartości z przypisaną skalą, często osobno dla grup lub kanałów. Przy wykonaniu wagi rozkodowuje się albo używa zgodnych operatorów niskiej precyzji, a kalibracja ogranicza błąd wyjścia.
- EN: Weight ranges are mapped to restricted values with assigned scales, often by group or channel. Execution either decodes weights or uses compatible low-precision operators, while calibration limits output errors.

## Limits

- PL: Wartości odstające i niewłaściwe grupowanie zwiększają błąd. Oszczędność pamięci nie zapewnia przyspieszenia bez zgodnego kernela; różne warstwy oraz zadania mogą wymagać innych ustawień.
- EN: Outliers and unsuitable grouping increase errors. Memory savings cannot guarantee acceleration without compatible kernels; layers and tasks can need different settings.

## Key terms

- PL: **skala kwantyzacji**: Współczynnik wiążący zakodowaną wartość z jej przybliżeniem liczbowym.
- PL: **grupa wag**: Fragment parametrów współdzielący ustawienia kodowania niskiej precyzji.
- EN: **quantisation scale**: A coefficient linking encoded values to numerical approximations.
- EN: **weight group**: A parameter subset sharing low-precision encoding settings.

## Know first

- [Algebra liniowa: wektory i macierze (Linear algebra: vectors and matrices)](https://aiatlasgraph.com/t/linearalgebra.md)
- [Zbiory testowe i regresje (Evaluation datasets and regression tests)](https://aiatlasgraph.com/t/evalsets.md)

## Examples

- PL: absmax · zero-point · GPTQ · AWQ · EXL2

## Related topics

Untyped, symmetric "see also" links.

- [Lokalne uruchamianie LLM na własnym komputerze (Running LLMs locally on consumer hardware)](https://aiatlasgraph.com/t/localllm.md)
- [Przycinanie wag i rzadkość (pruning) (Pruning and sparsity)](https://aiatlasgraph.com/t/pruning.md)
- [QLoRA (Quantized low-rank adaptation (QLoRA))](https://aiatlasgraph.com/t/qlora.md)
- [Szacowanie pamięci GPU (wagi i KV cache) (Estimating GPU memory for deployment)](https://aiatlasgraph.com/t/gpumemory.md)
- [Uruchamianie własnych modeli (Self-hosted model inference)](https://aiatlasgraph.com/t/selfhosting.md)

## Sources

- [LLM Course (Maxime Labonne)](<https://github.com/mlabonne/llm-course>) `mlabonne-llm-course` · by Maxime Labonne

---

AI Atlas revision 122 (2026-10-30) · HTML: https://aiatlasgraph.com/t/weightquant · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-30
