Skip to content

vllm.model_executor.layers.quantization.utils.humming.schema

Map Humming schemas and handle shared checkpoint quantization settings.

Functions:

_group_shape(group_size, group_size_n=0)

Map humming group sizes to QuantKey GroupShape.

group_size: elements per group along K (col); 0 means full dimension. group_size_n: elements per group along N (row); 0 means 1 (per-row).

GroupShape convention: row = N dim, col = K dim.

check_and_fallback_input_schema(weight_schema, input_schema, param_dtype=None, allow_fallback=True, allow_fp8_sm100=True, warn=True)

Resolve input_schema against weight_schema, falling back if needed.

Parameters:

  • weight_schema

    (BaseWeightSchema) –

    the weight schema the input must be compatible with.

  • input_schema

    (BaseInputSchema) –

    the requested input schema.

  • param_dtype

    (dtype | None, default: None ) –

    model compute dtype, used as the 16-bit fallback.

  • allow_fallback

    (bool, default: True ) –

    if False, return the requested schema as-is.

  • allow_fp8_sm100

    (bool, default: True ) –

    whether FP8 activations may be honored on SM100-SM119. Humming's dense FP8 UMMA path is fast there, but the MoE grouped-GEMM path is not (the tuner can emit invalid two-CTA configs), so the MoE call sites pass False.

  • warn

    (bool, default: True ) –

    whether to log fallbacks; False when only probing the result.

humming_executed_input_quant_key(weight_quant_config, activation_key, allow_fallback=True)

The activation quantization Humming runs on this device for weights described by weight_quant_config when activation_key is requested. None if it runs unquantized activations or rejects the request.