Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
8e9386c
go uv first
djsaunde Aug 21, 2025
9462a1b
wip
djsaunde Aug 29, 2025
3b0d2ac
rebase
djsaunde Aug 29, 2025
332ee74
rebase
djsaunde Aug 29, 2025
255b818
rebase
djsaunde Aug 29, 2025
aee03fc
wip
djsaunde Aug 30, 2025
2f4e4ef
wip
djsaunde Aug 30, 2025
36c4ab1
wip
djsaunde Aug 30, 2025
43f6f84
wip
djsaunde Aug 30, 2025
459e5f9
lint
djsaunde Aug 30, 2025
400120a
wip
djsaunde Aug 30, 2025
e888e38
fix
djsaunde Aug 30, 2025
367f7eb
fix
djsaunde Aug 30, 2025
b453562
fixes
djsaunde Aug 30, 2025
9ec33f5
wip
djsaunde Aug 30, 2025
f500aaa
fix
djsaunde Aug 30, 2025
df870f6
fix
djsaunde Aug 30, 2025
89d5323
fix
djsaunde Aug 30, 2025
40d906f
lint
djsaunde Aug 30, 2025
3b91e81
fix
djsaunde Aug 30, 2025
02f3083
fix
djsaunde Aug 30, 2025
98f230d
cleanup
djsaunde Aug 30, 2025
1334281
docker fix
djsaunde Aug 30, 2025
d1fd505
update
djsaunde Aug 30, 2025
95c259b
depr warning
djsaunde Aug 30, 2025
c110e3e
remove setup.py, requirements.txt and refs
djsaunde Aug 30, 2025
0d60046
Update .github/workflows/pypi.yml
djsaunde Sep 10, 2025
cd8c769
Update cicd/Dockerfile.jinja
djsaunde Sep 10, 2025
4c81172
coderabbito
djsaunde Sep 10, 2025
37d07bd
coderabbito, improvements
djsaunde Sep 11, 2025
f0fee9c
req
djsaunde Sep 11, 2025
47ad92c
fix
djsaunde Sep 11, 2025
ef150fd
updates
djsaunde Sep 15, 2025
0437c1a
auto-gptq -> gptqmodel
djsaunde Sep 15, 2025
2acd3e1
dep
djsaunde Sep 15, 2025
02dc263
updates
djsaunde Sep 16, 2025
a456547
find-links for wheels, auto-gptq -> gptqmodel
djsaunde Sep 16, 2025
8d542d9
deps up to date
djsaunde Sep 26, 2025
1fa0a98
update lock
djsaunde Sep 26, 2025
64da8f0
depr warning
djsaunde Sep 26, 2025
9bbe2cf
handle vllm pinned conflict
djsaunde Sep 26, 2025
273a03f
simplify install script
djsaunde Sep 26, 2025
8281313
no -y flag for uv pip install
djsaunde Sep 26, 2025
b4c6675
fix
djsaunde Sep 26, 2025
2e082d4
constrain torch version
djsaunde Sep 26, 2025
6cbca1f
loosen xformers range
djsaunde Sep 26, 2025
da5ede6
lockfile
djsaunde Sep 26, 2025
18d9456
loosen xformers range
djsaunde Sep 26, 2025
ad56e60
remove 2.7.0 images
djsaunde Sep 26, 2025
ddafc6e
referring to temp docker images
djsaunde Sep 26, 2025
dfa5224
uv.lock
djsaunde Sep 26, 2025
cec2490
prune 2.7.0, docker cache invalidation
djsaunde Sep 26, 2025
26a58bb
git SHA
djsaunde Sep 26, 2025
dfaf766
pip install --system flag
djsaunde Sep 26, 2025
c702eda
use container venv
djsaunde Sep 27, 2025
9344fa5
fix install scripts (?)
djsaunde Sep 27, 2025
0d53e0f
fix -E -> --extra
djsaunde Sep 27, 2025
15d35b7
fixes
djsaunde Sep 27, 2025
66a9e4f
fix?
djsaunde Sep 27, 2025
4966496
revert
djsaunde Sep 27, 2025
64fea39
add back protobuf
djsaunde Sep 28, 2025
4131bcf
fix?
djsaunde Sep 29, 2025
f137ce5
grpclib
djsaunde Sep 29, 2025
b436ecf
fix
djsaunde Sep 29, 2025
69df309
separate out flash-attn install (sadly)
djsaunde Sep 30, 2025
cf4e3fa
version fix
djsaunde Sep 30, 2025
ec75aa5
fix
djsaunde Sep 30, 2025
19de29b
fix
djsaunde Sep 30, 2025
04533b7
fix
djsaunde Sep 30, 2025
022ef7a
fix
djsaunde Sep 30, 2025
f0f3bfb
fix
djsaunde Sep 30, 2025
7471512
fix
djsaunde Sep 30, 2025
6dc9816
fix
djsaunde Oct 1, 2025
013474e
mirror dev deps
djsaunde Oct 1, 2025
f2f66f2
fix
djsaunde Oct 1, 2025
f782957
fix
djsaunde Oct 1, 2025
00e0238
fix?
djsaunde Oct 1, 2025
ccd2f12
fix?
djsaunde Oct 1, 2025
274c579
handle race cond
djsaunde Oct 1, 2025
0250e5f
fix
djsaunde Oct 1, 2025
f912d1b
fix
djsaunde Oct 2, 2025
5771a65
fix
djsaunde Oct 2, 2025
9873086
fix
djsaunde Oct 2, 2025
19fe84e
Fix
djsaunde Oct 2, 2025
26418e6
Fix
djsaunde Oct 2, 2025
786f1a3
add missing dep
djsaunde Oct 3, 2025
923181a
Merge branch 'main' into uv-first
djsaunde Oct 4, 2025
18d78f0
fix sdist
djsaunde Oct 4, 2025
5753c5b
mypy 3.11
djsaunde Oct 4, 2025
1e58235
contrib
djsaunde Oct 4, 2025
915c258
contrib fix
djsaunde Oct 4, 2025
ffb307a
update tags
djsaunde Oct 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
source = axolotl
omit =
*/tests/*
setup.py

[report]
exclude_lines =
Expand Down
15 changes: 10 additions & 5 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,18 @@ PRs are **greatly welcome**!
2. Set up the development environment by following the instructions in the [README.md](https://github.com/axolotl-ai-cloud/axolotl/tree/main/README.md) file.
3. Explore the codebase, run tests, and verify that everything works as expected.

Please run below to setup env
Please run the below to setup:

```bash
pip3 install -r requirements-dev.txt -r requirements-tests.txt
pre-commit install
git clone https://github.com/axolotl-ai-cloud/axolotl.git
cd axolotl

uv sync --dev && uv pip install flash-attn --no-build-isolation
source .venv/bin/activate

pre-commit install # install pre-commit hooks

# test
pytest tests/
pytest tests/ # optional; run test suite
```

## How to Contribute
Expand Down
11 changes: 3 additions & 8 deletions .github/workflows/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,6 @@ jobs:
pytorch: 2.6.0
torch_cuda_arch_list: "7.0 7.5 8.0 8.6 8.7 8.9 9.0+PTX"
dockerfile: "Dockerfile-base"
- cuda: "126"
cuda_version: 12.6.3
cudnn_version: ""
python_version: "3.11"
pytorch: 2.7.0
torch_cuda_arch_list: "7.0 7.5 8.0 8.6 8.7 8.9 9.0+PTX"
dockerfile: "Dockerfile-base"
- cuda: "126"
cuda_version: 12.6.3
cudnn_version: ""
Expand Down Expand Up @@ -105,7 +98,9 @@ jobs:
context: .
file: ./docker/${{ matrix.dockerfile }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.metadata.outputs.tags }}-base-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}${{ matrix.axolotl_extras != '' && '-' || '' }}${{ matrix.axolotl_extras }}
tags: |
${{ steps.metadata.outputs.tags }}-base-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}${{ matrix.axolotl_extras != '' && '-' || '' }}${{ matrix.axolotl_extras }}
${{ steps.metadata.outputs.tags }}-base-uv-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}${{ matrix.axolotl_extras != '' && '-' || '' }}${{ matrix.axolotl_extras }}
labels: ${{ steps.metadata.outputs.labels }}
build-args: |
CUDA_VERSION=${{ matrix.cuda_version }}
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,14 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"
- name: Install dependencies
run: |
python3 -m pip install jupyter quartodoc
python3 -m pip install -e .
uv pip install --system jupyter quartodoc
uv pip install --system -e .
- name: Build autodoc
run: quartodoc build
- name: Publish to GitHub Pages (and render)
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- '**.py'
- 'requirements.txt'
- 'pyproject.toml'
- '.github/workflows/*.yml'
- "*.[q]md"
- "examples/**/*.y[a]?ml"
Expand All @@ -23,5 +23,4 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: 'pip' # caching pip dependencies
- uses: pre-commit/[email protected]
16 changes: 6 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ jobs:
python_version: "3.11"
pytorch: 2.6.0
axolotl_extras:
- cuda: 126
cuda_version: 12.6.3
python_version: "3.11"
pytorch: 2.7.0
axolotl_extras:
- cuda: 126
cuda_version: 12.6.3
python_version: "3.11"
Expand Down Expand Up @@ -73,6 +68,8 @@ jobs:
PYTORCH_VERSION=${{ matrix.pytorch }}
AXOLOTL_ARGS=${{ matrix.axolotl_args }}
AXOLOTL_EXTRAS=${{ matrix.axolotl_extras}}
GIT_REF=${{ github.ref }}
GIT_SHA=${{ github.sha }}
file: ./docker/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: |
Expand All @@ -93,11 +90,6 @@ jobs:
python_version: "3.11"
pytorch: 2.6.0
axolotl_extras:
- cuda: 126
cuda_version: 12.6.3
python_version: "3.11"
pytorch: 2.7.0
axolotl_extras:
- cuda: 126
cuda_version: 12.6.3
python_version: "3.11"
Expand Down Expand Up @@ -148,6 +140,8 @@ jobs:
build-args: |
BASE_TAG=${{ github.ref_type == 'tag' && 'main' || github.ref_name }}-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}${{ matrix.axolotl_extras != '' && '-' || '' }}${{ matrix.axolotl_extras }}
CUDA=${{ matrix.cuda }}
GIT_REF=${{ github.ref }}
GIT_SHA=${{ github.sha }}
file: ./docker/Dockerfile-cloud
push: ${{ github.event_name != 'pull_request' }}
tags: |
Expand Down Expand Up @@ -213,6 +207,8 @@ jobs:
build-args: |
BASE_TAG=${{ github.ref_type == 'tag' && 'main' || github.ref_name }}-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}${{ matrix.axolotl_extras != '' && '-' || '' }}${{ matrix.axolotl_extras }}
CUDA=${{ matrix.cuda }}
GIT_REF=${{ github.ref }}
GIT_SHA=${{ github.sha }}
file: ./docker/Dockerfile-cloud-no-tmux
push: ${{ github.event_name != 'pull_request' }}
tags: |
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/multi-gpu-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
pull_request:
paths:
- 'tests/e2e/multigpu/**.py'
- 'requirements.txt'
- 'setup.py'
- 'pyproject.toml'
- '.github/workflows/multi-gpu-e2e.yml'
- 'src/axolotl/core/trainers/mixins/sequence_parallel.py'
Expand Down Expand Up @@ -56,13 +54,17 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"
- name: Install Modal
run: |
python -m pip install --upgrade pip
pip install modal==1.0.2 jinja2
pip install modal==1.0.2 jinja2 protobuf
- name: Update env vars
run: |
echo "BASE_TAG=main-base-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}" >> $GITHUB_ENV
echo "BASE_TAG=${{ github.ref_name }}-base-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}" >> $GITHUB_ENV
echo "PYTORCH_VERSION=${{ matrix.pytorch}}" >> $GITHUB_ENV
echo "AXOLOTL_ARGS=${{ matrix.axolotl_args}}" >> $GITHUB_ENV
echo "AXOLOTL_EXTRAS=${{ matrix.axolotl_extras}}" >> $GITHUB_ENV
Expand All @@ -72,4 +74,4 @@ jobs:
echo "CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }}" >> $GITHUB_ENV
- name: Run tests job on Modal
run: |
modal run cicd.multigpu
modal run -m cicd.multigpu
4 changes: 4 additions & 0 deletions .github/workflows/nightlies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ jobs:
CUDA=${{ matrix.cuda }}
PYTORCH_VERSION=${{ matrix.pytorch }}
AXOLOTL_ARGS=${{ matrix.axolotl_args }}
GIT_REF=${{ github.ref }}
GIT_SHA=${{ github.sha }}
file: ./docker/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: |
Expand Down Expand Up @@ -102,6 +104,8 @@ jobs:
build-args: |
BASE_TAG=${{ github.ref_name }}-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}${{ matrix.axolotl_extras != '' && '-' || '' }}${{ matrix.axolotl_extras }}
CUDA=${{ matrix.cuda }}
GIT_REF=${{ github.ref }}
GIT_SHA=${{ github.sha }}
file: ./docker/Dockerfile-cloud
push: ${{ github.event_name != 'pull_request' }}
tags: |
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/precommit-autoupdate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,15 @@ jobs:
with:
python-version: '3.11'

- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"

- name: Update pre-commit hooks
id: update
run: |
pip install pre-commit
uv pip install --system pre-commit
pre-commit autoupdate
if [[ -n $(git status --porcelain) ]]; then
echo "changes=true" >> $GITHUB_OUTPUT
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/preview-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,15 @@ jobs:
with:
python-version: '3.11'

- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"

- name: Install dependencies
run: |
python3 -m pip install jupyter quartodoc
python3 -m pip install -e .
uv pip install --system jupyter quartodoc
uv pip install --system -e .

- name: Build autodoc
run: quartodoc build
Expand Down
21 changes: 11 additions & 10 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,24 @@ jobs:
with:
python-version: "3.11"

- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"

- name: Install dependencies
run: |
pip3 install wheel packaging==23.2
pip3 install --no-build-isolation -e .
pip3 install -r requirements-dev.txt -r requirements-tests.txt
uv pip install --system wheel packaging==23.2
uv pip install --system --no-build-isolation -e ".[dev]"

- name: Extract tag name
id: tag
run: echo ::set-output name=TAG_NAME::$(echo $GITHUB_REF | cut -d / -f 3)

- name: Update version in setup.py
run: |
sed -i -E 's/version="([0-9.]+)",/version="${{ steps.tag.outputs.TAG_NAME }}",/g' setup.py
run: echo "TAG_NAME=$(echo "$GITHUB_REF" | cut -d / -f 3)" >> "$GITHUB_OUTPUT"

