vllm.model_executor.layers.quantization.utils.humming.linear
¶
Prepare and execute Humming linear layers.
Functions:
-
convert_linear_layer_to_humming_standard–Rename/reshape a linear layer's quantized params (the canonical MPLinear
-
replace_layer_parameters–Write
tensorsintolayer, keeping existing parameter objects.
convert_linear_layer_to_humming_standard(layer, name_map)
¶
Rename/reshape a linear layer's quantized params (the canonical MPLinear
layout: weight_packed int32 + weight_scale) into the parameter names
and layout humming's weight schema expects (weight / weight_scale).
Source code in vllm/model_executor/layers/quantization/utils/humming/linear.py
replace_layer_parameters(layer, tensors, names)
¶
Write tensors into layer, keeping existing parameter objects.
A param in names that gets no new tensor stays registered: an alias of a
replaced param follows it; one whose storage a new tensor is in, or a large
one, is also registered under a new name (see move_parameter); any other
keeps its data, retired.