Metadata-Version: 2.4
Name: serveutil
Version: 0.1.1
Summary: Readable compute and bandwidth timelines for LLM serving
License-Expression: Apache-2.0
Project-URL: Documentation, https://haoyangping0324.github.io/ServeUtil/
Project-URL: Source, https://github.com/HaoyangPing0324/ServeUtil
Project-URL: Issues, https://github.com/HaoyangPing0324/ServeUtil/issues
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Requires-Dist: ijson<4,>=3.2
Requires-Dist: prometheus-client<1,>=0.17
Requires-Dist: nvidia-ml-py>=12.550.52
Provides-Extra: gpu
Provides-Extra: desktop
Requires-Dist: pywebview<7,>=6; extra == "desktop"
Requires-Dist: pywebview[qt]<7,>=6; sys_platform == "linux" and extra == "desktop"
Provides-Extra: llmperfscope
Requires-Dist: llmperfscope<1,>=0.2; extra == "llmperfscope"
Provides-Extra: pm
Requires-Dist: cupti-python<14,>=13.4; sys_platform == "linux" and extra == "pm"
Dynamic: license-file

# ServeUtil

Profile PyTorch, vLLM and SGLang inference with GPU and network counters. Inspect Prefill and Decode by rank, select an interval for directional bandwidth and compare it with a measured hardware reference.

```bash
pip install serveutil
serveutil view rank0.pt.trace.json.gz
```

Create a shareable report with `serveutil report TRACE -o report.html`. Model capture uses the PyTorch installation in your serving environment. With a running vLLM server configured to write profiler traces to a shared directory:

```bash
serveutil capture --engine vllm --url http://localhost:8000 \
  --trace-dir /profiles --seconds 5 --generate "Explain prefill and decode."
```

Use `--engine sglang` and the SGLang service URL for SGLang. Add `--calibrate` on idle test devices to measure a local reference. For independent HBM read/write sampling on compatible Linux devices install `serveutil[pm]`.

[Documentation](https://haoyangping0324.github.io/ServeUtil/) · [简体中文](https://haoyangping0324.github.io/ServeUtil/zh/) · [Desktop downloads](https://haoyangping0324.github.io/ServeUtil/downloads.html)
