* feat: support new arg num_items_in_batch * use kwargs to manage extra unknown kwargs for now * upgrade against upstream transformers main * make sure trl is on latest too * fix for upgraded trl * fix: handle trl and transformer signature change * feat: update trl to handle transformer signature * RewardDataCollatorWithPadding no longer has max_length * handle updated signature for tokenizer vs processor class * invert logic for tokenizer vs processor class * processing_class, not processor class * also handle processing class in dpo * handle model name w model card creation * upgrade transformers and add a loss check test * fix install of tbparse requirements * make sure to add tbparse to req * feat: revert kwarg to positional kwarg to be explicit --------- Co-authored-by: Wing Lian <wing.lian@gmail.com>
48 lines
1.8 KiB
Django/Jinja
48 lines
1.8 KiB
Django/Jinja
FROM winglian/axolotl-base:{{ BASE_TAG }}
|
|
|
|
ENV TORCH_CUDA_ARCH_LIST="7.0 7.5 8.0 8.6+PTX"
|
|
ENV AXOLOTL_EXTRAS="{{ AXOLOTL_EXTRAS }}"
|
|
ENV AXOLOTL_ARGS="{{ AXOLOTL_ARGS }}"
|
|
ENV CUDA="{{ CUDA }}"
|
|
ENV BNB_CUDA_VERSION="{{ CUDA }}"
|
|
ENV PYTORCH_VERSION="{{ PYTORCH_VERSION }}"
|
|
ENV GITHUB_REF="{{ GITHUB_REF }}"
|
|
ENV GITHUB_SHA="{{ GITHUB_SHA }}"
|
|
ENV NIGHTLY_BUILD="{{ NIGHTLY_BUILD }}"
|
|
|
|
RUN apt-get update && \
|
|
apt-get install -y --allow-change-held-packages vim curl nano libnccl2 libnccl-dev
|
|
|
|
WORKDIR /workspace
|
|
|
|
RUN git clone --depth=1 https://github.com/axolotl-ai-cloud/axolotl.git
|
|
|
|
WORKDIR /workspace/axolotl
|
|
|
|
RUN git fetch origin +$GITHUB_REF && \
|
|
git checkout FETCH_HEAD
|
|
|
|
# If AXOLOTL_EXTRAS is set, append it in brackets
|
|
RUN if [ "$NIGHTLY_BUILD" = "true" ] ; then \
|
|
sed -i 's#^transformers.*#transformers @ git+https://github.com/huggingface/transformers.git@main#' requirements.txt; \
|
|
sed -i 's#^peft.*#peft @ git+https://github.com/huggingface/peft.git@main#' requirements.txt; \
|
|
sed -i 's#^accelerate.*#accelerate @ git+https://github.com/huggingface/accelerate.git@main#' requirements.txt; \
|
|
sed -i 's#^trl.*#trl @ git+https://github.com/huggingface/trl.git@main#' requirements.txt; \
|
|
fi
|
|
|
|
RUN if [ "$AXOLOTL_EXTRAS" != "" ] ; then \
|
|
pip install -e .[deepspeed,flash-attn,optimizers,$AXOLOTL_EXTRAS] $AXOLOTL_ARGS; \
|
|
else \
|
|
pip install -e .[deepspeed,flash-attn,optimizers] $AXOLOTL_ARGS; \
|
|
fi
|
|
|
|
# So we can test the Docker image
|
|
RUN pip install -r requirements-dev.txt -r requirements-tests.txt
|
|
|
|
# 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
|