RepositoryCPKPakistan
FareedKhan-dev

FareedKhan-dev/kimi-k3-in-c

A 2.78-trillion-parameter Kimi K3 running inference on a single CPU in 8.24 GB of RAM. Portable C99: no BLAS, no framework, no GPU.

12.8kstars
2.0kforks
5issues
25views

Thành tựu nổi bật

Những danh hiệu mới nhất của dự án

1
TINIX TRENDING·Quốc gia: PK

#1 Repository Của Tháng

1
TINIX TRENDING·Chủ đề: linear-attention

#1 Repository Của Tuần

1
TINIX TRENDING·Chủ đề: c99

#1 Repository Của Tuần

🚀 2.78 Trillion Parameters, 8 GB of RAM, Zero GPU

A 2.78T-parameter Kimi K3 model runs inference on a single CPU in 8.24 GB RAM using portable C99 — no BLAS, no framework, no GPU.

kimi-k3-in-c by FareedKhan-dev implements Kimi K3 inference entirely in C99, designed to run on ordinary hardware. Despite the model’s massive 1.56 TB checkpoint size, this engine streams and compresses data so that generation works in as little as 8.24 GB of memory. Output remains byte-identical across all memory budgets.

✨ Highlights

  • 2.78T parameters: Full-scale Kimi K3 model runs on consumer hardware.
  • 8.24 GB peak RSS: Measured memory usage on laptop preset.
  • Portable C99: No external dependencies; compiles with a simple Makefile.
  • No BLAS/GPU: Inference runs purely on CPU without math libraries or accelerators.
  • Streaming trunk: Dense layers stay resident; experts remain off-disk and load on demand.
  • 4-bit expert packing: Routed experts are unpacked directly from packed 4-bit form.
  • Byte-identical output: Same results at 8 GB and 224 GB memory budgets.
  • Built-in tokenizer: Reads tokens byte-for-byte with no external libraries.

💡 Why it matters

This project demonstrates that large language model inference doesn’t require clusters or GPUs. By applying four key memory reductions — packed 4-bit experts, KDA attention, MLA compression, and trunk streaming — it brings a 1.56 TB model down to run on a laptop. It’s ideal for developers exploring CPU-only inference, edge deployment, or building minimal LLM engines from scratch.


#KimiK3 #LLM #C99 #InferenceEngine #TiniX

Similar Projects

Discover other similar projects and AI models.

RepositoryPython
rohitg00/ai-engineering-from-scratch

Learn AI Engineering! Learn it. Build it. Ship it for others.

81.4k
Nov 30, 2026
RepositoryC
prabanta-dev/janas

37 tok/s from Qwen3-Next-80B (48 GB) on a 32 GB laptop, 24 without drafts vs 2.8 for llama.cpp; reading 62 vs 16 tok/s. Faster than llama.cpp on all 13 models compared in Q4_K_M. LLMs bigger than your RAM, pure C, CPU or GPU.

758
Dec 1, 2026
RepositoryC
facex-engine/facex

Full face stack that runs entirely in the browser. Detection, 576-point 3D mesh, recognition, anti-spoof, smile — all WebAssembly, zero server. Apache 2.0.

352
Nov 27, 2026
RepositoryPython
opensetlabs/openset-llm

Fast local LLM inference on plain CPUs. No GPU, 8 GB of RAM. OpenAI-compatible server.

3.2k
Dec 2, 2026
RepositoryJupyter Notebook
rasbt/LLMs-from-scratch

Implement a ChatGPT-like LLM in PyTorch from scratch, step by step

109.4k
Nov 26, 2026
RepositoryTypeScript
firecrawl/firecrawl

Firecrawl is the knowledge infrastructure to make your agents smarter. It connects your agents to the web, and to Alexandria, our library of everything else.

215.1k
Dec 2, 2026
RepositoryPython
datawhalechina/zero-to-sglang

Official SGLang x Datawhale course on LLM inference: understand inference, build a mini-sglang from scratch, then read the real SGLang source and land your first PR. Available in English and Chinese.

2.4k
Nov 17, 2026
RepositoryC++
xLLM-AI/xllm

A high-performance inference engine for LLM, VLM and DiT models, optimized for diverse AI accelerators. It is hosted in OpenAtom Foundation.

1.6k
Dec 2, 2026
RepositoryRust
lucienhuangfu/eLLM

eLLM: Faster Agent Inference on CPUs Than on GPUs

602
Nov 26, 2026