def get_bnb_qlinear_cls(quantization_config):
    """Get the right BNBQuantLinear class based on the quantization config."""
    if transformers.utils.import_utils.is_bitsandbytes_available() and quantization_config.load_in_4bit:
        from bitsandbytes.nn import Linear4bit

        return Linear4bit
    return None
Get the right BNBQuantLinear class based on the quantization config.
olive/common/hf/quant.py