From 3592305c305e82a9a40578c04100ed5600055e48 Mon Sep 17 00:00:00 2001 From: Philip Bontrager Date: Mon, 15 Sep 2025 06:58:22 -0700 Subject: [PATCH 1/2] working full uv build --- README.md | 33 ++------------------------------- pyproject.toml | 29 ++++++++++------------------- 2 files changed, 12 insertions(+), 50 deletions(-) diff --git a/README.md b/README.md index 82db7519c..48c534cf6 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ ## Installation -### Basic +### Build Script Forge requires the latest PyTorch nightly with Monarch, vLLM, and torchtitan. For convenience, we have pre-packaged these dependencies as wheels in assets/wheels. (Note that the basic install script @@ -37,9 +37,7 @@ Since the vLLM wheel is too large for GitHub, we uploaded it as a release: $ gh release create v0.0.0 assets/wheels/vllm-*.whl --title "Forge Wheels v0.0.0" ``` -### Meta Internal Build - -1. Build uv package +### UV Build ```bash curl -LsSf https://astral.sh/uv/install.sh | sh @@ -49,33 +47,6 @@ uv sync --all-extras source .venv/bin/activate ``` -2. Setup CUDA on local machine - -```bash -# feature install if you don't have /user/local/cuda-12.8 -feature install --persist cuda_12_9 - -# add env variables -export CUDA_VERSION=12.9 -export NVCC=/usr/local/cuda-$CUDA_VERSION/bin/nvcc -export CUDA_NVCC_EXECUTABLE=/usr/local/cuda-$CUDA_VERSION/bin/nvcc -export CUDA_HOME=/usr/local/cuda-$CUDA_VERSION -export PATH="$CUDA_HOME/bin:$PATH" -export CUDA_INCLUDE_DIRS=$CUDA_HOME/include -export CUDA_CUDART_LIBRARY=$CUDA_HOME/lib64/libcudart.so -export LD_LIBRARY_PATH=$CUDA_HOME/lib64:$LD_LIBRARY_PATH -``` - -3. Build vllm from source - -```bash -git clone https://github.com/vllm-project/vllm.git --branch v0.10.0 -cd vllm -python use_existing_torch.py -uv pip install -r requirements/build.txt -uv pip install --no-build-isolation -e . -``` - > [!WARNING] > If you add packages to the pyproject.toml, use `uv sync --inexact` so it doesn't remove Monarch and vLLM diff --git a/pyproject.toml b/pyproject.toml index 0754dac57..29a8254be 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "forge" description = "A PyTorch native platform for post-training generative AI models" readme = "README.md" -requires-python = ">=3.10, <3.13" +requires-python = ">=3.10, <=3.13" license = {file = "LICENSE"} authors = [ { name = "PyTorch Team", email = "packages@pytorch.org" }, @@ -12,10 +12,7 @@ keywords = ["pytorch", "training", "llm"] dependencies = [ # PyTorch "torchdata>=0.8.0", - "torchtitan", - # vLLM - # TODO: pin specific vllm version - #"vllm==0.10.0", + "torchtitan==0.1.0.dev20250912+cu128", # Hugging Face integrations "datasets>=2.21.0", "tokenizers", @@ -43,9 +40,10 @@ dev = [ "pytest-asyncio", ] oss = [ - "torch", - "torchmonarch-nightly==2025.8.1", + "torch==2.10.0.dev20250912+cu128", + "torchmonarch-nightly==2025.9.12", "torchstore", + "vllm==1.0.0.dev20250912+cu128" ] [project.scripts] @@ -73,21 +71,14 @@ members = [ # pytorch # TODO: get auto backend to work [[tool.uv.index]] -name = "pytorch-nightly-cu129" -url = "https://download.pytorch.org/whl/nightly/cu129" -#explicit = true - -# vllm -# [[tool.uv.index]] -# name = "vllm-nightly" -# url = "https://wheels.vllm.ai/nightly" -# explicit = true +name = "pytorch-nightly" +url = "https://download.pytorch.org/whl/nightly" [tool.uv.sources] -torchtitan = { index = "pytorch-nightly-cu129" } -torch = { index = "pytorch-nightly-cu129" } +torchtitan = { index = "pytorch-nightly" } +torch = { index = "pytorch-nightly" } torchstore = { git = "ssh://git@github.com/meta-pytorch/torchstore.git" } -#vllm = { index = "vllm-nightly" } +vllm = { index = "pytorch-nightly" } [tool.uv] # TODO: revert to stricter default uv strategy From 16cc5643f85347968fc24cc11a9ab0ff8b66d4bc Mon Sep 17 00:00:00 2001 From: pbontrager Date: Fri, 17 Oct 2025 20:46:02 +0000 Subject: [PATCH 2/2] [broken] updated to stable release --- pyproject.toml | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4e571cc0a..61c6e1776 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,8 +11,12 @@ authors = [ keywords = ["pytorch", "training", "llm"] dependencies = [ # PyTorch + "torch==2.9.0", "torchdata>=0.8.0", - "torchtitan==0.1.0.dev20250912+cu128", + "torchtitan", + "torchmonarch==0.1.0rc4", + "torchstore==0.0.1rc2", + "vllm==0.11.0", # Hugging Face integrations "datasets>=2.21.0", "tokenizers", @@ -40,12 +44,6 @@ dev = [ "anyio", "pytest-asyncio", ] -oss = [ - "torch==2.10.0.dev20250912+cu128", - "torchmonarch-nightly==2025.9.12", - "torchstore", - "vllm==1.0.0.dev20250912+cu128" -] # ---- Explicit project build information ---- # [build-system] @@ -66,16 +64,15 @@ members = [ ] # pytorch -# TODO: get auto backend to work [[tool.uv.index]] name = "pytorch-nightly" url = "https://download.pytorch.org/whl/nightly" [tool.uv.sources] -torchtitan = { index = "pytorch-nightly" } -torch = { index = "pytorch-nightly" } -torchstore = { git = "ssh://git@github.com/meta-pytorch/torchstore.git" } -vllm = { index = "pytorch-nightly" } +# torchtitan = { index = "pytorch-nightly" } +# torch = { index = "pytorch-nightly" } +# torchstore = { git = "ssh://git@github.com/meta-pytorch/torchstore.git"} +# vllm = { index = "pytorch-nightly" } [tool.uv] # TODO: revert to stricter default uv strategy @@ -85,4 +82,4 @@ prerelease = "allow" environments = [ "sys_platform == 'linux'", ] -# override-dependencies = ["torch>2.7.1", "torchaudio>=2.7.1", "torchvision>=0.22.0"] +override-dependencies = ["torch>2.7.1"] # , "torchaudio>=2.7.1", "torchvision>=0.22.0"]