add peft install back since it doesn't get installed by setup.py (#331)

This commit is contained in:
Wing Lian
2023-07-31 16:31:53 -04:00
committed by GitHub
parent 6c9a87c8ee
commit db2a3586f3
2 changed files with 12 additions and 7 deletions

View File

@@ -11,6 +11,7 @@ RUN apt-get update && \
WORKDIR /workspace WORKDIR /workspace
RUN pip3 install --force-reinstall "peft @ git+https://github.com/huggingface/peft.git@main"
RUN git clone --depth=1 https://github.com/OpenAccess-AI-Collective/axolotl.git RUN git clone --depth=1 https://github.com/OpenAccess-AI-Collective/axolotl.git
# If AXOLOTL_EXTRAS is set, append it in brackets # If AXOLOTL_EXTRAS is set, append it in brackets
RUN cd axolotl && \ RUN cd axolotl && \

View File

@@ -147,6 +147,10 @@ def load_model(
LOG.exception(err) LOG.exception(err)
raise err raise err
if not cfg.gptq and (
(cfg.adapter == "lora" and load_in_8bit)
or (cfg.adapter == "qlora" and cfg.load_in_4bit)
):
try: try:
from peft import prepare_model_for_kbit_training from peft import prepare_model_for_kbit_training
except ImportError: except ImportError: