llmcompressor
LLM Compressor is a library for compressing large language models utilizing the latest techniques and research in the field for both training aware and post-training techniques.
The library is designed to be flexible and easy to use on top of PyTorch and HuggingFace Transformers, allowing for quick experimentation.
Modules:
-
args
–Arguments package for LLM Compressor.
-
core
–Provides the core compression framework for LLM Compressor.
-
datasets
–Provides dataset utilities for model calibration and processing.
-
entrypoints
–Provides entry points for model compression workflows.
-
logger
–Provides a flexible logging configuration for LLM Compressor.
-
metrics
–Metrics logging and monitoring framework for compression workflows.
-
modeling
–Model preparation and fusion utilities for compression workflows.
-
modifiers
–Compression modifiers for applying various optimization techniques.
-
observers
–Framework for monitoring and analyzing model behavior during compression.
-
pipelines
–Compression pipelines for orchestrating different compression strategies.
-
pytorch
–PyTorch-specific utilities and tools for model compression workflows.
-
recipe
–Recipe system for defining and managing compression workflows.
-
sentinel
–Sentinel value implementation for LLM compression workflows.
-
transformers
–Tools for integrating LLM Compressor with transformers training flows.
-
typing
–Defines type aliases for the llm-compressor library.
-
utils
–General utility functions used throughout LLM Compressor.
Functions:
-
configure_logger
–Configure the logger for LLM Compressor.
configure_logger
Configure the logger for LLM Compressor.
This function sets up the console and file logging as per the specified or default parameters.
Note: Environment variables take precedence over function parameters.
Parameters:
-
config
Optional[LoggerConfig]
, default:None
) –The configuration for the logger to use.