Skip to main content

CLI for managing vLLM inference on GPU workstations

Project description

vserve

A CLI for managing LLM inference on GPU workstations.

Download models. Auto-tune limits. Serve with one command. Multiple backends.

Python 3.12+ vLLM 0.19+ llama.cpp Tests License


Install

uv tool install vserve

Or with pip:

pip install vserve

For llama.cpp GGUF tuning support:

pip install 'vserve[llamacpp]'

Quick Start

vserve init                        # scan GPU, backends, CUDA, systemd — write config
vserve download                    # search HuggingFace, pick variant, download
vserve start <model>               # auto-tune + interactive config + serve
vserve start <model> --tools       # enable tool calling (auto-detected)
vserve start <model> --backend llamacpp  # force a specific backend

Backends

vserve auto-detects the right backend from the model format:

Format Backend Engine
safetensors, GPTQ, AWQ, FP8 vLLM PagedAttention, continuous batching
GGUF llama.cpp CPU/GPU offload, quantized inference

No configuration needed — download a model and vserve start picks the right engine.

vLLM

The default for transformer models in safetensors format. Optimized for high-throughput serving with PagedAttention, KV cache management, and automatic batching.

  • Auto-tunes --max-model-len, --max-num-seqs, --kv-cache-dtype based on your GPU
  • Tool calling with parser auto-detection (Qwen, Llama, Mistral, DeepSeek, Gemma, GPT-OSS)
  • Systemd service management via vllm.service

llama.cpp

For GGUF quantized models. Serves via llama-server with an OpenAI-compatible API.

  • Auto-calculates --n-gpu-layers, --ctx-size, --parallel based on VRAM
  • Partial GPU offload — serve models that don't fully fit in VRAM
  • Tool calling via --jinja (no parser configuration needed)
  • Systemd service management via llama-cpp.service

What It Does

vserve manages the full lifecycle of serving LLMs on a GPU workstation:

  • Download — search HuggingFace, see available weight variants (FP8, NVFP4, BF16, GGUF) with sizes, download only what you need
  • Auto-tune — calculate exactly what context lengths and concurrency your GPU can handle, based on model architecture and available VRAM
  • Tool calling — auto-detects the correct parser from the model's chat template (vLLM) or uses --jinja (llama.cpp)
  • Start/Stop — interactive config wizard, systemd service management, health check with timeout
  • Fan control — temperature-based curve daemon with quiet hours, or hold a fixed speed
  • Multi-user — session-based GPU ownership prevents other users from disrupting your running model
  • Doctor — diagnose GPU, CUDA, backend, systemd issues with actionable fix suggestions

Commands

Command Description
vserve Dashboard — GPU, models, status
vserve init Auto-discover backends and write config
vserve download [model] Search and download from HuggingFace with variant picker
vserve models [name] List models with backend, tools, and limits
vserve tune [model] Calculate context/concurrency limits
vserve start [model] Configure and start serving (auto-tunes if needed)
vserve start <model> --tools Start with tool calling enabled
vserve start <model> --backend llamacpp Force a specific backend
vserve stop Stop the running server
vserve status Show current serving config
vserve fan [auto|off|30-100] GPU fan control with temp-based curve
vserve doctor Check system readiness
vserve cache clean [--all] Clean stale sockets and JIT caches

All commands support fuzzy matchingvserve start qwen fp8 finds the right model.


Tool Calling

vLLM

Auto-detects the correct vLLM parser by reading the model's chat template:

Model Family Tool Parser Reasoning Parser
Qwen 2.5 hermes
Qwen 3 hermes qwen3
Qwen 3.5 qwen3_coder qwen3
Llama 3.1 / 3.2 / 3.3 llama3_json
Llama 4 llama4_pythonic
Mistral / Mixtral mistral mistral
DeepSeek V3 / R1 deepseek_v3 deepseek_r1
Gemma 4 gemma4 gemma4
GPT-OSS openai openai_gptoss

