# 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.

Repository: https://github.com/FareedKhan-dev/kimi-k3-in-c
Canonical: https://ross.abutalabs.com/products/kimi-k3-in-c
Homepage: https://medium.com/@fareedkhandev/building-kimi-k3-in-c-to-run-a-2-8t-model-on-consumer-hardware-a5792cbf3b59
Language: C
License: Apache-2.0
License Family: permissive
Topics: avx2, c99, cpu-inference, deep-learning, from-scratch, inference-engine, kimi-k3, linear-attention, llm, llm-inference, machine-learning, memory-efficient, mixture-of-experts, moe, mxfp4, quantization, simd, systems-programming, transformer, zero-dependencies
Last push: 2026-08-26T07:36:53+00:00

## Health v2 (maintenance only)
Score: 79/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 96, longevity 2
- inputs: {"age_days": 32, "days_push": 7, "days_rel": 26, "gap_med": 5, "n_releases_24m": 2}
- flags: young
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 6524, forks 1062 (observed 2026-08-28T04:09:44.787360+00:00)

## What it is
A dependency-free C99 inference engine that runs the 2.78-trillion-parameter Kimi K3 model on a single CPU with as little as 8 GB of RAM by streaming quantized (MXFP4) weights from disk. The entire engine is ~176 KB with no BLAS, framework, or GPU requirement, using SIMD (AVX2), mixture-of-experts, and linear attention.

## Use cases
- run a trillion-parameter LLM on a laptop without a GPU
- llm inference in pure c with no dependencies
- run kimi k3 locally on cpu
- study how transformer inference engines are built from scratch
- quantized mxfp4 model inference with low memory
- cpu-only inference with simd avx2 optimization

## When to choose
- you want to run a very large LLM on commodity CPU hardware with no GPU
- you need a minimal, zero-dependency, portable C inference engine to read or modify
- you want to learn how MoE, linear attention, and quantized inference work at the systems level

## When to avoid
- you need fast, production-grade token throughput - even high-RAM machines take seconds per token
- you want GPU acceleration or a mature ecosystem of tooling and integrations
- you need multi-user serving or an API server rather than single-prompt local inference

## Facets
- artifact type: library
- maturity: active
- function: llm-inference, machine-learning, deep-learning
- domain: large-language-models, deep-learning, machine-learning, developer-tools
- platform: c, cli, cross-platform
- tags: cpu-inference, mixture-of-experts, linear-attention, quantization, mxfp4, simd, avx2, zero-dependencies, transformer, memory-efficient, from-scratch, systems-programming, linux

## Member repositories
- FareedKhan-dev/kimi-k3-in-c (main) score 79

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:44.787360+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:44:10.084249+00:00, confidence not recorded.
  - readme: https://github.com/FareedKhan-dev/kimi-k3-in-c (fetched 2026-08-28T04:09:44.787360+00:00, sha 447c3a05f2cb)
- Data as of 2026-08-30T08:39:29.467469+00:00.
