cleanup from pr feedback
Browse files- .github/workflows/base.yml +4 -14
- .github/workflows/main.yml +16 -4
- README.md +3 -3
- docker/Dockerfile +3 -2
- docker/Dockerfile-base +6 -9
.github/workflows/base.yml
CHANGED
@@ -14,26 +14,17 @@ jobs:
|
|
14 |
strategy:
|
15 |
matrix:
|
16 |
include:
|
17 |
-
- cuda:
|
18 |
cuda_version: 11.8.0
|
19 |
-
cuda_version_bnb: "118"
|
20 |
-
pytorch: 2.0.0
|
21 |
axolotl_extras:
|
22 |
-
- cuda:
|
23 |
cuda_version: 11.7.0
|
24 |
-
cuda_version_bnb: "117"
|
25 |
pytorch: 1.13.1
|
26 |
axolotl_extras:
|
27 |
-
- cuda:
|
28 |
cuda_version: 11.8.0
|
29 |
-
cuda_version_bnb: "118"
|
30 |
pytorch: 2.0.0
|
31 |
axolotl_extras: gptq
|
32 |
-
- cuda: cu117
|
33 |
-
cuda_version: 11.7.0
|
34 |
-
cuda_version_bnb: "117"
|
35 |
-
pytorch: 1.13.1
|
36 |
-
axolotl_extras: gptq
|
37 |
steps:
|
38 |
- name: Checkout
|
39 |
uses: actions/checkout@v3
|
@@ -55,13 +46,12 @@ jobs:
|
|
55 |
context: .
|
56 |
file: ./docker/Dockerfile-base
|
57 |
push: ${{ github.event_name != 'pull_request' }}
|
58 |
-
tags: ${{ steps.metadata.outputs.tags }}
|
59 |
labels: ${{ steps.metadata.outputs.labels }}
|
60 |
cache-from: type=gha
|
61 |
cache-to: type=gha,mode=max
|
62 |
build-args: |
|
63 |
CUDA_VERSION=${{ matrix.cuda_version }}
|
64 |
-
CUDA_VERSION_BNB=${{ matrix.cuda_version_bnb }}
|
65 |
CUDA=${{ matrix.cuda }}
|
66 |
PYTORCH_VERSION=${{ matrix.pytorch }}
|
67 |
AXOLOTL_EXTRAS=${{ matrix.axolotl_extras }}
|
|
|
14 |
strategy:
|
15 |
matrix:
|
16 |
include:
|
17 |
+
- cuda: "118"
|
18 |
cuda_version: 11.8.0
|
|
|
|
|
19 |
axolotl_extras:
|
20 |
+
- cuda: "117"
|
21 |
cuda_version: 11.7.0
|
|
|
22 |
pytorch: 1.13.1
|
23 |
axolotl_extras:
|
24 |
+
- cuda: "118"
|
25 |
cuda_version: 11.8.0
|
|
|
26 |
pytorch: 2.0.0
|
27 |
axolotl_extras: gptq
|
|
|
|
|
|
|
|
|
|
|
28 |
steps:
|
29 |
- name: Checkout
|
30 |
uses: actions/checkout@v3
|
|
|
46 |
context: .
|
47 |
file: ./docker/Dockerfile-base
|
48 |
push: ${{ github.event_name != 'pull_request' }}
|
49 |
+
tags: ${{ steps.metadata.outputs.tags }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}${{ matrix.axolotl_extras != '' && '-' || '' }}${{ matrix.axolotl_extras }}
|
50 |
labels: ${{ steps.metadata.outputs.labels }}
|
51 |
cache-from: type=gha
|
52 |
cache-to: type=gha,mode=max
|
53 |
build-args: |
|
54 |
CUDA_VERSION=${{ matrix.cuda_version }}
|
|
|
55 |
CUDA=${{ matrix.cuda }}
|
56 |
PYTORCH_VERSION=${{ matrix.pytorch }}
|
57 |
AXOLOTL_EXTRAS=${{ matrix.axolotl_extras }}
|
.github/workflows/main.yml
CHANGED
@@ -16,9 +16,15 @@ jobs:
|
|
16 |
- cuda: cu118
|
17 |
cuda_version: 11.8.0
|
18 |
pytorch: 2.0.0
|
|
|
|
|
|
|
|
|
|
|
19 |
- cuda: cu117
|
20 |
cuda_version: 11.7.0
|
21 |
pytorch: 1.13.1
|
|
|
22 |
runs-on: self-hosted
|
23 |
steps:
|
24 |
- name: Checkout
|
@@ -40,10 +46,10 @@ jobs:
|
|
40 |
with:
|
41 |
context: .
|
42 |
build-args: |
|
43 |
-
BASE_TAG=${{ github.ref_name }}-base-${{ matrix.cuda }}-${{ matrix.pytorch }}
|
44 |
file: ./docker/Dockerfile
|
45 |
push: ${{ github.event_name != 'pull_request' }}
|
46 |
-
tags: ${{ steps.metadata.outputs.tags }}-${{ matrix.cuda }}-${{ matrix.pytorch }}
|
47 |
labels: ${{ steps.metadata.outputs.labels }}
|
48 |
cache-from: type=gha
|
49 |
cache-to: type=gha,mode=max
|
@@ -57,9 +63,15 @@ jobs:
|
|
57 |
- cuda: cu118
|
58 |
cuda_version: 11.8.0
|
59 |
pytorch: 2.0.0
|
|
|
|
|
|
|
|
|
|
|
60 |
- cuda: cu117
|
61 |
cuda_version: 11.7.0
|
62 |
pytorch: 1.13.1
|
|
|
63 |
runs-on: self-hosted
|
64 |
steps:
|
65 |
- name: Checkout
|
@@ -81,10 +93,10 @@ jobs:
|
|
81 |
with:
|
82 |
context: .
|
83 |
build-args: |
|
84 |
-
BASE_TAG=${{ github.ref_name }}-${{ matrix.cuda }}-${{ matrix.pytorch }}
|
85 |
file: ./docker/Dockerfile-runpod
|
86 |
push: ${{ github.event_name != 'pull_request' }}
|
87 |
-
tags: ${{ steps.metadata.outputs.tags }}-${{ matrix.cuda }}-${{ matrix.pytorch }}
|
88 |
labels: ${{ steps.metadata.outputs.labels }}
|
89 |
cache-from: type=gha
|
90 |
cache-to: type=gha,mode=max
|
|
|
16 |
- cuda: cu118
|
17 |
cuda_version: 11.8.0
|
18 |
pytorch: 2.0.0
|
19 |
+
axolotl_extras:
|
20 |
+
- cuda: cu118
|
21 |
+
cuda_version: 11.8.0
|
22 |
+
pytorch: 2.0.0
|
23 |
+
axolotl_extras: gptq
|
24 |
- cuda: cu117
|
25 |
cuda_version: 11.7.0
|
26 |
pytorch: 1.13.1
|
27 |
+
axolotl_extras:
|
28 |
runs-on: self-hosted
|
29 |
steps:
|
30 |
- name: Checkout
|
|
|
46 |
with:
|
47 |
context: .
|
48 |
build-args: |
|
49 |
+
BASE_TAG=${{ github.ref_name }}-base-${{ matrix.cuda }}-${{ matrix.pytorch }}${{ matrix.axolotl_extras != '' && '-' || '' }}${{ matrix.axolotl_extras }}
|
50 |
file: ./docker/Dockerfile
|
51 |
push: ${{ github.event_name != 'pull_request' }}
|
52 |
+
tags: ${{ steps.metadata.outputs.tags }}-${{ matrix.cuda }}-${{ matrix.pytorch }}${{ matrix.axolotl_extras != '' && '-' || '' }}${{ matrix.axolotl_extras }}
|
53 |
labels: ${{ steps.metadata.outputs.labels }}
|
54 |
cache-from: type=gha
|
55 |
cache-to: type=gha,mode=max
|
|
|
63 |
- cuda: cu118
|
64 |
cuda_version: 11.8.0
|
65 |
pytorch: 2.0.0
|
66 |
+
axolotl_extras:
|
67 |
+
- cuda: cu118
|
68 |
+
cuda_version: 11.8.0
|
69 |
+
pytorch: 2.0.0
|
70 |
+
axolotl_extras: gptq
|
71 |
- cuda: cu117
|
72 |
cuda_version: 11.7.0
|
73 |
pytorch: 1.13.1
|
74 |
+
axolotl_extras:
|
75 |
runs-on: self-hosted
|
76 |
steps:
|
77 |
- name: Checkout
|
|
|
93 |
with:
|
94 |
context: .
|
95 |
build-args: |
|
96 |
+
BASE_TAG=${{ github.ref_name }}-${{ matrix.cuda }}-${{ matrix.pytorch }}${{ matrix.axolotl_extras != '' && '-' || '' }}${{ matrix.axolotl_extras }}
|
97 |
file: ./docker/Dockerfile-runpod
|
98 |
push: ${{ github.event_name != 'pull_request' }}
|
99 |
+
tags: ${{ steps.metadata.outputs.tags }}-${{ matrix.cuda }}-${{ matrix.pytorch }}${{ matrix.axolotl_extras != '' && '-' || '' }}${{ matrix.axolotl_extras }}
|
100 |
labels: ${{ steps.metadata.outputs.labels }}
|
101 |
cache-from: type=gha
|
102 |
cache-to: type=gha,mode=max
|
README.md
CHANGED
@@ -30,7 +30,7 @@
|
|
30 |
```bash
|
31 |
git clone https://github.com/OpenAccess-AI-Collective/axolotl
|
32 |
|
33 |
-
pip3 install -e .
|
34 |
|
35 |
accelerate config
|
36 |
|
@@ -57,9 +57,9 @@ accelerate launch scripts/finetune.py examples/lora-openllama-3b/config.yml \
|
|
57 |
1. Install python **3.9**
|
58 |
|
59 |
2. Install python dependencies with ONE of the following:
|
60 |
-
- `pip3 install -e .` (recommended, supports
|
|
|
61 |
- `pip3 install -e .[gptq_triton]`
|
62 |
-
- `pip3 install -e .[gptq]`
|
63 |
|
64 |
### Dataset
|
65 |
|
|
|
30 |
```bash
|
31 |
git clone https://github.com/OpenAccess-AI-Collective/axolotl
|
32 |
|
33 |
+
pip3 install -e .
|
34 |
|
35 |
accelerate config
|
36 |
|
|
|
57 |
1. Install python **3.9**
|
58 |
|
59 |
2. Install python dependencies with ONE of the following:
|
60 |
+
- `pip3 install -e .` (recommended, supports QLoRA, no gptq/int4 support)
|
61 |
+
- `pip3 install -e .[gptq]` (next best if you don't need QLoRA, but want to use gptq)
|
62 |
- `pip3 install -e .[gptq_triton]`
|
|
|
63 |
|
64 |
### Dataset
|
65 |
|
docker/Dockerfile
CHANGED
@@ -9,8 +9,9 @@ RUN apt-get update && \
|
|
9 |
|
10 |
WORKDIR /workspace
|
11 |
|
12 |
-
|
13 |
-
|
|
|
14 |
|
15 |
RUN mkdir axolotl
|
16 |
COPY . axolotl/
|
|
|
9 |
|
10 |
WORKDIR /workspace
|
11 |
|
12 |
+
RUN pip3 install --force-reinstall "peft @ git+https://github.com/huggingface/peft.git@main" \
|
13 |
+
"accelerate @ git+https://github.com/huggingface/accelerate.git@main" \
|
14 |
+
"transformers @ git+https://github.com/huggingface/transformers.git@main"
|
15 |
|
16 |
RUN mkdir axolotl
|
17 |
COPY . axolotl/
|
docker/Dockerfile-base
CHANGED
@@ -9,7 +9,7 @@ ENV PATH="/root/miniconda3/bin:${PATH}"
|
|
9 |
|
10 |
ARG PYTHON_VERSION="3.9"
|
11 |
ARG PYTORCH="2.0.0"
|
12 |
-
ARG CUDA="
|
13 |
|
14 |
ENV PYTHON_VERSION=$PYTHON_VERSION
|
15 |
|
@@ -29,7 +29,7 @@ ENV PATH="/root/miniconda3/envs/py${PYTHON_VERSION}/bin:${PATH}"
|
|
29 |
WORKDIR /workspace
|
30 |
|
31 |
RUN python3 -m pip install --upgrade pip && pip3 install packaging && \
|
32 |
-
python3 -m pip install --no-cache-dir -U torch==${PYTORCH} torchvision torchaudio --extra-index-url https://download.pytorch.org/whl
|
33 |
|
34 |
|
35 |
FROM base-builder AS flash-attn-builder
|
@@ -61,12 +61,12 @@ RUN git clone https://github.com/microsoft/DeepSpeed.git && \
|
|
61 |
FROM base-builder AS bnb-builder
|
62 |
|
63 |
WORKDIR /workspace
|
64 |
-
ARG
|
65 |
-
ENV
|
66 |
|
67 |
RUN git clone https://github.com/TimDettmers/bitsandbytes.git && \
|
68 |
cd bitsandbytes && \
|
69 |
-
CUDA_VERSION=$
|
70 |
python setup.py bdist_wheel
|
71 |
|
72 |
FROM base-builder
|
@@ -93,10 +93,7 @@ COPY --from=flash-attn-builder /workspace/flash-attention/csrc/layer_norm/dist/d
|
|
93 |
RUN pip3 install wheels/deepspeed-*.whl wheels/flash_attn-*.whl wheels/fused_dense_lib-*.whl wheels/xentropy_cuda_lib-*.whl wheels/rotary_emb-*.whl wheels/dropout_layer_norm-*.whl
|
94 |
RUN cd /workspace/builds/bitsandbytes && python3 setup.py install
|
95 |
RUN git lfs install --skip-repo
|
96 |
-
RUN pip3 install
|
97 |
-
"accelerate @ git+https://github.com/huggingface/accelerate.git@main" \
|
98 |
-
"transformers @ git+https://github.com/huggingface/transformers.git@main" && \
|
99 |
-
pip3 install awscli && \
|
100 |
# The base image ships with `pydantic==1.8.2` which is not working
|
101 |
pip3 install -U --no-cache-dir pydantic
|
102 |
|
|
|
9 |
|
10 |
ARG PYTHON_VERSION="3.9"
|
11 |
ARG PYTORCH="2.0.0"
|
12 |
+
ARG CUDA="118"
|
13 |
|
14 |
ENV PYTHON_VERSION=$PYTHON_VERSION
|
15 |
|
|
|
29 |
WORKDIR /workspace
|
30 |
|
31 |
RUN python3 -m pip install --upgrade pip && pip3 install packaging && \
|
32 |
+
python3 -m pip install --no-cache-dir -U torch==${PYTORCH} torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu$CUDA
|
33 |
|
34 |
|
35 |
FROM base-builder AS flash-attn-builder
|
|
|
61 |
FROM base-builder AS bnb-builder
|
62 |
|
63 |
WORKDIR /workspace
|
64 |
+
ARG CUDA="118"
|
65 |
+
ENV CUDA=$CUDA
|
66 |
|
67 |
RUN git clone https://github.com/TimDettmers/bitsandbytes.git && \
|
68 |
cd bitsandbytes && \
|
69 |
+
CUDA_VERSION=$CUDA make cuda11x && \
|
70 |
python setup.py bdist_wheel
|
71 |
|
72 |
FROM base-builder
|
|
|
93 |
RUN pip3 install wheels/deepspeed-*.whl wheels/flash_attn-*.whl wheels/fused_dense_lib-*.whl wheels/xentropy_cuda_lib-*.whl wheels/rotary_emb-*.whl wheels/dropout_layer_norm-*.whl
|
94 |
RUN cd /workspace/builds/bitsandbytes && python3 setup.py install
|
95 |
RUN git lfs install --skip-repo
|
96 |
+
RUN pip3 install awscli && \
|
|
|
|
|
|
|
97 |
# The base image ships with `pydantic==1.8.2` which is not working
|
98 |
pip3 install -U --no-cache-dir pydantic
|
99 |
|