> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nixl/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nixl/_mcp/server.

# Building KVBench

> Install KVBench using the NIXLBench Docker container or a Python virtual environment.

KVBench requires Python 3.12 or later. For GPU-accelerated benchmarks, PyTorch is also required.

## Installation

<Tabs>
<Tab title="Docker">

KVBench is included in the NIXLBench Docker container. See [Building NIXLBench](/nixl/user-guide/benchmarking-nixl/nixl-bench/building-nixl-bench) for Docker build and setup instructions.

After building the container, KVBench is available at `/workspace/benchmark/kvbench/` inside the container.

</Tab>
<Tab title="Python venv">

Clone the repository and set up a Python virtual environment:

```bash
git clone https://github.com/ai-dynamo/nixl.git
cd nixl/benchmark/kvbench
python3 -m venv venv
source venv/bin/activate
pip install uv
uv sync --active
```

Verify the installation:

```bash
python main.py --help
```

</Tab>
</Tabs>