# kimi-k3-in-c

> An inference engine in portable C99 that runs the 2.78-trillion-parameter Kimi K3 on one CPU with 8 GB of RAM

Source: https://talira.ai/catalog/kimi-k3-in-c-2m92j5h6
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Command-line tool
- Categories: [ai / inference / engines](https://talira.ai/categories/ai/inference/engines)
- Platforms: linux, macos, windows[^1]
- Licence: Apache-2.0[^2]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [Fareed Khan](https://talira.ai/orgs/fareedkhan-dev.md)

kimi-k3-in-c is an inference engine for Moonshot AI's [Kimi K3](https://talira.ai/catalog/kimi-k3-7trw0x1q.md) written in portable C99, with no BLAS, no framework and no GPU. Because Kimi K3 is a mixture of experts, the engine streams the experts it needs from disk on each step, so the full 2.78-trillion-parameter model runs on a machine with 8 GB of RAM; more memory only makes it faster (about 26.5 seconds a token at 8 GB and 5.6 seconds at 128 GB or more in the maker's measurements), and the output is the same at every size. It builds with make or CMake into a `k3` command that takes the directory of `.safetensors` shards and a prompt, with presets for different memory sizes and a chat mode. It runs on x86-64 Linux with AVX2 and FMA, and also builds on macOS on arm64 and on Windows; Python scripts download and pack the weights. Its test suite runs without the model.

## Links

- GitHub: https://github.com/FareedKhan-dev/kimi-k3-in-c

## Problems it solves

- run a trillion-parameter mixture-of-experts model on a computer without a GPU
- run Kimi K3 locally on a CPU with little RAM
- a dependency-free C inference engine I can read and build myself

## Features

- runs Kimi K3 on a CPU by streaming its experts from disk, from 8 GB of RAM up
- byte-identical output whatever the machine's memory, with presets for each memory size
- builds with make or CMake from seven C files, with OpenMP
- a test suite that checks the engine without downloading the model

## Limitations

- The Kimi K3 checkpoint is 1.56 TB, and the engine needs about 1.7 TB of free storage, ideally a fast local disk.[^1]
- Generation is slow on ordinary machines: about 26.5 seconds per token with 8 GB of RAM in the maker's measurements.[^1]

## Trust

Overall: 0.71 out of 1.
Signals: maintenance 1.00, adoption 0.82, momentum 1.00, community 0.47, backing 0.30, extensibility 0.00.

- last commit 13 days ago
- 78 commits in the last 90 days
- latest release v2.0.0 14 days ago
- 12.8k GitHub stars
- fast-growing: 12.8k stars in 4 months
- 14 contributors
- backed by Fareed Khan

Warnings:

- young project (first commit 4 months ago)

## Related

- Works with [Kimi K3](https://talira.ai/catalog/kimi-k3-7trw0x1q.md)

## Alternatives

- [llama.cpp](https://talira.ai/catalog/llama-cpp-g0rydd64.md): LLM inference in C/C++
- [colibri](https://talira.ai/catalog/colibri-ek67b5xz.md): Runs huge mixture-of-experts models on ordinary hardware by streaming experts from disk
- [KTransformers](https://talira.ai/catalog/ktransformers-n99jxp94.md): Run and fine-tune huge mixture-of-experts LLMs on limited GPUs by splitting work between CPU and GPU
- [FreeToken](https://talira.ai/catalog/freetoken-kbfpyv4p.md): Serving engine that runs frontier-scale open-weight MoE models on consumer GPUs
- [ExLlamaV3](https://talira.ai/catalog/exllamav3-4w5ntccq.md): Quantisation and inference library for running LLMs locally on consumer GPUs
- [TensorRT-LLM](https://talira.ai/catalog/tensorrt-llm-343p07g7.md): Optimized LLM and visual generation inference on NVIDIA GPUs

## Sources

[^1]: https://github.com/FareedKhan-dev/kimi-k3-in-c/blob/main/README.md (checked 30 Nov 2026)
[^2]: https://github.com/FareedKhan-dev/kimi-k3-in-c/blob/main/LICENSE (checked 30 Nov 2026)
