Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
24 changes: 21 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ on:

env:
CUDA_DEVICE_ORDER: PCI_BUS_ID
RUNNER: 10.0.14.248
RUNNER: 10.0.13.31
TORCH_CUDA_ARCH_LIST: '8.0 8.6 8.9 9.0 12.0'
CUDA_ARCH_LIST: '8.0 8.6 8.9 9.0 12.0'
RELEASE_MODE: 1
Expand All @@ -63,7 +63,7 @@ env:
ref: ${{ github.event.inputs.ref || github.ref }}
MAX_JOBS: 4
GPTQMODEL_BUILD_QQQ: 0
GTTQMODEL_BUILD_EORA: 0
GPTQMODEL_BUILD_EORA: 0
GPTQMODEL_BUILD_EXLLAMA_V1: 0

concurrency:
Expand Down Expand Up @@ -287,7 +287,7 @@ jobs:
echo "== python =="
python --version
echo "== nvcc =="
#nvcc --version
nvcc --version
echo "== torch =="
pip show torch

Expand Down Expand Up @@ -336,6 +336,8 @@ jobs:
- check-vm
container:
image: ${{ needs.check-vm.outputs.ip }}:5000/nvidia/cuda:128-ubuntu22.04_0919
volumes:
- /home/ci/models/pyenv:/opt/pyenv
env:
RELEASE_MODE: 0
steps:
Expand All @@ -345,6 +347,21 @@ jobs:
repository: ${{ env.repo }}
ref: ${{ env.ref }}

- name: Print Env
run: |
env_name="py313_release_source"
if [ -d "$(pyenv root)/versions/$env_name" ]; then
echo "env: ${env_name} exists, skip"
pyenv local $env_name
pyenv activate $env_name
else
echo "creating venv: ${env_name}..."
pyenv virtualenv 3.13 "$env_name" || true
pyenv local $env_name
pyenv activate $env_name
bash -c "$(curl -L http://${RUNNER}/scripts/env/init_compiler.sh)" @ 128 2.8.0 313
fi

- name: Fetch PR by number
if: ${{ github.event.inputs.pr_number != 0 }}
run: |
Expand All @@ -353,6 +370,7 @@ jobs:
git config --global --add safe.directory $(pwd)
git fetch origin pull/${PR_NUMBER}/head:pr-${PR_NUMBER}
git checkout pr-${PR_NUMBER}

- name: Install requirements
run: pip install build setuptools -U -i http://${{ needs.check-vm.outputs.ip }}/simple/ --trusted-host ${{ needs.check-vm.outputs.ip }}

Expand Down
11 changes: 3 additions & 8 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,13 @@ env:
CUDA_VISIBLE_DEVICES: 0
TORCH_CUDA_ARCH_LIST: '8.6 8.9 9.0 12.0'
PYTORCH_CUDA_ALLOC_CONF: 'expandable_segments:True'
MAX_JOBS: 8
MAX_JOBS: 4
RUNNER: 10.0.13.31
XEON5: 10.0.14.248
CUDA_VERSION: 128
TORCH_VERSION: 2.8.0
PYTHON_VERSION: 312
PYTHON_VERSION: 313
# PYTHON_GIL: 0 // test libs don't support yet
LEGACY_TESTS: "models/test_internlm.py,models/test_internlm2_5.py,models/test_xverse.py"
IGNORED_TEST_FILES: "test_tgi.py,test_gptneox.py,models/test_mixtral.py,models/test_phi_3_moe.py,test_bits_new.py"
GPTQMODEL_FORCE_BUILD: 1
Expand Down Expand Up @@ -521,9 +522,6 @@ jobs:
uv pip install numpy==1.26.3
fi

echo "===== install -r requirements.txt ====="
uv pip install -r requirements.txt

echo "===== uninstall torchao ====="
uv pip uninstall torchao

Expand Down Expand Up @@ -643,9 +641,6 @@ jobs:
echo "=== installing test tools"
uv pip install pytest parameterized vllm lm-eval device-smi mlx-lm -U -i http://$RUNNER/simple/ --trusted-host $RUNNER --extra-index-url https://pypi.org/simple

echo "=== installing requirements"
uv pip install -r requirements.txt -i http://$RUNNER/simple/ --trusted-host $RUNNER --extra-index-url https://pypi.org/simple

echo "=== installing gptqmodel"
uv pip install . --no-build-isolation -i http://$RUNNER/simple/ --trusted-host $RUNNER --extra-index-url https://pypi.org/simple

Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ global-include gptqmodel_ext/**/*.h
global-include gptqmodel_ext/**/*.cpp
global-include gptqmodel_ext/**/*.cu
global-include gptqmodel_ext/**/*.py
include requirements.txt
prune tests/
prune format/
30 changes: 25 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[build-system]
requires = ["setuptools >= 64"]
requires = [
"setuptools >= 64",
]
build-backend = "setuptools.build_meta:__legacy__"

[project]
Expand All @@ -25,10 +27,28 @@ classifiers = [
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Information Analysis",
]
dynamic = ["version", "dependencies"]

[tool.setuptools.dynamic]
dependencies = {file = ["requirements.txt"]}
dynamic = ["version"]
dependencies = [
"accelerate>=1.10.1",
# "datasets>=3.5.0",
"numpy>=2.2.6",
"torch>=2.8.0",
"safetensors>=0.6.2",
"transformers>=4.56.0",
"threadpoolctl>=3.6.0",
"packaging>=24.2",
"device-smi==0.4.1",
"protobuf>=6.32.0",
"pillow>=11.3.0",
"hf_transfer>=0.1.9",
"huggingface_hub>=0.34.4",
"random_word==1.0.13",
"tokenicer>=0.0.5",
"logbar==0.0.4",
# "soundfile==0.13.1", # Qwen-Omni 可选依赖
"wheel>=0.45.1",
"maturin>=1.9.3",
]

[project.urls]
Homepage = "https://github.com/ModelCloud/GPTQModel"
Expand Down
22 changes: 0 additions & 22 deletions requirements.txt

This file was deleted.

11 changes: 4 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,10 @@ def _detect_torch_version() -> str | None:


def _major_minor(v: str) -> str:
parts = v.split(".")
return ".".join(parts[:2]) if parts else v
if v:
parts = v.split(".")
return ".".join(parts[:2]) if parts else v
return v


def _detect_cuda_version() -> str | None:
Expand Down Expand Up @@ -333,11 +335,6 @@ def _resolve_wheel_url(tag_name: str, wheel_name: str) -> str:
# Fallback: default GitHub template
return DEFAULT_WHEEL_URL_TEMPLATE.format(tag_name=tag_name, wheel_name=wheel_name)

requirements = []
if not os.getenv("CI"):
with open("requirements.txt", encoding="utf-8") as f:
requirements = [line.strip() for line in f if line.strip()]

# Decide HAS_CUDA_V8 without torch
HAS_CUDA_V8 = False
if CUDA_ARCH_LIST:
Expand Down