ReleaseCode / SDK · ActionableGitHub Trending AI→ original

Kimi K3 runs a 2.78-trillion-parameter model in 8.24 GB of memory

The kimi-k3-in-c project addresses a familiar problem: the model does not fit in RAM. The engine keeps the necessary layers and cache in RAM while reading the remaining weights from NVMe as computation proceeds. The author reports running Kimi K3 with 2.78 trillion parameters at a peak memory footprint of 8.24 GB, but the memory savings come at the cost of speed: on the minimum configuration, one token takes about 26.5 seconds. This is not yet suitable for a chat product, but for engineers it offers a clear demonstration of memory-constrained inference.

AI-processed from GitHub Trending AI; edited by Hamidun News
Kimi K3 runs a 2.78-trillion-parameter model in 8.24 GB of memory
Source: GitHub Trending AI. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceGitHub Trending AI ↗
Editor-in-Chief
Key metric #1A full run requires about 1.7 TB of free space and a fast NVMe drive.
Key metric #2The engine is written in C99 and requires no GPU, BLAS, or ML frameworks.
Key metric #3The more weights fit in RAM, the less time the engine spends waiting for disk reads.

Running a 2.78-trillion-parameter model in eight gigabytes of memory sounds like a magic trick. The kimi-k3-in-c repository reveals the trick: the model does not fit in RAM, and it does not try to. The engine keeps only its working set in memory and reads most of the weights from storage as computation proceeds.

According to the author's measurements, a full Kimi K3 run reaches a peak RAM footprint of 8.24 GB. No GPU, BLAS, or conventional ML framework is required: the core is written in portable C99. The downside of that impressive figure is a 1.56 TB checkpoint, an additional 109 GB packed file for the dense portion of the model, and tens of seconds of waiting for every token.

How the model fits into ordinary memory

Imagine a cabinet from which you need only one drawer at a time. There is no reason to drag the entire cabinet onto the desk: simply open the required drawer, process its contents, and move on to the next. Here, the fast NVMe drive serves as the cabinet, while RAM is the desk.

Kimi K3 uses a sparse architecture: only some experts are active at each step. The engine reads the selected expert weights directly in packed four-bit form, retains recently used data in an LRU cache, and streams the dense layers sequentially. The cache size and the number of layers kept permanently in memory can be adjusted for a particular machine.

According to the published table, a configuration with 8 GB of RAM produces a token in approximately 26.5 seconds. With 64 GB, that falls to 19.8 seconds; with 128 GB or more, it drops to 5.6 seconds because disk waiting almost disappears. The author says the result remains byte-for-byte identical for the same prompt: only the execution time changes, not the computation.

A simple example continues the phrase “The capital of France is”. On the minimum configuration, the engine generated eight tokens in 261.5 seconds with a peak footprint of 8.24 GB. That is far too slow for an end-user chat interface, but enough to prove that the approach works and to explore the model without a rack of accelerators.

What it requires in practice

The main constraint is storage, not RAM. The checkpoint, packed dense portion, and supporting files require about 1.7 TB of free space. A fast local NVMe drive is advisable: when the weights do not fit in memory, storage participates in the generation of every token. The result will take even longer on a slow SSD.

Building the project requires a C99 compiler, OpenMP, and a processor with AVX2/FMA on x86-64 or NEON on Arm. The repository supports Linux, macOS, and Windows. You can build the engine and run its test suite without downloading the multi-terabyte model: it compares operations and generated tokens against a reference implementation using a reduced model with the same computational structure.

The published figures should, however, be treated as the author's own results rather than an independent benchmark. The minimum mode is a technical feasibility demonstration, not a production-ready inference server. The first release has no tools, image support, API server, or conversation-history compression. Even a powerful workstation remains substantially slower than a GPU-based cloud service.

Why developers should study this code

The project's value does not lie in a promise to replace a GPU with eight gigabytes of RAM. It demonstrates four useful techniques in concrete code: streaming layers, operating on quantized weights without unpacking the entire array, maintaining a bounded expert cache, and assigning separate memory budgets to different parts of the model.

If you are building a local tool, an edge application, or an offline prototype, these techniques can be transferred to reasonably sized models and deliver practical performance. Product teams should begin with acceptable latency: if the user expects an answer within seconds, this Kimi K3 setup is unsuitable. If the task is a batch experiment, an architecture audit, or operation in an environment with no accelerator at all, the repository shifts from a stunt to a useful engineering guide.

Story

Key Questions Answered

How the model fits into ordinary memory?

Imagine a cabinet from which you need only one drawer at a time. There is no reason to drag the entire cabinet onto the desk: simply open the required drawer, process its contents, and move on to the next. Here, the fast NVMe drive serves as the cabinet, while RAM is the desk. Kimi K3 uses a sparse architecture: only some experts are active at each step.

What it requires in practice?

The main constraint is storage, not RAM. The checkpoint, packed dense portion, and supporting files require about 1.7 TB of free space. A fast local NVMe drive is advisable: when the weights do not fit in memory, storage participates in the generation of every token. The result will take even longer on a slow SSD. Building the project requires a C99 compiler, OpenMP, and a processor with AVX2/FMA on x86-64 or NEON on Arm. The repository supports Linux, macOS, and Windows.

Why developers should study this code?

The project's value does not lie in a promise to replace a GPU with eight gigabytes of RAM. It demonstrates four useful techniques in concrete code: streaming layers, operating on quantized weights without unpacking the entire array, maintaining a bounded expert cache, and assigning separate memory budgets to different parts of the model. If you are building a local tool, an edge application, or an offline prototype, these techniques can be transferred to reasonably sized models and deliver practical performance.

ZK
Zhemal Khamidun — CPO at Alpina Digital, product manager of AlpinaGPT. Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Unified AI Workspace · Nomad

Test Frontier LLMs & Autonomous Agents in One Workspace

Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.

Try Nomad AI →Launch Nomad Agent
What do you think?
Loading comments…