llmcompressor.entrypoints.model_free.converter
Classes:
-
ModelFreePtqConverter–Converter that quantizes and compresses safetensors checkpoints without
ModelFreePtqConverter
Bases: Converter
Converter that quantizes and compresses safetensors checkpoints without loading a model. Implements the compressed-tensors Converter protocol so it can be chained with other converters (e.g. a dequantizer) and used with convert_checkpoint.
Methods:
-
get_dependencies–For microscale schemes, return fused partner tensor names that must be
-
process–Quantize and compress all tensors. Device is inferred from the tensors.
-
update_config–Build or merge the final QuantizationConfig in COMPRESSED status.
Source code in src/llmcompressor/entrypoints/model_free/converter.py
get_dependencies
For microscale schemes, return fused partner tensor names that must be loaded together to compute a shared global scale. Standard schemes have no cross-tensor dependencies.
Source code in src/llmcompressor/entrypoints/model_free/converter.py
process
Quantize and compress all tensors. Device is inferred from the tensors.
Source code in src/llmcompressor/entrypoints/model_free/converter.py
update_config
Build or merge the final QuantizationConfig in COMPRESSED status. When chained after a dequantizer (config=None), creates from scratch. When seeded with a pre-existing checkpoint config, merges into it.
Source code in src/llmcompressor/entrypoints/model_free/converter.py
split_fused_moe_experts
Find fused MoE experts (with gate_up_proj/down_proj). Split them from 3D tensors into individual 2D expert tensors.
Args: tensors: Dictionary of loaded tensors from safetensors file
Returns: split_tensors: New dictionary with split expert weights