Spaces:
Running
on
A100
Running
on
A100
feat: change windows dependencies
Browse files
acestep/third_parts/nano-vllm/nanovllm/engine/model_runner.py
CHANGED
|
@@ -58,7 +58,7 @@ class ModelRunner:
|
|
| 58 |
print(f"[debug]dist_port: {dist_port}")
|
| 59 |
# Use gloo backend on Windows, nccl on Linux/other platforms
|
| 60 |
backend = "gloo" if sys.platform == "win32" else "nccl"
|
| 61 |
-
dist.init_process_group(backend, f"tcp://
|
| 62 |
torch.cuda.set_device(rank)
|
| 63 |
default_dtype = torch.get_default_dtype()
|
| 64 |
# Use dtype instead of deprecated torch_dtype
|
|
|
|
| 58 |
print(f"[debug]dist_port: {dist_port}")
|
| 59 |
# Use gloo backend on Windows, nccl on Linux/other platforms
|
| 60 |
backend = "gloo" if sys.platform == "win32" else "nccl"
|
| 61 |
+
dist.init_process_group(backend, f"tcp://127.0.0.1:{dist_port}", world_size=self.world_size, rank=rank)
|
| 62 |
torch.cuda.set_device(rank)
|
| 63 |
default_dtype = torch.get_default_dtype()
|
| 64 |
# Use dtype instead of deprecated torch_dtype
|
acestep/third_parts/nano-vllm/pyproject.toml
CHANGED
|
@@ -12,10 +12,10 @@ description = "a lightweight vLLM implementation built from scratch"
|
|
| 12 |
requires-python = ">=3.10,<3.13"
|
| 13 |
dependencies = [
|
| 14 |
"torch>=2.4.0",
|
| 15 |
-
"triton-windows>=3.0.0; sys_platform == 'win32'",
|
| 16 |
"triton>=3.0.0; sys_platform != 'win32'",
|
| 17 |
"transformers>=4.51.0",
|
| 18 |
-
"flash-attn @ https://github.com/sdbds/flash-attention-for-windows/releases/download/2.8.
|
| 19 |
"flash-attn; sys_platform != 'win32'",
|
| 20 |
"xxhash",
|
| 21 |
]
|
|
|
|
| 12 |
requires-python = ">=3.10,<3.13"
|
| 13 |
dependencies = [
|
| 14 |
"torch>=2.4.0",
|
| 15 |
+
"triton-windows>=3.0.0,<3.4; sys_platform == 'win32'",
|
| 16 |
"triton>=3.0.0; sys_platform != 'win32'",
|
| 17 |
"transformers>=4.51.0",
|
| 18 |
+
"flash-attn @ https://github.com/sdbds/flash-attention-for-windows/releases/download/2.8.2/flash_attn-2.8.2+cu128torch2.7.1cxx11abiFALSEfullbackward-cp311-cp311-win_amd64.whl ; sys_platform == 'win32' and python_version == '3.11' and platform_machine == 'AMD64'",
|
| 19 |
"flash-attn; sys_platform != 'win32'",
|
| 20 |
"xxhash",
|
| 21 |
]
|
pyproject.toml
CHANGED
|
@@ -7,9 +7,9 @@ requires-python = ">=3.11, <3.12"
|
|
| 7 |
license = {text = "Apache-2.0"}
|
| 8 |
dependencies = [
|
| 9 |
# PyTorch for Linux/Windows with CUDA
|
| 10 |
-
"torch
|
| 11 |
"torchvision; sys_platform != 'darwin'",
|
| 12 |
-
"torchaudio
|
| 13 |
# PyTorch for macOS (CPU / MPS)
|
| 14 |
"torch>=2.9.1; sys_platform == 'darwin'",
|
| 15 |
"torchvision; sys_platform == 'darwin'",
|
|
@@ -57,10 +57,3 @@ dev = []
|
|
| 57 |
|
| 58 |
[tool.hatch.build.targets.wheel]
|
| 59 |
packages = ["acestep"]
|
| 60 |
-
|
| 61 |
-
[tool.uv.extra-build-dependencies]
|
| 62 |
-
flash-attn = [
|
| 63 |
-
"packaging",
|
| 64 |
-
"wheel",
|
| 65 |
-
{ requirement = "torch", match-runtime = true },
|
| 66 |
-
]
|
|
|
|
| 7 |
license = {text = "Apache-2.0"}
|
| 8 |
dependencies = [
|
| 9 |
# PyTorch for Linux/Windows with CUDA
|
| 10 |
+
"torch==2.7.1; sys_platform != 'darwin'",
|
| 11 |
"torchvision; sys_platform != 'darwin'",
|
| 12 |
+
"torchaudio==2.7.1; sys_platform != 'darwin'",
|
| 13 |
# PyTorch for macOS (CPU / MPS)
|
| 14 |
"torch>=2.9.1; sys_platform == 'darwin'",
|
| 15 |
"torchvision; sys_platform == 'darwin'",
|
|
|
|
| 57 |
|
| 58 |
[tool.hatch.build.targets.wheel]
|
| 59 |
packages = ["acestep"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requirements.txt
CHANGED
|
@@ -1,12 +1,35 @@
|
|
| 1 |
-
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
diffusers
|
| 4 |
gradio
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
fastapi
|
| 12 |
-
uvicorn
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
# PyTorch with CUDA 12.8 (for Windows/Linux)
|
| 3 |
+
--extra-index-url https://download.pytorch.org/whl/cu128
|
| 4 |
+
torch==2.7.1; sys_platform == 'win32'
|
| 5 |
+
torchaudio==2.7.1; sys_platform == 'win32'
|
| 6 |
+
torchvision; sys_platform == 'win32'
|
| 7 |
+
torch>=2.9.1; sys_platform != 'win32'
|
| 8 |
+
torchaudio>=2.9.1; sys_platform != 'win32'
|
| 9 |
+
torchvision; sys_platform != 'win32'
|
| 10 |
+
|
| 11 |
+
# Core dependencies
|
| 12 |
+
transformers>=4.51.0
|
| 13 |
diffusers
|
| 14 |
gradio
|
| 15 |
+
matplotlib>=3.7.5
|
| 16 |
+
scipy>=1.10.1
|
| 17 |
+
soundfile>=0.13.1
|
| 18 |
+
loguru>=0.7.3
|
| 19 |
+
einops>=0.8.1
|
| 20 |
+
accelerate>=1.12.0
|
| 21 |
+
fastapi>=0.110.0
|
| 22 |
+
uvicorn[standard]>=0.27.0
|
| 23 |
+
numba>=0.63.1
|
| 24 |
+
vector-quantize-pytorch>=1.27.15
|
| 25 |
+
torchcodec>=0.9.1
|
| 26 |
+
|
| 27 |
+
# nano-vllm dependencies
|
| 28 |
+
triton-windows>=3.0.0,<3.4; sys_platform == 'win32'
|
| 29 |
+
triton>=3.0.0; sys_platform != 'win32'
|
| 30 |
+
flash-attn @ https://github.com/sdbds/flash-attention-for-windows/releases/download/2.8.2/flash_attn-2.8.2+cu128torch2.7.1cxx11abiFALSEfullbackward-cp311-cp311-win_amd64.whl ; sys_platform == 'win32' and python_version == '3.11' and platform_machine == 'AMD64'
|
| 31 |
+
flash-attn; sys_platform != 'win32'
|
| 32 |
+
xxhash
|
| 33 |
+
|
| 34 |
+
# Local package - install with: pip install -e acestep/third_parts/nano-vllm
|
| 35 |
+
# nano-vllm
|