Skip to content

quantize::laplacian

More...

Classes

Name
class quantize::laplacian::LaplacianWeightedError

Functions

Name
int pyramid_levels_for_size(int block_size)

Detailed Description

Encode-side Laplacian-pyramid error analysis for SGFP4 quantization.

The pyramid is an encoder policy only. It affects block and mode selection but
is not serialized into v2 leaf flags and adds no runtime decode work.

The number of levels adapts to leaf size:

* 4x4 and 8x8: plain MSE
* 16x16: one level
* 32x32: two levels
* 64x64: three levels

Functions Documentation

function pyramid_levels_for_size

int pyramid_levels_for_size(
    int block_size
)

Return the configured encode-side pyramid depth for a leaf size.


Updated on 2026-10-09 at 03:59:43 +0000