MCPcopy Create free account
hub / github.com/IST-DASLab/MoE-Quant / get_quantization_grid

Function get_quantization_grid

src/quant_utils.py:196–240  ·  view source on GitHub ↗

Get the quantization grid for the weight matrix weight: (..., (R), C) scale: (..., (R), C) qzero: (..., (R), C) maxq: ()

(
    weight: torch.Tensor,
    group_size: int,
    bits: int,
    symmetric: bool = False,
    dtype: torch.dtype = None,
    quantization_scale: QuantizationScale = QuantizationScale.ABSMAX,
    quant_max_shrink: float = 0.2,
    quant_n_grid: int = 100,
    quant_norm: float = 2.4,
)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 2

find_quantization_metaFunction · 0.85
mse_scaleFunction · 0.85

Tested by

no test coverage detected