Skip to main content
Training & Fine-tuningLocal-first

KTransformers

kvcache-ai / ktransformers

Heterogeneous-hardware inference and fine-tuning: offload MoE experts to CPU/RAM so a small GPU can run large models.

19.7k stars 1601 forks Python Language Apache-2.0 License Last push 2026-11-13

Why choose it

  • MoE models do not need to fit entirely in VRAM — useful for local large models.
  • Supports Intel/AMD CPUs with selected GPU combinations.
  • Covers both fine-tuning and inference.

Not for

For general, stable production inference, prefer vLLM/SGLang.
Hardware combinations are constrained; not every model is supported.

Minimum setup

  1. Confirm CPU instruction set, RAM size and GPU model are on the supported list.
  2. Run a small MoE model with the official script; record VRAM and RAM use.
  3. Switch to the target model and check expert hit rate and tokens/s.

Dependencies and cost

Python + PyTorch; needs enough system RAM; some kernels require specific CPUs/GPUs.

License and usage boundaries

Code is Apache-2.0; model weights and datasets carry their own licenses.

Open source is not automatically commercial-use friendly: GPL / AGPL are copyleft; code, model and output licenses are separate. Read the LICENSE and model card before launch, and involve legal when needed.

Alternatives and neighbors

  • Ollama — Start here,Pull and run local models with one command, with a built-in model library and an OpenAI-compatible API.
  • llama.cpp — Local-first,A C/C++ inference engine that runs on CPUs, Apple Silicon and consumer GPUs, with a wide range of quantisation formats.

Next steps

  • Open GitHub and read the README, LICENSE, latest release and issues first.
  • Make an onboarding checklist for deployment dependencies, VRAM, data, network and permissions.
  • Run a small sample first, then decide on production; never start with production data.

GitHub repository ↗ Docs ↗ Add to compare

Snapshot: stars / forks / language / license / pushed_at come from the GitHub API snapshot on 2026-11-20; later changes are not written back. Tags and “fit / not fit” are editorial judgments, not GitHub metadata.
No endorsement: this site only indexes and flags risks; it does not audit code, guarantee security or make license decisions for you. Review repository scripts and model weights yourself.