Skip to content

vllm.model_executor.layers.quantization.inc.schemes.inc_w4a8_linear

Classes:

INCXPUW4A8LinearMethod

Bases: INCXPULinearMethod

XPU linear method for INC int4 weights with dynamic int8 activations.

Uses the same GPTQ-packed "NT" qweight layout as INCXPULinearMethod — int4_gemm_w4a8 and int4_gemm_w4a16 accept bit-identical weights, so no extra repacking is needed. Activations are dynamically quantized per-token to symmetric int8, which keeps the GEMM on the int8 datapath instead of upconverting the weights to the activation dtype. That is a win for compute-bound shapes (large token counts, e.g. diffusion), where w4a16 is dominated by dequantization rather than by weight bandwidth.

Both scale tensors must be float16: the kernel reads them as fp16 regardless of the activation dtype, so bf16 scales are silently misinterpreted. The activations themselves may be bf16 or fp16.

Opt in with VLLM_XPU_INC_WNA16_BACKEND=w4a8. Whether this beats ARK is device-dependent, so it is not the default: it was measured faster on B70 (Xe2), where ARK cannot use its XMX int8 path and falls back to fp16.