Skip to content

Commit 7acc2cb

Browse files
committed
docs: update wheel install instructions
Signed-off-by: mkornfield <mkornfield@nvidia.com> Signed-off-by: Matt Kornfield <mkornfield@nvidia.com>
1 parent 424cbc2 commit 7acc2cb

5 files changed

Lines changed: 83 additions & 19 deletions

File tree

docs/tutorials/safe-synthesizer-101.ipynb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,15 @@
4444
"cell_type": "code",
4545
"execution_count": null,
4646
"id": "bb7b0bdd",
47-
"metadata": {},
47+
"metadata": {
48+
"vscode": {
49+
"languageId": "shellscript"
50+
}
51+
},
4852
"outputs": [],
4953
"source": [
5054
"%%capture\n",
51-
"#TODO: Replace the internal NVIDIA Artifactory endpoint with the public PyPI release when available.\n",
52-
"!uv pip install nemo-safe-synthesizer[engine,cu128] --extra-index-url \"https://urm.nvidia.com/artifactory/api/pypi/nv-shared-pypi-local/simple\"\n",
55+
"!uv pip install nemo-safe-synthesizer[engine,cu128] --extra-index-url https://download.pytorch.org/whl/cu128 --extra-index-url https://flashinfer.ai/whl/cu128\n",
5356
"!uv pip install datasets\n"
5457
]
5558
},

docs/user-guide/getting-started.md

Lines changed: 66 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,64 @@ does at each stage.
2020

2121
### Install the Package
2222

23+
The CUDA and CPU extras depend on packages (PyTorch, FlashInfer) hosted on
24+
indexes outside PyPI. You must pass the extra index URLs shown below.
25+
2326
=== "CUDA 12.8 (Linux with NVIDIA GPU)"
2427

25-
```bash
26-
pip install "nemo-safe-synthesizer[cu128,engine]"
27-
```
28+
=== "pip"
29+
30+
```bash
31+
pip install "nemo-safe-synthesizer[cu128,engine]" \
32+
--extra-index-url https://download.pytorch.org/whl/cu128 \
33+
--extra-index-url https://flashinfer.ai/whl/cu128
34+
```
35+
36+
=== "uv"
37+
38+
```bash
39+
uv pip install "nemo-safe-synthesizer[cu128,engine]" \
40+
--index https://flashinfer.ai/whl/cu128 \
41+
--index https://download.pytorch.org/whl/cu128
42+
```
43+
44+
!!! info "Why `--index` instead of `--extra-index-url`"
45+
`--index` gives the specified indexes higher priority than PyPI, so
46+
uv's default `first-match` strategy finds the CUDA-specific wheels
47+
on flashinfer.ai and download.pytorch.org before hitting PyPI.
2848

2949
=== "CPU (macOS / Linux without GPU)"
3050

31-
```bash
32-
pip install "nemo-safe-synthesizer[cpu,engine]"
33-
```
51+
On **macOS**, PyTorch ships standard wheels on PyPI, so no extra indexes are needed.
52+
53+
On **Linux**, the CPU-only PyTorch wheels (`+cpu` local version) are hosted
54+
on a separate PyTorch index.
55+
56+
=== "pip (macOS)"
57+
58+
```bash
59+
pip install "nemo-safe-synthesizer[cpu,engine]"
60+
```
61+
62+
=== "pip (Linux)"
63+
64+
```bash
65+
pip install "nemo-safe-synthesizer[cpu,engine]" \
66+
--extra-index-url https://download.pytorch.org/whl/cpu
67+
```
68+
69+
=== "uv (macOS)"
70+
71+
```bash
72+
uv pip install "nemo-safe-synthesizer[cpu,engine]"
73+
```
74+
75+
=== "uv (Linux)"
76+
77+
```bash
78+
uv pip install "nemo-safe-synthesizer[cpu,engine]" \
79+
--index https://download.pytorch.org/whl/cpu
80+
```
3481

3582
!!! warning "Development use only"
3683
The CPU install does not support training or generation. Use it to
@@ -54,9 +101,19 @@ does at each stage.
54101

55102
=== "Bare package for config definitions"
56103

57-
```bash
58-
pip install "nemo-safe-synthesizer"
59-
```
104+
The bare package has no PyTorch or FlashInfer dependencies.
105+
106+
=== "pip"
107+
108+
```bash
109+
pip install "nemo-safe-synthesizer"
110+
```
111+
112+
=== "uv"
113+
114+
```bash
115+
uv pip install "nemo-safe-synthesizer"
116+
```
60117

61118
!!! note "Limited use"
62119
The bare package includes only the Pydantic configuration models -- no

docs/user-guide/troubleshooting.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,9 @@ To diagnose:
9393

9494
1. Verify NVIDIA drivers: `nvidia-smi`
9595
2. Verify PyTorch CUDA build: `python -c "import torch; print(torch.cuda.is_available())"`
96-
3. Ensure you installed the CUDA extras, not the CPU-only package:
97-
98-
```bash
99-
pip install "nemo-safe-synthesizer[cu128,engine]"
100-
```
96+
3. Ensure you installed the CUDA extras, not the CPU-only package.
97+
See [Installation](getting-started.md#install-the-package) for the
98+
full command with required index URLs.
10199

102100
Switch to the HuggingFace backend for CPU-only environments (useful for
103101
development, not recommended for production training).

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,12 @@ constraint-dependencies = ["torch==2.9.1", "regex==2025.07.34", "pandas<3"]
222222
{ index = "pytorch-cpu", extra="cpu" },
223223
{ index = "pytorch-cu128", extra="cu128"},
224224
]
225+
flashinfer-python = [
226+
{ index = "flashinfer-jit-cache", marker = "sys_platform=='linux'", extra="cu128"},
227+
]
228+
flashinfer-cubin = [
229+
{ index = "flashinfer-jit-cache", marker = "sys_platform=='linux'", extra="cu128"},
230+
]
225231
flashinfer-jit-cache = [
226232
{ index = "flashinfer-jit-cache", marker = "sys_platform=='linux'", extra="cu128"},
227233
]

uv.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)