[build-system] requires = ["setuptools>=64", "wheel", "setuptools_scm>=8"] build-backend = "setuptools.build_meta" [project] name = "axolotl" dynamic = ["version"] description = "LLM Trainer" readme = "README.md" requires-python = ">=3.12" # license = "Apache-2.0" dependencies = [ # Core ML stack "torch>=2.13.0,<2.15.0", "packaging==26.0", "huggingface_hub>=1.31.0", "peft==0.21.2", "tokenizers==0.23.3", "transformers==5.20.1", "accelerate==1.15.0", "datasets==5.0.1", "trl==1.14.1", "hf_xet>=1.5.2", "kernels>=0.17.2,<0.18.0", "trackio==0.40.0", "typing-extensions==4.15.0", "optimum==1.16.2", "hf_transfer", "sentencepiece", "gradio==6.29.1", "pydantic==2.13.5", "addict", "fire", "PyYAML==6.0.3", "requests", "certifi>=2026.10.19", "wandb", "einops", "colorama", "numba>=0.63.1,<1.0", "numpy>=2.1,<3.0", "typer==0.25.1", # Evaluation & metrics "evaluate==0.4.1", "scipy", "nvidia-ml-py==12.560.30", "art", "tensorboard", "python-dotenv==1.0.1", # Remote filesystems "s3fs==2025.10.0", "gcsfs==2025.10.0", "adlfs==2026.2.0", "ocifs==1.3.2", "zstandard==0.22.0", "fastcore", # lm eval harness "lm_eval==0.4.11", "langdetect==1.0.9", "immutabledict==4.2.0", "antlr4-python3-runtime==4.13.2", "schedulefree==1.4.1", "openenv-core>=0.1.0", # Axolotl contribs "axolotl-contribs-lgpl==0.0.7", "axolotl-contribs-mit==0.0.6", # Telemetry "posthog==6.7.11", "mistral-common==1.12.0", # Platform-specific (Linux only) "bitsandbytes==0.50.2 ; sys_platform != 'darwin'", "triton>=3.4.0 ; sys_platform != 'darwin'", "xformers>=0.0.33.post2 ; sys_platform != 'darwin' and platform_machine != 'aarch64'", "liger-kernel==0.8.5 ; sys_platform != 'darwin'", "torchao==0.18.0 ; sys_platform != 'darwin' and platform_machine != 'aarch64'", # Architecture-specific "fla-core==0.5.2 ; platform_machine != 'aarch64'", "flash-linear-attention==0.5.2 ; platform_machine != 'aarch64'", ] [project.optional-dependencies] fla = ["flash-linear-attention[tilelang]==0.5.2", "tilelang==0.1.14"] blackwell = [ "flash-attn-4[cu13]==4.0.0b35 ; sys_platform == 'linux'", "quack-kernels[cu13]==0.6.5 ; sys_platform == 'linux'", ] modal = ["modal==1.3.0.post1"] baseten = ["truss==0.18.30"] coreweave = ["boto3>=1.35"] ringmaster = [ "axolotl-ringmaster>=0.2.7", ] deepspeed = [ "deepspeed>=0.18.6,<0.20.0", "deepspeed-kernels", ] mamba-ssm = [ "mamba-ssm==1.2.0.post1", "causal_conv1d", ] auto-gptq = [ "auto-gptq==0.5.1", ] mlflow = [ "mlflow", ] galore = [ "galore_torch", ] apollo = [ "apollo-torch", ] optimizers = [ "galore_torch", "apollo-torch", "lomo-optim==0.1.1", "torch-optimi==0.2.1", "came_pytorch==0.1.3", "scao==0.2.2", "q-galore-torch==1.0", ] ray = [ "ray[train]>=2.59.0", ] vllm = [ "vllm>=0.30.0", ] llmcompressor = [ "llmcompressor>=0.10.0", ] fbgemm-gpu = ["fbgemm-gpu-genai>=1.3.0"] opentelemetry = [ "opentelemetry-api", "opentelemetry-sdk", "opentelemetry-exporter-prometheus", "prometheus-client", ] kernels-curated = ["kernels[curated]"] [dependency-groups] dev = [ "black", "mypy", "pre-commit", "types-requests", "quartodoc", "jupyter", "blobfile", "tiktoken", ] test = [ "codecov", "codecov-cli", "pytest", "pytest-cov", "pytest-retry", "pytest-sugar", "pytest-xdist", "tbparse", ] [project.scripts] axolotl = "axolotl.cli.main:main" [project.entry-points."axolotl.cloud_providers"] coreweave = "axolotl.integrations.coreweave.cloud:CoreWeaveCloud" nebius = "axolotl.integrations.nebius.cloud:NebiusCloud" modal = "axolotl.integrations.modal.cloud:ModalCloud" baseten = "axolotl.integrations.baseten.cloud:BasetenCloud" [project.entry-points."axolotl.plugins"] context-parallel = "axolotl.integrations.context_parallel:ContextParallelPlugin" expert-parallel = "axolotl.integrations.expert_parallel:ExpertParallelPlugin" [project.urls] Homepage = "https://axolotl.ai/" Documentation = "https://docs.axolotl.ai/" Repository = "https://github.com/axolotl-ai-cloud/axolotl.git" [tool.setuptools] include-package-data = true [tool.setuptools.package-data] axolotl = [ "**/*.yaml", "**/*.jinja", "core/trainers/prm/LICENSE", "core/trainers/prm/NOTICE", "integrations/kernels/libs/scattermoe_lora/metadata.json", "integrations/diffusion_decision/vendored/DJEV_LICENSE", ] "axolotl.integrations.baseten" = ["template/*.sh", "template/*.py"] [tool.setuptools.packages.find] where = ["src"] [tool.setuptools.dynamic] version = { file = "VERSION" } [tool.ruff] line-length = 88 target-version = "py312" extend-exclude = ["src/axolotl/core/trainers/prm"] force-exclude = true [tool.ruff.lint] select = ["E", "F", "W", "C90", "B", "I"] ignore = [ "E203", # Whitespace before ':' "E501", # Line too long "C901", # Too complex "B019", # Use of functools.cache on methods "E722", # Bare except "F821", # Undefined name (for dynamic exec) "E731", # Lambda assignment (idiomatic for the kernel recipe/heuristic closures) "E741", # Ambiguous variable name (single-letter math/kernel vars: I, O, l) ] [tool.ruff.lint.isort] known-third-party = ["wandb", "comet_ml"] known-local-folder = ["src", "tests"] # Black-compatible isort settings force-single-line = false combine-as-imports = true split-on-trailing-comma = true [tool.ruff.format] # Use black's formatting style exactly quote-style = "double" indent-style = "space" skip-magic-trailing-comma = false line-ending = "auto" docstring-code-format = false # Distributions whose effect is bounded by the modules importing them, mapped to their # import roots. cicd/select_e2e_tests.py narrows a version bump of a listed distribution # to the e2e tests reachable from those importers; an unlisted one runs every e2e test. # List a distribution only when every behaviour it changes sits behind a static import. [tool.axolotl.ci.deps] "axolotl-ringmaster" = ["ringmaster"] "flash-linear-attention" = ["fla"] "fla-core" = ["fla"] "tilelang" = ["tilelang"] "liger-kernel" = ["liger_kernel"] "xformers" = ["xformers"] "torch-optimi" = ["optimi"] "came_pytorch" = ["came_pytorch"] "scao" = ["scao"] "q-galore-torch" = ["q_galore_torch"] "llmcompressor" = ["llmcompressor"] "vllm" = ["vllm"] "ray" = ["ray"] "mlflow" = ["mlflow"] "wandb" = ["wandb"] "trackio" = ["trackio"] "mistral-common" = ["mistral_common"] [tool.pytest.ini_options] addopts = "-m 'not slow'" norecursedirs = [ ".claude", ".git", ".mypy_cache", ".nox", ".pytest_cache", ".ruff_cache", ".scratch_fp4", ".tox", ".venv", "build", "dist", "outputs", "unsloth_compiled_cache", ] markers = [ "slow: marks tests as slow", "nf4_distributed: CPU multi-process NF4 loading, sharding, and resume tests", "distributed_cpu: CPU multi-process (gloo) tests unrelated to NF4 loading", "perf: marks tests as performance/memory regression guards (Blackwell only, large E)", "integration: marks tests as integration tests (real model modeling paths)", "gpu: tests that require a CUDA device; auto-applied from CUDA skipif reasons and to gpu_blackwell tests (see tests/conftest.py)", "gpu_blackwell: single-GPU tests that cannot run on the L40S lanes (SM100+/Blackwell); auto-applied from Blackwell-only skipif reasons, run only by cicd/cicd_blackwell.sh on B200", "nvfp4: NVFP4 multi-GPU tests that need SM100+ GPUs; run by cicd/nvfp4.sh", ] # UV specific configuration [tool.uv] conflicts = [ [ { package = "axolotl" }, { extra = "vllm" }, ], [ { package = "axolotl" }, { extra = "mamba-ssm" }, ], [ { package = "axolotl" }, { extra = "auto-gptq" }, ], [ { package = "axolotl" }, { extra = "fbgemm-gpu" }, ], [ { package = "axolotl" }, { extra = "llmcompressor" }, ], ] [tool.uv.extra-build-dependencies] mamba-ssm = [{ requirement = "torch", match-runtime = true }] causal-conv1d = [{ requirement = "torch", match-runtime = true }] deepspeed = [{ requirement = "torch", match-runtime = true }] auto-gptq = [{ requirement = "torch", match-runtime = true }]