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).

Mojo function

dequant_nvfp4

def dequant_nvfp4(ctx: DeviceContext, output: TileTensor[Engine=output.Engine, address_space=output.address_space, linear_idx_type=output.linear_idx_type], input: TileTensor[Engine=input.Engine, address_space=input.address_space, linear_idx_type=input.linear_idx_type], scales: TileTensor[Engine=scales.Engine, address_space=scales.address_space, linear_idx_type=scales.linear_idx_type], tensor_sf: Float32, num_rows: Int, num_cols: Int)

Dequantize NVFP4 packed weights to bfloat16 or float32.

Args:

Raises:

If num_cols is not a multiple of 16, or if the shapes of output, input and scales do not agree with num_rows and num_cols. The kernels read scales on trust, so a short scale tensor would otherwise be an out-of-bounds read.

Was this page helpful?