- name: Build a source dist
- name: Build package
run: |
python setup.py sdist
uv pip install --system build
python -m build

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
52 changes: 26 additions & 26 deletions .github/workflows/tests-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: 'pip' # caching pip dependencies
- uses: pre-commit/[email protected]
env:
SKIP: no-commit-to-branch
Expand Down Expand Up @@ -43,32 +42,30 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}
cache: 'pip' # caching pip dependencies

- name: upgrade pip
run: |
pip3 install --upgrade pip
pip3 install --upgrade packaging==23.2 setuptools==75.8.0 wheel
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"

- name: Install PyTorch
run: |
pip3 install torch==${{ matrix.pytorch_version }} torchvision
uv pip install --system torch==${{ matrix.pytorch_version }} torchvision

- name: Update requirements.txt
- name: Update pyproject.toml for nightly builds
run: |
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
sed -i 's#^datasets.*#datasets @ git+https://github.com/huggingface/datasets.git@main#' requirements.txt
sed -i 's#"transformers==.*"#"transformers @ git+https://github.com/huggingface/transformers.git@main"#' pyproject.toml
sed -i 's#"peft==.*"#"peft @ git+https://github.com/huggingface/peft.git@main"#' pyproject.toml
sed -i 's#"accelerate==.*"#"accelerate @ git+https://github.com/huggingface/accelerate.git@main"#' pyproject.toml
sed -i 's#"trl==.*"#"trl @ git+https://github.com/huggingface/trl.git@main"#' pyproject.toml
sed -i 's#"datasets==.*"#"datasets @ git+https://github.com/huggingface/datasets.git@main"#' pyproject.toml

