IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).

Python class

NVFP4Activation

NVFP4Activation​

class max.nn.common_layers.quant_tensor.NVFP4Activation(data, scales, input_scale, scales_offset)

source

Bases: QTensor

NVFP4-quantized activation tensor.

Parameters:

  • data (Tensor) – Packed uint8 FP4 tokens of shape [total_tokens, K / 2].
  • scales (Tensor) – Block scales in the padded SF-atom layout.
  • input_scale (Tensor) – The float32 scale these tokens were quantized with.
  • scales_offset (Tensor) – Per-expert offset into the padded scales.

data​

data: Tensor

source

input_scale​

input_scale: Tensor

source

scales​

scales: Tensor

source

scales_offset​

scales_offset: Tensor

source