Skip to main content

Python class

BlockParameters

BlockParametersโ€‹

class max.graph.quantization.BlockParameters(elements_per_block, block_size)

source

Bases: object

Parameters describing the structure of a quantization block.

Block-based quantization stores elements in fixed-size blocks. Each block contains a specific number of elements in a compressed format.

Parameters:

  • elements_per_block (int)
  • block_size (int)

block_sizeโ€‹

block_size: int

source

The size in bytes of the encoded representation of one quantization block.

elements_per_blockโ€‹

elements_per_block: int

source

The number of original tensor elements grouped into one quantization block.