From f80d94e0194c571d430a3523bc6757774e04c415 Mon Sep 17 00:00:00 2001 From: Boris Zubarev Date: Sat, 30 Sep 2023 21:41:59 +0400 Subject: [PATCH] Release: 0.3.19 --- setup.py | 2 +- src/xllm/__init__.py | 2 +- src/xllm/experiments/base.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 3479a6e..c0f8d81 100644 --- a/setup.py +++ b/setup.py @@ -57,7 +57,7 @@ # Setup setup( name="xllm", - version="0.3.18", + version="0.3.19", description="Simple & Cutting Edge LLM Finetuning", license_files=["LICENSE"], long_description=open("README.md", "r", encoding="utf-8").read(), diff --git a/src/xllm/__init__.py b/src/xllm/__init__.py index 4c72e67..5b2443b 100644 --- a/src/xllm/__init__.py +++ b/src/xllm/__init__.py @@ -14,7 +14,7 @@ # ruff: noqa: F401 -__version__ = "0.3.18" +__version__ = "0.3.19" from . import enums, types from .core.config import HuggingFaceConfig diff --git a/src/xllm/experiments/base.py b/src/xllm/experiments/base.py index c12a0ca..cd38ddc 100644 --- a/src/xllm/experiments/base.py +++ b/src/xllm/experiments/base.py @@ -155,7 +155,7 @@ def build(self): elif self.quantization_config is not None: dist_logger.warning("quantization_config is not None, but the model was built outside of the experiment") - if self.is_bnb_quantization or self.config.bnb_quantize_after_model_init: + if self.is_bnb_quantization and self.config.bnb_quantize_after_model_init: self.before_bnb_quantization() self.bnb_quantization() bnb_quantization_type = "int4" if self.quantization_config.load_in_4bit else "int8" @@ -307,7 +307,7 @@ def before_model_build(self) -> None: def build_model(self) -> PreTrainedModel: quantization_config = ( - None if self.is_bnb_quantization or self.config.bnb_quantize_after_model_init else self.quantization_config + None if self.is_bnb_quantization and self.config.bnb_quantize_after_model_init else self.quantization_config ) model = build_model(config=self.config, quantization_config=quantization_config) return model