Detection is template-based (not model-name regex), so it works for fine-tunes and community uploads.

llama.cpp

Uses --jinja to read the model's chat template directly. No parser selection needed — one flag covers all model families.


Prerequisites

Requirement Check Install
NVIDIA GPU + drivers nvidia-smi nvidia.com/drivers
CUDA toolkit nvcc --version sudo apt install nvidia-cuda-toolkit
systemd (most Linux servers) See troubleshooting
sudo access for systemctl, fan control

For vLLM backend:

Requirement Check Install
vLLM 0.19+ vllm --version docs.vllm.ai

For llama.cpp backend:

Requirement Check Install
llama-server llama-server --version github.com/ggml-org/llama.cpp

Configuration

Auto-discovered on first run. Override at ~/.config/vserve/config.yaml:

# Shared
port: 8888

# vLLM
vllm_root: /opt/vllm
cuda_home: /usr/local/cuda
service_name: vllm
service_user: vllm

# llama.cpp (optional)
llamacpp_root: /opt/llama-cpp
llamacpp_service_name: llama-cpp
llamacpp_service_user: llama-cpp

Directory Layout

/opt/vllm/                     # vLLM backend
├── venv/bin/vllm              # Python venv
├── models/                    # safetensors models
├── configs/                   # limits + profiles
└── logs/

/opt/llama-cpp/                # llama.cpp backend
├── bin/llama-server           # compiled binary
├── models/                    # GGUF models
├── configs/                   # JSON configs
└── logs/

Fan Control

vserve fan              # show status, interactive menu
vserve fan auto         # temp-based curve with quiet hours
vserve fan 80           # hold at 80% (persistent daemon)
vserve fan off          # stop daemon, restore NVIDIA auto

The auto curve ramps with temperature and caps fan speed during quiet hours (configurable). Emergency override at 88C ignores quiet hours.


Architecture

vserve uses a Backend Protocol pattern. Each inference engine implements the same interface:

Backend Protocol
├── VllmBackend        — safetensors, AWQ, FP8, GPTQ
├── LlamaCppBackend    — GGUF
└── (future: SGLang, etc.)

The registry auto-detects the right backend from the model format. All CLI commands work through the protocol — no backend-specific code in the command layer.


Development

git clone https://github.com/Gavin-Qiao/vserve.git
cd vserve
uv sync --dev
uv run pytest tests/              # 252 tests
uv run ruff check src/ tests/     # lint
uv run mypy src/vserve/           # type check

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vserve-0.4.0.tar.gz (109.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vserve-0.4.0-py3-none-any.whl (56.8 kB view details)

Uploaded Python 3

File details

Details for the file vserve-0.4.0.tar.gz.

File metadata

  • Download URL: vserve-0.4.0.tar.gz
  • Upload date:
  • Size: 109.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for vserve-0.4.0.tar.gz
Algorithm Hash digest
SHA256 acf77ec941372799e7cbbced8d63ffbcdbd4ad69960d80b4f86a81e43918c633
MD5 7af3212e4f7a71cd03cf253adf0e3a2f
BLAKE2b-256 33721a8cad21d7a674bc2373751302ba17b1e19871d26e89f480e089e2f3152f

See more details on using hashes here.

Provenance

The following attestation bundles were made for vserve-0.4.0.tar.gz:

Publisher: publish.yml on Gavin-Qiao/vserve

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vserve-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: vserve-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 56.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for vserve-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 029f047af7e1aa1b46dbff4eaa259c0d3e669fbd77ac75f729f31d38f548285f
MD5 a7327e6959fca55d20f27883524e3387
BLAKE2b-256 c60616ba29a7b3ef7d012d2272a6fa99026054bd6a6352e12932c4d4919594d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for vserve-0.4.0-py3-none-any.whl:

Publisher: publish.yml on Gavin-Qiao/vserve

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page