@@ -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
0 commit comments