* add support for optimi_adamw optimizer w kahan summation * pydantic validator for optimi_adamw * workaround for setting optimizer for fsdp * make sure to install optimizer packages * make sure to have parity for model parameters passed to optimizer * add smoke test for optimi_adamw optimizer * don't use foreach optimi by default
39 lines
1.1 KiB
Docker
39 lines
1.1 KiB
Docker
ARG BASE_TAG=main-base
|
|
FROM winglian/axolotl-base:$BASE_TAG
|
|
|
|
ARG TORCH_CUDA_ARCH_LIST="7.0 7.5 8.0 8.6+PTX"
|
|
ARG AXOLOTL_EXTRAS=""
|
|
ARG AXOLOTL_ARGS=""
|
|
ARG CUDA="118"
|
|
ENV BNB_CUDA_VERSION=$CUDA
|
|
ARG PYTORCH_VERSION="2.1.2"
|
|
|
|
ENV PYTORCH_VERSION=$PYTORCH_VERSION
|
|
|
|
RUN apt-get update && \
|
|
apt-get install -y --allow-change-held-packages vim curl nano libnccl2 libnccl-dev rsync s3fs
|
|
|
|
WORKDIR /workspace
|
|
|
|
RUN git clone --depth=1 https://github.com/axolotl-ai-cloud/axolotl.git
|
|
|
|
WORKDIR /workspace/axolotl
|
|
|
|
# If AXOLOTL_EXTRAS is set, append it in brackets
|
|
RUN pip install causal_conv1d
|
|
RUN if [ "$AXOLOTL_EXTRAS" != "" ] ; then \
|
|
pip install -e .[deepspeed,flash-attn,mamba-ssm,optimizers,$AXOLOTL_EXTRAS] $AXOLOTL_ARGS; \
|
|
else \
|
|
pip install -e .[deepspeed,flash-attn,mamba-ssm,optimizers] $AXOLOTL_ARGS; \
|
|
fi
|
|
|
|
# So we can test the Docker image
|
|
RUN pip install pytest
|
|
|
|
# fix so that git fetch/pull from remote works
|
|
RUN git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" && \
|
|
git config --get remote.origin.fetch
|
|
|
|
# helper for huggingface-login cli
|
|
RUN git config --global credential.helper store
|