Skip to content

#ggml.q4_k encoding

← Encoding reference

GGML Q4_K super-block storage schema.

Property Value
Role storage schema
Implicit shaped attachment no

Fixed storage geometry

Logical elements Storage bytes Required alignment
256 144 2

Logical fields

Role Level Format Elements Bits per element
scale 0 f16 1 16
minimum 0 f16 1 16
scale 1 u6 8 6
minimum 1 u6 8 6
payload 0 u4 256 4

Bit projections

Field Record bit offset Record bit stride Field element offset Elements Field bit offset Bits
scale[0] 0 16 0 1 0 16
minimum[0] 16 16 0 1 0 16
scale[1] 32 8 0 4 0 6
scale[1] 96 8 4 4 0 4
scale[1] 38 8 4 4 4 2
minimum[1] 64 8 0 4 0 6
minimum[1] 100 8 4 4 0 4
minimum[1] 70 8 4 4 4 2
payload[0] 128 8 0 32 0 4
payload[0] 132 8 32 32 0 4
payload[0] 384 8 64 32 0 4
payload[0] 388 8 96 32 0 4
payload[0] 640 8 128 32 0 4
payload[0] 644 8 160 32 0 4
payload[0] 896 8 192 32 0 4
payload[0] 900 8 224 32 0 4

Required auxiliary values

Key Description
scale —
secondary_scale —
minimum —