Skip to content

docs: add CPU-only PyTorch installation options#22

Merged
JimmyWhitaker merged 1 commit intomainfrom
docs/cpu-only-pytorch-v2
Jan 23, 2026
Merged

docs: add CPU-only PyTorch installation options#22
JimmyWhitaker merged 1 commit intomainfrom
docs/cpu-only-pytorch-v2

Conversation

@dsingal0
Copy link
Copy Markdown

Summary

Add documentation for forcing CPU-only PyTorch installation when running genai-bench on GPU machines. This reduces download size from ~2GB+ to ~200MB since genai-bench primarily uses PyTorch for tokenization, not GPU computation.

Changes

  • Added new section "Running with CPU-Only PyTorch" to installation guide
  • Added new section to README.md with quick reference
  • Documented two options:
    1. Using --torch-backend=cpu flag
    2. Using UV_TORCH_BACKEND=cpu environment variable
  • Included verification steps to confirm CPU-only PyTorch is installed

Motivation

When running uv run -p 3.13 --with git+https://github.com/basetenlabs/genai-bench.git genai-bench benchmark on GPU machines, UV installs PyTorch GPU wheels by default, which are unnecessarily large and include CUDA runtime. Since genai-bench only uses PyTorch for tokenization (not GPU computation), forcing CPU-only installation significantly reduces download size and installation time.

Testing

Verified documentation is clear and complete. Users can now:

  • Use --torch-backend=cpu flag to force CPU-only PyTorch
  • Use UV_TORCH_BACKEND=cpu environment variable for global configuration
  • Verify installation with provided commands

Add documentation for forcing CPU-only PyTorch installation when running
genai-bench on GPU machines. This reduces download size from ~2GB+ to ~200MB
since genai-bench primarily uses PyTorch for tokenization, not GPU computation.

Two options documented:
1. Using --torch-backend=cpu flag
2. Using UV_TORCH_BACKEND=cpu environment variable

Added to both README.md and installation guide.
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Jan 23, 2026
@JimmyWhitaker JimmyWhitaker merged commit 99d821c into main Jan 23, 2026
5 of 7 checks passed
@JimmyWhitaker JimmyWhitaker deleted the docs/cpu-only-pytorch-v2 branch January 23, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants