# KTransformers

- **ID:** 604
- **Kind:** code
- **URL:** https://github.com/kvcache-ai/ktransformers
- **Authors:** Hongtao Chen, Weiyu Xie, Boxin Zhang, Jingqi Tang, Jiahao Wang, Jianwei Dong, Shaoyuan Chen, Ziwei Yuan, Chen Lin, Chengyu Qiu, Yuening Zhu, Qingliang Ou, Jiaqi Liao, Xianglin Chen, Zhiyuan Ai, Yongwei Wu, Mingxing Zhang
- **Venue:** kvcache-ai (GitHub)
- **Published:** 2024
- **Source:** github
- **Access:** free
- **License:** Apache-2.0
- **License family:** Permissive (auto-classified)
- **Tags:** ktransformers, moe, inference, amx, cpu-gpu, sglang, llama-factory, deepseek, sosp-2025
- **Topics:** LLM inference, MoE, CPU-GPU hybrid serving
- **Added:** 2026-08-14
- **Verified:** 2026-08-14
- **Research status:** done
- **Page:** https://papers.projxon.ai/entries/604

## Summary

kvcache-ai/ktransformers is a CPU-GPU hybrid inference/SFT framework (MADSys Tsinghua / Approaching.AI / 9#AISoft). Current tree exposes kt-kernel serving (AMX/AVX INT4/INT8, NUMA-aware MoE, hot-GPU/cold-CPU experts, SGLang integration) and LLaMA-Factory SFT/DPO for ultra-large MoE on limited VRAM. README: DeepSeek-R1/V3 on a single 24GB GPU plus large DRAM; SFT DeepSeek-V3 ~80GB / 3.7 it/s on 4x RTX 4090, claimed 6-12x vs ZeRO-Offload in their MoE SFT benches. SOSP 2025 paper: AMX kernels, async CPU-GPU scheduling, Expert Deferral (CPU util <75% to ~100%, up to 1.45x extra throughput, <=0.5% avg accuracy drop). Apache-2.0. Docs site kvcache-ai.github.io/ktransformers.

## Attributes

- **Purpose:** Heterogeneous CPU-GPU inference and SFT for large MoE LLMs
- **Scale:** 19,235 stars; 1,523 forks at check. README: DeepSeek-R1-0528 FP8 8xL20 + Xeon Gold 6454S 227.85 tok/s total / 87.58 tok/s output (8-way). SFT: DeepSeek-V3 ~80GB total / 3.7 it/s on 4x4090; Qwen3-30B-A3B ~24GB / 8+ it/s on 1x4090.
- **Time period:** GitHub created 2024-07-26; pushed 2026-08-08; updated 2026-08-14. SOSP 2025 paper DOI 10.1145/3731569.3764843 (ACM published 2025-10-01). Discord posted 2026-07-17.

## From the source (fetched 2026-10-03)

- **Repository:** kvcache-ai/ktransformers (GitHub)
- **Created:** Jul 26, 2024 (GitHub)
- **Last push:** Oct 1, 2026 (GitHub)
- **Stars:** 19,559 (GitHub)
- **Forks:** 1,585 (GitHub)
- **Main language:** Python (GitHub)

## Research notes

- Primary: GitHub README + API (Apache-2.0, Python, 19235 stars / 1523 forks at check). Docs https://kvcache-ai.github.io/ktransformers/. SOSP 2025 paper DOI 10.1145/3731569.3764843; PDF https://madsys.cs.tsinghua.edu.cn/publication/ktransformers-unleashing-the-full-potential-of-cpu/gpu-hybrid-inference-for-moe-models/SOSP25-chen.pdf. Original integrated framework archived under archive/. Discord posted the repo. Inference/SFT framework, not a new hosted corpus, so no datasets_local row.

## Related entries

- Discussed in: [Mixture-of-experts language models: where the work is (overview)](https://papers.projxon.ai/entries/1206) (note, #1206)

## Similar entries

- [Full-Pipeline Inference Optimization for MiMo-V2.5 Series: Pushing Hybrid SWA Efficiency to the Limit](https://papers.projxon.ai/entries/468) (paper, #468)
- [FreeToken: Efficient Edge-Native MoE Serving with Bandwidth-Adaptive Execution](https://papers.projxon.ai/entries/694) (paper, #694)
- [Xor (juspay/xor) — TypeSafe-compatible System One MoE for typed decisions](https://papers.projxon.ai/entries/1027) (model, #1027)
- [Automated Tensor Scheduling for Hybrid CPU-GPU LLM Inference on Consumer Devices](https://papers.projxon.ai/entries/642) (paper, #642)
- [Kolibri-1: 78B Open-Weight MoE with 3.46B Active Parameters and Hybrid SWA](https://papers.projxon.ai/entries/1223) (model, #1223)
- [HySparse2: Hybrid Sparse Attention with Two-Level KV Sharing](https://papers.projxon.ai/entries/1031) (paper, #1031)
