Skip to content

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.

docs: say how to run the tokenizer gate without the checkpoint

FareedKhan-dev90f48a47d5cc
diff --git a/docs/TESTING.md b/docs/TESTING.md
index f18e96a..25261f5 100644
--- a/docs/TESTING.md
+++ b/docs/TESTING.md
@@ -43,8 +43,25 @@ With `tools/tok_parity.py` it also compares token-for-token against the referenc
tokenizer across CJK, emoji, ZWJ sequences, accents, contractions and whitespace runs.
This is the one gate that cannot run on a clean checkout: `tiktoken.model` has 163,584
entries and ships with the checkpoint, not with this repository. `make test` reports it as
-**NOT RUN** rather than passing it quietly. Point `TOK_FILES` at a downloaded checkpoint
-to run it: `make tok TOK_FILES=~/k3model`.
+**NOT RUN** rather than passing it quietly.
+
+You do not need the 1.56 TB checkpoint to run it. Four small files are enough, about
+2.8 MB in total:
+
+```bash
+hf download moonshotai/Kimi-K3 \
+ tiktoken.model tokenizer_config.json config.json tokenization_kimi.py \
+ --local-dir ~/k3tok
+
+make test TOK_FILES=~/k3tok # the roundtrip leg now runs
+make tok TOK_FILES=~/k3tok # token-for-token parity, needs `pip install tiktoken`
+./bin/test_cfg real ~/k3tok/config.json # the released nested config
+```
+
+`tokenization_kimi.py` is required by `tools/tok_parity.py`, which reads the split regex
+out of it rather than restating it; without that file the parity run stops before its
+first case. The roundtrip leg in `make test` needs only `tiktoken.model` and
+`tokenizer_config.json`.
**`k3_model`**, the end-to-end gate, on a tiny model whose tensor graph matches the released
architecture exactly:
diff --git a/scripts/k3-doctor.sh b/scripts/k3-doctor.sh
index b3d9603..fee2cba 100755
--- a/scripts/k3-doctor.sh
+++ b/scripts/k3-doctor.sh
@@ -87,7 +87,7 @@ else
# people their machine was broken when the only thing they could not do was the one
# thing that needs 1.56 TB of disk they also did not have.
warn "under 10 GB available, below the floor for running the checkpoint (~8.2 GB peak RSS)"
- printf ' %s the build and \`make test\` need no weights and work fine here%s\n' \
+ printf ' %s the build and "make test" need no weights and work fine here%s\n' \
"$DIM" "$RST"
fi