add peft install back since it doesn't get installed by setup.py (#331)
This commit is contained in:
@@ -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 && \
|
||||||
|
|||||||
@@ -147,13 +147,17 @@ def load_model(
|
|||||||
LOG.exception(err)
|
LOG.exception(err)
|
||||||
raise err
|
raise err
|
||||||
|
|
||||||
try:
|
if not cfg.gptq and (
|
||||||
from peft import prepare_model_for_kbit_training
|
(cfg.adapter == "lora" and load_in_8bit)
|
||||||
except ImportError:
|
or (cfg.adapter == "qlora" and cfg.load_in_4bit)
|
||||||
# For backward compatibility
|
):
|
||||||
from peft import (
|
try:
|
||||||
prepare_model_for_int8_training as prepare_model_for_kbit_training,
|
from peft import prepare_model_for_kbit_training
|
||||||
)
|
except ImportError:
|
||||||
|
# For backward compatibility
|
||||||
|
from peft import (
|
||||||
|
prepare_model_for_int8_training as prepare_model_for_kbit_training,
|
||||||
|
)
|
||||||
|
|
||||||
model_kwargs = {}
|
model_kwargs = {}
|
||||||
if cfg.model_revision:
|
if cfg.model_revision:
|
||||||
|
|||||||
Reference in New Issue
Block a user