Skip to content

vllm.model_executor.layers.quantization.inc.schemes.inc_wna16_linear

Classes:

INCXPULinearBase

Bases: INCLinearScheme

_convert_awq_qweight_to_gptq(qw)

Convert AWQ qweight [K, N // pf] to GPTQ qweight [K // pf, N].

AWQ packs along the output dim with a non-standard nibble order; GPTQ packs along the input dim with sequential nibble order. The conversion is lossless — it only reshuffles bits.

INCXPULinearMethod

Bases: INCXPULinearBase

XPU linear method for INC w4a16 quantization (symmetric only).

Supports both GPTQ-packed (auto_round:auto_gptq) and AWQ-packed (auto_round:auto_awq) AutoRound checkpoints. AWQ-packed qweights are losslessly repacked into the GPTQ-style nibble layout during process_weights_after_loading, before the final oneDNN "NT" transpose that torch.ops._xpu_C.int4_gemm_w4a16 expects.