AIAny
AI Infra2024
Icon for item

KTransformers

Runs huge mixture-of-experts LLMs like DeepSeek-R1/V3 on a single 24GB GPU plus CPU DRAM by keeping attention on the GPU and offloading expert weights to CPU. Reports 3-28x speedups via Intel AMX/AVX512 kernels and fits 139K context in 24GB VRAM.

Introduction

Conventional wisdom says a 671B-parameter model needs a rack of datacenter GPUs. KTransformers bets on a different bottleneck: in a mixture-of-experts model, only a few experts fire per token, so the dense, latency-critical attention layers belong on the GPU while the sparse expert weights can sit in cheap CPU DRAM. That single placement decision is what lets a desktop with one 24GB card and a big-memory motherboard run DeepSeek-R1/V3 at all.

What Sets It Apart
  • A templated injection framework lets you swap modules with a YAML rule instead of forking the model code, so new MoE architectures get wired up by configuration rather than rewrites.
  • Expert computation rides Intel AMX and AVX512/AVX2 kernels with NUMA-aware memory management, turning the CPU from a fallback into a real compute tier.
  • The reported gains are concrete, not vague: 3-28x speedups depending on workload, and 139K-token context for DeepSeek-V3/R1 squeezed into 24GB of VRAM.
  • It is not just inference — the same offloading powers SFT, with claims of 6-12x training speedup versus ZeRO-Offload and Qwen3-30B-A3B fine-tuning on a single RTX 4090.
Who It's For

Great fit if you have a serious CPU and DRAM budget but limited GPU VRAM and want to experiment locally with frontier MoE models like DeepSeek, Kimi-K2, GLM, or Qwen3-Next. Look elsewhere if you need maximum tokens-per-second at scale — a fully GPU-resident deployment will beat CPU offloading on raw throughput, and the CPU path leans on Intel AMX/AVX512, so older or AMD hosts see smaller wins.

How the Offloading Works

The split is structural rather than ad hoc: attention and the shared dense path stay GPU-resident for low latency, while routed expert FFNs are quantized (INT4/INT8/FP8/IQ1_S) and served from DRAM only when the router selects them. Because active parameters per token stay small, host-device transfer and CPU compute stop being the wall they are for dense models of the same size.

Information

  • Websitegithub.com
  • OrganizationsMADSys Lab, Tsinghua University, Approaching.AI, 9#AISoft
  • Authorskvcache-ai (maintainers / MADSys group, Tsinghua University & contributors)
  • Published date2024/07/26

Categories

More Items

GitHub
AI Infra2025

Defines a vendor-neutral JSON/YAML semantic model specification and tooling to exchange metrics, dimensions, lineage and other business semantics across analytics, AI and BI platforms; includes a core spec, validators, converters (dbt, GoodData, Salesforce) and example models.

GitHub
AI Train2025

An asynchronous, high-throughput framework for large-scale reinforcement learning and agentic training that scales to 1T+ MoE models and 1000+ GPUs, with native verifiers integration, end-to-end SFT/RL/evals, and Slurm/Kubernetes deployment; requires NVIDIA GPUs.

GitHub

Runs a self-hosted meeting bot and transcription API that joins Google Meet, Teams and Zoom and streams speaker-attributed transcripts in real time. Compiles meetings into a git-backed Markdown workspace and runs sandboxed agents on your infrastructure; Apache-2.0 and air-gap capable.