TrendWhat rose on GitHub, every day at 07:30 KST · 한국어

GitHub · as of November 8, 2026 · View on GitHub →

FareedKhan-dev/kimi-k3-in-c

CPU LLM inference engine

trending one of the last 30 days

Run a 2.78-trillion-parameter model on an 8GB RAM laptop

This C-based engine allows you to run a massive language model directly on a desktop computer rather than a data center. Designed to perform inference with only 8GB of memory, it handles a 1.56TB model file without requiring a GPU or complex frameworks, producing identical results using pure CPU processing.

Four strategies to overcome memory limits

The core of this project is how it handles models that do not fit in memory. First, Expert layers are read directly from disk in a 4-bit quantized state to perform multiplication, minimizing memory usage. Second, it uses KDA (Linear Attention) and MLA (Multi-head Latent Attention) to prevent memory from growing indefinitely. Additionally, the 93-layer Trunk is read in a streaming fashion so that only the necessary parts are loaded into memory, while the remaining 1.45TB of routed experts are managed with an LRU cache. These four decisions ensure identical byte-level output across various memory environments ranging from 8GB to 224GB.

Installation and execution procedure

You need approximately 1.7TB of storage space before starting, as you must store the 1.56TB checkpoint and the 109GB packed Trunk file. Linux x86-64 is the baseline, with support for macOS and Windows. The compiler must be GCC 9 or higher, or Clang 10 or higher, and OpenMP is required. You can build with make -j and verify the engine's accuracy without downloading the model by passing make test. For actual inference, use a HuggingFace token to download the model, pack the Trunk with the pack-trunk.sh script, and then run the k3 binary.

Performance and memory usage

Larger memory capacity leads to faster speeds, but the results remain the same. On a standard laptop with 8GB of RAM, it takes about 26.5 seconds per token, with the model streaming from disk. At 32GB, the time drops to 24.2 seconds, and at 64GB, it is 19.8 seconds. On workstations with 128GB or more, the model fits entirely in memory, eliminating disk wait times and speeding up to 5.6 seconds per token. The ultra preset is a minimal configuration for 8GB-class devices, maintaining precision and routing but running slower. The server preset fixes 90 of the 93 layers to provide the fastest performance.

When to choose this engine

This repository is suitable if you want to experiment with large models in environments without a GPU or where cloud costs are a burden. Written in C99, it has minimal dependencies and can be deployed lightly as a 176KB engine binary. However, it assumes you have sufficient disk space to download and store the 1.56TB model file. It is also recommended to check for CPU support of the AVX2 or NEON instruction set and the presence of a fast NVMe drive. Slow storage devices can become a bottleneck during the streaming phase, so Trunk files should be placed on the fastest local disk possible.

Written by AI from this repository's README on November 4, 2026. For the facts, the original on GitHub is the reference.

By the numbers

GitHub trending history
1 day between Jun 19, when Trend began recording, and Nov 8, 2026 · first on Nov 4 · best daily rank #11 (Nov 4)

Read from GitHub, as of November 8, 2026.

Language
C
Topics
avx2 · c99 · cpu-inference · deep-learning · from-scratch · inference-engine · kimi-k3 · linear-attention
Stars
11,309
Contributors
10
Forks
1,765
Latest release
v1.1.0 · October 2, 2026
Commits
98
Last commit
October 2, 2026
Open issues
2
Open pull requests
26

Related repositories

View on GitHub → · Homepage

README badge

trend.ondo.sh · GitHub daily trending #11 · November 4, 2026

The badge above shows the highest this repository has ranked on GitHub's daily trending since June 19, 2026, and the day it did. Paste the Markdown below into your README. The badge opens this page, and it updates by itself when the repository climbs higher.

[![trend.ondo.sh](https://trend.ondo.sh/github/r/FareedKhan-dev--kimi-k3-in-c/badge.en.svg)](https://trend.ondo.sh/github/r/FareedKhan-dev--kimi-k3-in-c/en.html)