Overview
Chitu (赤兔) is an open-source inference framework for large language models from the PACMAN group at Tsinghua University. It serves the same role as vLLM or SGLang — take an open-weight checkpoint, serve it behind an HTTP API with paged KV cache, tensor and pipeline parallelism and CUDA graphs — but with a much wider hardware target than most engines attempt.
That breadth is the point of the project. Alongside NVIDIA GPUs from flagship to older generations, it supports Huawei Ascend, Moore Threads, Muxi and Haiguang accelerators, and it can run CPU-only or in mixed CPU+GPU configurations. The model list covers the frontier Chinese open-weight families — DeepSeek (including DeepSeek-R1 671B), Qwen, GLM and Kimi — with the full matrix maintained in the repository's SUPPORTED_MODELS document.
Deployment comes in two shapes. Built from source it is a Python package launched through `torchrun`, with configuration passed as dotted key-value overrides on the command line. For production the project also publishes `chitu.run`, a single executable on the releases page that covers multi-node, multi-instance and prefill/decode-disaggregated topologies without a build step. The server exposes OpenAI-compatible `/v1/chat/completions` and `/v1/completions` endpoints as well as an Anthropic-compatible `/v1/messages`. The project is Apache-2.0, with third-party snippets marked by SPDX identifiers in `LICENSES/` and submodules keeping their own terms.
What it does
- Runs on NVIDIA GPUs across several generations, plus Ascend, Moore Threads, Muxi and Haiguang accelerators
- CPU-only and hybrid CPU+GPU deployment as well as single-GPU and multi-node clusters
- Paged KV cache, tensor and pipeline parallelism, CUDA graphs and MLA absorption options exposed as launch-time config keys
- Serves DeepSeek (including R1 671B), Qwen, GLM and Kimi checkpoints
- OpenAI-compatible chat and completion endpoints plus an Anthropic-compatible messages endpoint on the same port
- A single `chitu.run` executable for multi-node, multi-instance and prefill/decode-disaggregated deployments
Getting started
Two routes: download the packaged `chitu.run` executable from the releases page, or build from source. The source build needs the submodules, so clone recursively.
Clone with submodules
Third-party kernels live in `third_party/`, so a plain clone will not build.
git clone --recursive https://github.com/thu-pacman/chitu && cd chituInstall build dependencies and PyTorch
Pick the PyTorch wheel for your accelerator; the CUDA 12.4 index is the NVIDIA example from the project's own guide.
pip install -r requirements-build.txt
pip install -U torch --index-url https://download.pytorch.org/whl/cu124Build and install Chitu
Set `TORCH_CUDA_ARCH_LIST` to your GPU architecture. Optional extras such as `flash_mla` are installed the same way.
TORCH_CUDA_ARCH_LIST=9.0 pip install --no-build-isolation . \
-c <(pip list --format freeze | grep -v "flash-mla" | grep -v "flash_mla")Serve a model
Launch through torchrun; everything after `-m chitu` is configuration. This example serves DeepSeek-R1 across 8 GPUs on port 21002.
export WORLD_SIZE=8
torchrun --nnodes 1 \
--nproc_per_node 8 \
--master_port=22525 \
-m chitu \
serve.port=21002 \
infer.cache_type=paged \
infer.pp_size=1 \
infer.tp_size=8 \
models=DeepSeek-R1 \
models.ckpt_dir=/data/DeepSeek-R1 \
infer.mla_absorb=absorb-without-precomp \
infer.raise_lower_bit_float_to=bfloat16 \
infer.max_batch_size=1 \
infer.max_seq_len=4096 \
infer.use_cuda_graph=TrueCall it
The same port answers OpenAI-compatible and Anthropic-compatible requests.
curl localhost:21002/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "What is machine learning?"}
]
}'Commands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Serving a 671B-class open model on a cluster that is not all NVIDIA
- Standing up an OpenAI-compatible endpoint for DeepSeek, Qwen, GLM or Kimi checkpoints you host yourself
- Running inference where CPU capacity has to make up for limited accelerator memory
- Deploying multi-node or prefill/decode-disaggregated topologies from one executable rather than a built environment
How Chitu compares
Chitu alongside other open-source serving & deployment tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| Transformers | ★ 168k | Hugging Face Transformers is a Python framework that defines and runs state-of-the-art pretrained models for text, vision, audio, and multimodal tasks, for both inference and training. |
| vLLM | ★ 93.8k | A high-throughput LLM serving engine that uses PagedAttention and continuous batching to serve many requests at once. |
| SGLang | ★ 37.1k | A serving framework for LLMs and multimodal models that boosts throughput by reusing shared prompt prefixes across requests. |
| Modular Platform | ★ 29.9k | Modular's AI platform: the MAX inference framework with an OpenAI-compatible serving endpoint and GPU kernel library, plus the Mojo language and compiler. |
| TensorRT-LLM | ★ 14.8k | NVIDIA's library that compiles LLMs into optimized engines for the fastest inference on its data-center GPUs. |
| OpenLLM | ★ 12.6k | A tool to run any open-source LLM as an OpenAI-compatible API endpoint locally or in the cloud. |
| LMCache | ★ 12.1k | A KV-cache layer that stores and shares cached attention state across engines and requests to cut repeated computation. |
| Chitu | ★ 3k | An inference engine built to run frontier open models on whatever accelerators you actually have |