llmcompressor.entrypoints.model_free.save_utils
Functions:
-
update_config–Update Quantization config for model stub in save_directory,
create_or_update_quant_config
create_or_update_quant_config(
config_file_path: str | None,
scheme_name: str,
scheme: QuantizationScheme,
ignore: list[str],
converter: Converter | None = None,
) -> QuantizationConfig
Create or update quantization_config in 3 possible ways: 1) If converting from a format that isn't compressed-tensors, create new quant config based on converter and append scheme 2) If checkpoint is in a pre-existing compressed-tensors format, use its quantization_config as starting point and append scheme 3) Otherwise, create from scratch based on scheme
Source code in src/llmcompressor/entrypoints/model_free/save_utils.py
update_config
update_config(
save_directory: str | PathLike,
scheme_name: str,
scheme: QuantizationScheme,
ignore: list[str],
converter: Converter | None = None,
)
Update Quantization config for model stub in save_directory, based on the provided scheme and converter. Quantization config will either be created or updated, see create_or_update_quant_config docstring for more info.