Devotd Github
NewInference & serving

giveen/decapybara — a C++20·CUDA reimplementation of the MegaCapybara inference server

giveen/decapybara published the entire source of a C++20·CUDA-based LLM inference server with its first commit on October 11, 2026.

Repositorygiveen/decapybara ↗

giveen/decapybara published the entire source of a C++20·CUDA-based LLM inference server with its first commit on October 11, 2026.

GitHub description: Open-source C++20 and CUDA reconstruction of the MegaCapybara inference server

stars
★ 2
Forks
0
Language
C++
Read original source ↗View on GitHub ↗

A first commit was made to giveen/decapybara on October 11, 2026. It is sha 674b80a, with 2406 lines added and no deletions. The README describes this repository as an open-source C++20·CUDA reimplementation of the MegaCapybara inference server, and states the goal as running Qwen3.8-27B on NVIDIA RTX 5090 (Blackwell) hardware. It is a bundle that publishes the whole codebase of a local LLM serving server all at once.

The structure consists of three parts. The inference server decapybara provides OpenAI-compatible (/v1/chat/completions, /v1/completions, /v1/models) and Anthropic-compatible (/v1/messages) HTTP APIs, and manages the KV cache in three tiers, from VRAM through a pinned RAM pool down to disk slot paging. It also includes a .mcapy tensor container reader with a 144-byte fixed header, a BPE tokenizer with ChatML templating, and LoopGuard, which blocks repetitive generation. The CUDA kernel suite targets Blackwell and includes megakernel.cu, which runs a single-launch persistent decode loop; mx_gemv.cu, a blocked matrix-vector multiply for NVFP4/MXFP8; attn_prefill.cu, a FlashAttention prefill that performs KV dequant; moe.cu, a Top-8 gating MoE router; drafter.cu, DFlash speculative probability-tree search; and act_quant.cu, MXFP8 activation quantization in units of 32. The auxiliary executable DecapybaraLauncher handles GDDR7 VRAM·RAM capacity estimation, automatic model discovery and speculative drafter pairing, and the MaxEfficiency·Medium·MaxQuality presets.

That said, this code is not the original but a reimplementation. The kernel comments state that they were recovered by reverse-engineering Blackwell-specific PTX such as act_quant.sm_120a.ptx, and the original file paths also remain untouched. The license is stated only as MIT in the README, and there is no license file in the commit. No performance figures, accuracy validation, or test procedures are presented; the build requires Linux x86_64 (glibc 2.38 or later), a C++20 compiler, CUDA 12 or 13, and CMake 3.20 or later, and sets CUDA_ARCHITECTURES to all. Since this is code premised on a single RTX 5090 and a specific model combination, it is premature to judge from the record alone how it behaves on other GPUs or with other models.