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.
C avx2c99cpu-inferencedeep-learningfrom-scratchinference-enginekimi-k3linear-attentionllmllm-inferencemachine-learningmemory-efficientmixture-of-expertsmoemxfp4quantizationsimdsystems-programmingtransformerzero-dependencies
Contributors
People outside the project who have landed real fixes or features in this codebase.
GitHub's contributor list is built from commit authors. Most of the pull requests below were rebased and squash-merged by hand to clear conflicts with other work landing at the same time, and those commits went in under the maintainer's name, so that list misses most of the people here. This file is the correct record. Pull requests merged after v1.1.0 are committed under their author's name.
- douglasmun -- got the engine building and passing the test suite on macOS / Apple Silicon.
- cwwjacobs -- verified checkpoint downloads against Hub checksums; added the synthetic trunk streaming regression test covering the one-slot guard and two-slot async prefetch.
- mahavak -- regenerated the tiny checkpoint fixture used for end-to-end test runs.
- sulfierry -- fixed the Hugging Face checkpoint
download for the current
hfCLI. - Barba2k2 -- overlapped trunk reads with layer
compute; made CI install the Python tool versions
pyproject.tomlalready pins, instead of whatever was newest that day. - ShaalanMarwan -- fixed the CMake build on
ARM64/AArch64, where the x86-specific
-mavx2/-mfmaflags were applied unconditionally. - TROY665 -- the in-register MXFP4 nibble decode that took the expert matmul kernel about 1.6x faster, bit-identical; found and fixed the bf16 benchmark weights that made the documented bit-identity hash check unwinnable.
- ysgao -- macOS/Apple Silicon download-script
portability, and the Darwin
pread()2 GiB ceiling that failed on the embedding table and a packed trunk layer. - openchat-ai -- the flat-row AVX2 fast path for the MXFP4 kernel, about 1.56x over the nibble-decode kernel it built on.
- arafatsolok -- NEON ports of the bf16, MXFP4 and q8 matmul kernels, so Apple Silicon and ARM server builds are no longer scalar only.
- genesisrevelationinc-debug --
native Windows support via MinGW-w64, including the heap-corruption bug from pairing
_aligned_mallocwith plainfree(). - AuricTW -- the opt-in
ultrapreset that keeps the complete model within an 8 GB class memory budget, verified with four full runs on a Jetson Orin Nano Super against the real checkpoint. - biokraft -- proposed the CMake CI regression job
that actually builds and tests the CMake path (previously documented as
interchangeable with Make but never verified in CI), and pinned Python tool
dependencies in
pyproject.toml. - cablepull -- the parallel-chunked trunk reader
that takes the streamed trunk off queue depth 1; the
--stop-idflag, with the emit-time check that truncates a speculative sweep exactly like serial decode; and running the incremental prefill on--gen 0so a fixed prefix can be warmed once and resumed from a byte-exact state. - Avicennasis -- hardened
--stop-idparsing against silent typos, added itsstopped_atline tok3_run.jsonand a weightless contract gate, and keptk3_run.jsonvalid when--gen 0generates nothing; carried the XTML chat REPL forward with the tokenizer bundle dropped,--no-thinkand--thinking-effort, and the Windows portability fixes it needed (getline,fsync, and arenamethat actually replaces an existing file); found and fixed the missing OpenMP link on the CMake Apple/libomp path; carried Deobot2's trunk pinning and prefetcher work through review, with the synthetic trunk test adapted to it; Ctrl-C that stops at a safe point and still writes everything; a checksummed state file published by atomic rename; chat turns that reuse the previous turn's state behind a bit-exact gate; available memory that is real on macOS and capped by commit headroom on Windows; missing-shard diagnostics that name the file; and safetensors span checks validated against every shard of the released checkpoint. - Deobot2 -- largest-first trunk pinning, the
--trunk-ringflag, and two prefetcher re-read bugs found by instrumentation rather than by inspection. - Blake Evans -- the original K3 XTML chat core and REPL, reproducing the checkpoint's own chat format so the engine answers a chat-shaped prompt instead of completing it.
- FermiHart -- a set of parser hardening fixes
across the safetensors reader, the trunk reader, and the vendored JSON library:
integer-overflow saturation, offset and size checks that run before the arithmetic
they protect rather than after, a library that no longer calls
exit()on an allocation failure, and a new weightless fault-injection test; a batched MoE prefill path that read uninitialized memory on an expert load failure instead of contributing zero, exactly as the per-token path already does; and CLI refusals for a malformed--idslist, an out-of-range--layers, and a lost--outfile; a strict JSON parser that refuses truncated input instead of reading past it; a trunk.json leak on the refusal path; sampler tests that run without the tokenizer; and--top-kfor chat. - santhoshsathish94 -- found that
--preset autocould never start on the machines it was written for and fixed it, with the measurements that made the thread-count default change a clear call; split expert reads so a batch no longer waits on its slowest read. - Irfanwani -- the
--layers Ndownload mode, so the pipeline can be exercised on a disk too small for the checkpoint.
Thank you, all of you.