- name: Install dependencies
run: |
pip3 show torch
pip3 install --no-build-isolation -U -e .
uv pip show --system torch
uv pip install --system --no-build-isolation -e ".[dev]"
python scripts/unsloth_install.py | sh
python scripts/cutcrossentropy_install.py | sh
pip3 install -r requirements-dev.txt -r requirements-tests.txt

- name: Make sure PyTorch version wasn't clobbered
run: |
Expand All @@ -84,9 +81,6 @@ jobs:
pytest -v --durations=10 tests/patched/
pytest -v --durations=10 tests/cli/

- name: cleanup pip cache
run: |
find "$(pip cache dir)/http-v2" -type f -mtime +14 -exec rm {} \;

docker-e2e-tests:
if: github.repository_owner == 'axolotl-ai-cloud'
Expand Down Expand Up @@ -120,13 +114,16 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"
- name: Install Modal
run: |
python -m pip install --upgrade pip
pip install modal==1.0.2 jinja2
uv pip install --system modal==1.0.2 jinja2
- name: Update env vars
run: |
echo "BASE_TAG=main-base-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}" >> $GITHUB_ENV
echo "BASE_TAG=main-base-uv-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}" >> $GITHUB_ENV
echo "PYTORCH_VERSION=${{ matrix.pytorch}}" >> $GITHUB_ENV
echo "AXOLOTL_ARGS=${{ matrix.axolotl_args}}" >> $GITHUB_ENV
echo "AXOLOTL_EXTRAS=${{ matrix.axolotl_extras}}" >> $GITHUB_ENV
Expand All @@ -136,7 +133,7 @@ jobs:
echo "CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }}" >> $GITHUB_ENV
- name: Run tests job on Modal
run: |
modal run cicd.e2e_tests
modal run -m cicd.e2e_tests
docker-e2e-multigpu-tests:
if: github.repository_owner == 'axolotl-ai-cloud'
# this job needs to be run on self-hosted GPU runners...
Expand All @@ -162,13 +159,16 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"
- name: Install Modal
run: |
python -m pip install --upgrade pip
pip install modal==1.0.2 jinja2
uv pip install --system modal==1.0.2 jinja2
- name: Update env vars
run: |
echo "BASE_TAG=main-base-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}" >> $GITHUB_ENV
echo "BASE_TAG=main-base-uv-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}" >> $GITHUB_ENV
echo "PYTORCH_VERSION=${{ matrix.pytorch}}" >> $GITHUB_ENV
echo "AXOLOTL_ARGS=${{ matrix.axolotl_args}}" >> $GITHUB_ENV
echo "AXOLOTL_EXTRAS=${{ matrix.axolotl_extras}}" >> $GITHUB_ENV
Expand Down
Loading
Loading