fused_act_dequant

paddle.incubate.nn.functional. fused_act_dequant ( x: Tensor, x_scale: Tensor ) Tensor [source]

Applies fused activation and dequantization operation to convert float8 quantized data back to bfloat16.

Parameters
  • x (Tensor) – Input quantized tensor with dtype float8_e4m3fn and shape [M, N]. This tensor contains the quantized activations from previous layers.

  • x_scale (Tensor) – Dequantization scale tensor with dtype float32 and shape [M, (N + 127) // 128]. Each scale value corresponds to a 128-column block in the input tensor.

Returns

Tensor. Dequantized output tensor with dtype bfloat16 and shape [M, N]. The values are

computed as input * scale for each corresponding 128-column block.