Skip to content

Commit b760b61

Browse files
committed
docs: update wheel install instructions
Signed-off-by: Matt Kornfield <mkornfield@nvidia.com>
1 parent 78102fd commit b760b61

5 files changed

Lines changed: 89 additions & 21 deletions

File tree

docs/tutorials/safe-synthesizer-101.ipynb

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,18 @@
3535
"cell_type": "code",
3636
"execution_count": null,
3737
"id": "bb7b0bdd",
38-
"metadata": {},
38+
"metadata": {
39+
"vscode": {
40+
"languageId": "shellscript"
41+
}
42+
},
3943
"outputs": [],
4044
"source": [
41-
"%%capture\n",
4245
"# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n",
4346
"# SPDX-License-Identifier: Apache-2.0\n",
4447
"\n",
45-
"#TODO: Replace the internal NVIDIA Artifactory endpoint with the public PyPI release when available.\n",
46-
"!uv pip install nemo-safe-synthesizer[engine,cu128] --extra-index-url \"https://urm.nvidia.com/artifactory/api/pypi/nv-shared-pypi-local/simple\"\n",
48+
"%%capture\n",
49+
"!uv pip install \"nemo-safe-synthesizer[engine,cu128]\" --index https://flashinfer.ai/whl/cu128 --index https://download.pytorch.org/whl/cu128 --index-strategy unsafe-best-match\n",
4750
"!uv pip install datasets\n"
4851
]
4952
},
@@ -203,7 +206,7 @@
203206
],
204207
"metadata": {
205208
"kernelspec": {
206-
"display_name": ".venv",
209+
"display_name": "Python 3",
207210
"language": "python",
208211
"name": "python3"
209212
},

docs/user-guide/getting-started.md

Lines changed: 70 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,68 @@ 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+
--index-strategy unsafe-best-match
43+
```
44+
45+
!!! info "Why `--index-strategy unsafe-best-match`"
46+
FlashInfer publishes wheels to flashinfer.ai, but `flashinfer-python`
47+
also appears on the PyTorch index at older versions. uv's default
48+
`first-match` strategy stops at the first index that contains a
49+
package name, so it picks up the wrong version from the PyTorch
50+
index and fails to resolve. `--index-strategy unsafe-best-match`
51+
tells uv to consider all indexes and pick the best matching version.
2852

2953
=== "CPU (macOS / Linux without GPU)"
3054

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

3586
!!! warning "Development use only"
3687
The CPU install does not support training or generation. Use it to
@@ -54,9 +105,19 @@ does at each stage.
54105

55106
=== "Bare package for config definitions"
56107

57-
```bash
58-
pip install "nemo-safe-synthesizer"
59-
```
108+
The bare package has no PyTorch or FlashInfer dependencies.
109+
110+
=== "pip"
111+
112+
```bash
113+
pip install "nemo-safe-synthesizer"
114+
```
115+
116+
=== "uv"
117+
118+
```bash
119+
uv pip install "nemo-safe-synthesizer"
120+
```
60121

61122
!!! note "Limited use"
62123
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)