rebase
This commit is contained in:
@@ -1,8 +0,0 @@
|
|||||||
black
|
|
||||||
mypy
|
|
||||||
pre-commit
|
|
||||||
types-requests
|
|
||||||
quartodoc
|
|
||||||
jupyter
|
|
||||||
blobfile
|
|
||||||
tiktoken
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
codecov
|
|
||||||
codecov-cli
|
|
||||||
pytest
|
|
||||||
pytest-cov
|
|
||||||
pytest-retry
|
|
||||||
pytest-sugar
|
|
||||||
pytest-xdist
|
|
||||||
tbparse
|
|
||||||
@@ -1,85 +0,0 @@
|
|||||||
# This file is kept for backward compatibility
|
|
||||||
# All dependencies are now defined in pyproject.toml
|
|
||||||
# To install axolotl with all dependencies, run:
|
|
||||||
# pip install .
|
|
||||||
# To install with extras (e.g., flash-attn):
|
|
||||||
# pip install .[flash-attn]
|
|
||||||
# To install for development:
|
|
||||||
# pip install -e .[dev]
|
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
# START section of dependencies that don't install on Darwin/MacOS
|
|
||||||
bitsandbytes==0.47.0
|
|
||||||
triton>=3.0.0
|
|
||||||
mamba-ssm==1.2.0.post1
|
|
||||||
xformers>=0.0.23.post1
|
|
||||||
autoawq==0.2.7.post3
|
|
||||||
liger-kernel==0.6.1
|
|
||||||
# END section
|
|
||||||
|
|
||||||
packaging==23.2
|
|
||||||
|
|
||||||
huggingface_hub>=0.33.0
|
|
||||||
peft>=0.17.0
|
|
||||||
transformers==4.56.1
|
|
||||||
tokenizers>=0.21.1
|
|
||||||
accelerate==1.10.1
|
|
||||||
datasets==4.0.0
|
|
||||||
deepspeed>=0.17.0
|
|
||||||
trl==0.23.0
|
|
||||||
hf_xet==1.1.5
|
|
||||||
kernels==0.9.0
|
|
||||||
trackio
|
|
||||||
|
|
||||||
optimum==1.16.2
|
|
||||||
hf_transfer
|
|
||||||
sentencepiece
|
|
||||||
gradio==5.41.1
|
|
||||||
|
|
||||||
modal==1.0.2
|
|
||||||
pydantic==2.10.6
|
|
||||||
addict
|
|
||||||
fire
|
|
||||||
PyYAML>=6.0
|
|
||||||
requests
|
|
||||||
wandb
|
|
||||||
einops
|
|
||||||
colorama
|
|
||||||
numba
|
|
||||||
numpy>=1.24.4,<=2.0.1
|
|
||||||
|
|
||||||
# qlora things
|
|
||||||
evaluate==0.4.1
|
|
||||||
scipy
|
|
||||||
scikit-learn==1.4.2
|
|
||||||
nvidia-ml-py==12.560.30
|
|
||||||
art
|
|
||||||
tensorboard
|
|
||||||
python-dotenv==1.0.1
|
|
||||||
|
|
||||||
# remote filesystems
|
|
||||||
s3fs>=2024.5.0
|
|
||||||
gcsfs>=2024.5.0
|
|
||||||
adlfs>=2024.5.0
|
|
||||||
ocifs==1.3.2
|
|
||||||
|
|
||||||
zstandard==0.22.0
|
|
||||||
fastcore
|
|
||||||
|
|
||||||
# lm eval harness
|
|
||||||
lm_eval==0.4.7
|
|
||||||
langdetect==1.0.9
|
|
||||||
immutabledict==4.2.0
|
|
||||||
antlr4-python3-runtime==4.13.2
|
|
||||||
|
|
||||||
torchao==0.13.0
|
|
||||||
schedulefree==1.4.1
|
|
||||||
|
|
||||||
axolotl-contribs-lgpl==0.0.6
|
|
||||||
axolotl-contribs-mit==0.0.5
|
|
||||||
|
|
||||||
mistral-common==1.8.5
|
|
||||||
|
|
||||||
# For UV users:
|
|
||||||
# uv pip install .
|
|
||||||
# uv pip install -e .[dev]
|
|
||||||
188
setup.py
188
setup.py
@@ -1,188 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
"""
|
|
||||||
Minimal setup.py for backward compatibility.
|
|
||||||
All configuration is now in pyproject.toml.
|
|
||||||
"""
|
|
||||||
|
|
||||||
from setuptools import setup
|
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
<<<<<<< HEAD
|
|
||||||
from setuptools import find_packages, setup
|
|
||||||
|
|
||||||
|
|
||||||
def parse_requirements(extras_require_map):
|
|
||||||
_install_requires = []
|
|
||||||
_dependency_links = []
|
|
||||||
with open("./requirements.txt", encoding="utf-8") as requirements_file:
|
|
||||||
lines = [r.strip() for r in requirements_file.readlines()]
|
|
||||||
for line in lines:
|
|
||||||
is_extras = "deepspeed" in line or "mamba-ssm" in line
|
|
||||||
if line.startswith("--extra-index-url"):
|
|
||||||
# Handle custom index URLs
|
|
||||||
_, url = line.split()
|
|
||||||
_dependency_links.append(url)
|
|
||||||
elif not is_extras and line and line[0] != "#":
|
|
||||||
# Handle standard packages
|
|
||||||
_install_requires.append(line)
|
|
||||||
try:
|
|
||||||
xformers_version = [req for req in _install_requires if "xformers" in req][0]
|
|
||||||
autoawq_version = [req for req in _install_requires if "autoawq" in req][0]
|
|
||||||
if "Darwin" in platform.system():
|
|
||||||
# skip packages not compatible with OSX
|
|
||||||
skip_packages = [
|
|
||||||
"bitsandbytes",
|
|
||||||
"triton",
|
|
||||||
"mamba-ssm",
|
|
||||||
"xformers",
|
|
||||||
"autoawq",
|
|
||||||
"liger-kernel",
|
|
||||||
]
|
|
||||||
_install_requires = [
|
|
||||||
req
|
|
||||||
for req in _install_requires
|
|
||||||
if re.split(r"[>=<]", req)[0].strip() not in skip_packages
|
|
||||||
]
|
|
||||||
print(
|
|
||||||
_install_requires, [req in skip_packages for req in _install_requires]
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
# detect the version of torch already installed
|
|
||||||
# and set it so dependencies don't clobber the torch version
|
|
||||||
try:
|
|
||||||
torch_version = version("torch")
|
|
||||||
except PackageNotFoundError:
|
|
||||||
torch_version = "2.6.0" # default to torch 2.6
|
|
||||||
_install_requires.append(f"torch=={torch_version}")
|
|
||||||
|
|
||||||
version_match = re.match(r"^(\d+)\.(\d+)(?:\.(\d+))?", torch_version)
|
|
||||||
if version_match:
|
|
||||||
major, minor, patch = version_match.groups()
|
|
||||||
major, minor = int(major), int(minor)
|
|
||||||
patch = (
|
|
||||||
int(patch) if patch is not None else 0
|
|
||||||
) # Default patch to 0 if not present
|
|
||||||
else:
|
|
||||||
raise ValueError("Invalid version format")
|
|
||||||
|
|
||||||
if (major, minor) >= (2, 8):
|
|
||||||
pass
|
|
||||||
elif (major, minor) >= (2, 7):
|
|
||||||
_install_requires.pop(_install_requires.index(xformers_version))
|
|
||||||
if patch == 0:
|
|
||||||
_install_requires.append("xformers==0.0.30")
|
|
||||||
# vllm 0.9.x is incompatible with latest transformers
|
|
||||||
extras_require_map.pop("vllm")
|
|
||||||
else:
|
|
||||||
_install_requires.append("xformers==0.0.31")
|
|
||||||
extras_require_map["vllm"] = ["vllm>=0.10.0"]
|
|
||||||
elif (major, minor) >= (2, 6):
|
|
||||||
_install_requires.pop(_install_requires.index(xformers_version))
|
|
||||||
_install_requires.append("xformers==0.0.29.post3")
|
|
||||||
# since we only support 2.6.0+cu126
|
|
||||||
_dependency_links.append("https://download.pytorch.org/whl/cu126")
|
|
||||||
extras_require_map.pop("vllm")
|
|
||||||
elif (major, minor) >= (2, 5):
|
|
||||||
_install_requires.pop(_install_requires.index(xformers_version))
|
|
||||||
if patch == 0:
|
|
||||||
_install_requires.append("xformers==0.0.28.post2")
|
|
||||||
else:
|
|
||||||
_install_requires.append("xformers>=0.0.28.post3")
|
|
||||||
_install_requires.pop(_install_requires.index(autoawq_version))
|
|
||||||
extras_require_map.pop("vllm")
|
|
||||||
elif (major, minor) >= (2, 4):
|
|
||||||
extras_require_map.pop("vllm")
|
|
||||||
if patch == 0:
|
|
||||||
_install_requires.pop(_install_requires.index(xformers_version))
|
|
||||||
_install_requires.append("xformers>=0.0.27")
|
|
||||||
else:
|
|
||||||
_install_requires.pop(_install_requires.index(xformers_version))
|
|
||||||
_install_requires.append("xformers==0.0.28.post1")
|
|
||||||
else:
|
|
||||||
raise ValueError("axolotl requires torch>=2.4")
|
|
||||||
|
|
||||||
except PackageNotFoundError:
|
|
||||||
pass
|
|
||||||
return _install_requires, _dependency_links, extras_require_map
|
|
||||||
|
|
||||||
|
|
||||||
def get_package_version():
|
|
||||||
with open(
|
|
||||||
Path(os.path.dirname(os.path.abspath(__file__)))
|
|
||||||
/ "src"
|
|
||||||
/ "axolotl"
|
|
||||||
/ "__init__.py",
|
|
||||||
"r",
|
|
||||||
encoding="utf-8",
|
|
||||||
) as fin:
|
|
||||||
version_match = re.search(r"^__version__\s*=\s*(.*)$", fin.read(), re.MULTILINE)
|
|
||||||
version_ = ast.literal_eval(version_match.group(1))
|
|
||||||
return version_
|
|
||||||
|
|
||||||
|
|
||||||
extras_require = {
|
|
||||||
"flash-attn": ["flash-attn==2.8.3"],
|
|
||||||
"ring-flash-attn": [
|
|
||||||
"flash-attn==2.8.3",
|
|
||||||
"ring-flash-attn>=0.1.7",
|
|
||||||
],
|
|
||||||
"deepspeed": [
|
|
||||||
"deepspeed==0.17.5",
|
|
||||||
"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",
|
|
||||||
],
|
|
||||||
"ray": [
|
|
||||||
"ray[train]",
|
|
||||||
],
|
|
||||||
"vllm": [
|
|
||||||
"vllm==0.10.0",
|
|
||||||
],
|
|
||||||
"llmcompressor": [
|
|
||||||
"llmcompressor==0.5.1",
|
|
||||||
],
|
|
||||||
"fbgemm-gpu": ["fbgemm-gpu-genai>=1.2.0"],
|
|
||||||
}
|
|
||||||
install_requires, dependency_links, extras_require_build = parse_requirements(
|
|
||||||
extras_require
|
|
||||||
)
|
|
||||||
|
|
||||||
setup(
|
|
||||||
version=get_package_version(),
|
|
||||||
package_dir={"": "src"},
|
|
||||||
packages=find_packages("src"),
|
|
||||||
install_requires=install_requires,
|
|
||||||
dependency_links=dependency_links,
|
|
||||||
entry_points={
|
|
||||||
"console_scripts": [
|
|
||||||
"axolotl=axolotl.cli.main:main",
|
|
||||||
],
|
|
||||||
},
|
|
||||||
extras_require=extras_require_build,
|
|
||||||
)
|
|
||||||
=======
|
|
||||||
=======
|
|
||||||
>>>>>>> 7212dc6c (rebase)
|
|
||||||
if __name__ == "__main__":
|
|
||||||
setup()
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
# file generated by setuptools-scm
|
|
||||||
# don't change, don't track in version control
|
|
||||||
|
|
||||||
__all__ = [
|
|
||||||
"__version__",
|
|
||||||
"__version_tuple__",
|
|
||||||
"version",
|
|
||||||
"version_tuple",
|
|
||||||
"__commit_id__",
|
|
||||||
"commit_id",
|
|
||||||
]
|
|
||||||
|
|
||||||
TYPE_CHECKING = False
|
|
||||||
if TYPE_CHECKING:
|
|
||||||
from typing import Tuple
|
|
||||||
from typing import Union
|
|
||||||
|
|
||||||
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
|
||||||
COMMIT_ID = Union[str, None]
|
|
||||||
else:
|
|
||||||
VERSION_TUPLE = object
|
|
||||||
COMMIT_ID = object
|
|
||||||
|
|
||||||
version: str
|
|
||||||
__version__: str
|
|
||||||
__version_tuple__: VERSION_TUPLE
|
|
||||||
version_tuple: VERSION_TUPLE
|
|
||||||
commit_id: COMMIT_ID
|
|
||||||
__commit_id__: COMMIT_ID
|
|
||||||
|
|
||||||
__version__ = version = '0.12.1.dev89+g6477e622e.d20250915'
|
|
||||||
__version_tuple__ = version_tuple = (0, 12, 1, 'dev89', 'g6477e622e.d20250915')
|
|
||||||
|
|
||||||
__commit_id__ = commit_id = 'g6477e622e'
|
|
||||||
Reference in New Issue
Block a user