Self-hosted Qwen inference service benchmarked against vLLM and TensorRT-LLM
From README links · today
Deployed RTP-LLM for a Qwen chat API and compared throughput with vLLM
What they did
The team needed a self-hosted chat completion endpoint for a Qwen-family model on a small pool of V100 and A10 GPUs, with multi-turn traffic and a few LoRA adapters per tenant. They started from the RTP-LLM install docs, built the engine from source, and loaded HuggingFace SafeTensors weights directly so no conversion step was needed. They enabled WeightOnly INT8 quantization at load time to fit the model on the available cards, then turned on the Contextual Prefix Cache and System Prompt Cache because most requests shared a long system prompt and repeated conversation history. They exposed the service behind an OpenAI-compatible HTTP layer so existing SDK clients and internal tooling kept working unchanged. For multi-tenant LoRA they registered several adapters against a single base model instance rather than spinning up one process per tenant. Finally they ran the bundled benchmark tool at several concurrency levels and repeated the same workload against vLLM and TensorRT-LLM on identical hardware to get an apples-to-apples comparison of tokens per second, time to first token, and tail latency.
How it went
The service ran end to end: chat completions, streaming, multi-turn prefix reuse, and per-tenant LoRA switching all worked. Prefix and system prompt caching gave the clearest win on their multi-turn workload, and INT8 weight-only quantization let the model fit without a hardware upgrade. The benchmark harness produced comparable numbers across all three engines, though results were sensitive to batch size and sequence length, so the team reported ranges rather than single figures. Polish level was solid for an internal service; public-facing hardening like auth, rate limiting, and autoscaling was left to the platform layer.
Worth knowing
RTP-LLM is a C++/CUDA engine, so building from source is the main friction point and version drift between CUDA, PyTorch, and the repo can bite. The README is thin on operational detail; real answers live in the external docs site. Multi-hardware support beyond NVIDIA (ROCm, Intel and ARM CPU) was still in development at the time, so the team stayed on NVIDIA GPUs. Benchmark numbers are hardware- and workload-specific and should not be treated as general claims. LoRA and multimodal paths add config surface that is easy to misconfigure.
Wiring
Order of operations: build the engine from source in a CUDA-matched container, then load weights. Config connects in this sequence: model path and weight format (SafeTensors) -> quantization (WeightOnly INT8 at load, or INT4 via GPTQ/AWQ) -> KV cache settings including adaptive KV cache quantization -> prefix and system prompt cache toggles -> LoRA adapter registry keyed by tenant -> tensor parallelism degree for multi-GPU. The HTTP front end wraps the engine and translates OpenAI-style requests into engine calls, passing tenant identity through to select the LoRA adapter. Benchmarking runs the same client script against RTP-LLM, vLLM, and TensorRT-LLM endpoints on identical hardware, with the model, prompt set, and concurrency sweep held constant so only the engine differs.
Try it yourself
Set up a self-hosted inference service for a Qwen model using RTP-LLM in this repo. Steps: (1) read the install docs and build the engine from source, pinning CUDA and PyTorch versions in a Dockerfile; (2) add a config that loads HuggingFace SafeTensors weights with WeightOnly INT8 quantization and enables Contextual Prefix Cache and System Prompt Cache; (3) expose an OpenAI-compatible /v1/chat/completions endpoint with streaming; (4) register two LoRA adapters against the single base model instance and route by tenant header; (5) write a benchmark script that sweeps concurrency levels and records tokens/sec, time to first token, and p95 latency, and make the same script runnable against vLLM and TensorRT-LLM for comparison. Output a docker-compose file, the engine config, the client example, and a results table.
Tools in this stack
Run this stack
Install the stack into this project. It writes AGENTS.md and the manifest, merges the MCP servers into .mcp.json, and — with --yes — runs the tool installs.
npx runchr install runchr/stack-rtp-llm-and-tensorrt-llm-and-vllmcurl -s https://api.runchr.com/api/recipes/runchr/stack-rtp-llm-and-tensorrt-llm-and-vllm/manifestSystem prompt
You are an inference-serving engineer setting up and benchmarking a self-hosted Qwen chat endpoint on RTP-LLM, with vLLM and TensorRT-LLM as comparison runtimes. Work in the order the stack defines: build the engine in a CUDA-matched container, load SafeTensors weights with WeightOnly INT8, enable the prefix and system prompt caches, register per-tenant LoRA adapters, then benchmark all three engines on identical hardware and report ranges rather than single figures.
This system prompt was generated from this stack's copy and tools. A person has not reviewed it.
The manifest is also at api.runchr.com/api/recipes/runchr/stack-rtp-llm-and-tensorrt-llm-and-vllm/manifest.