Who it is forA systems researcher who wants to study how the routed-expert cache behaves under real Kimi K3 routing.
The problemTuning a cache for a 2.78T mixture model needs real routing data, and guessing from theory is unreliable.
The outcomeA directory containing expert_hist.json and expert_trace.bin, ready to replay with tools/sim_cache.py.
What you need first
- A checkpoint directory of .safetensors shards (1.56 TB on disk for the released checkpoint)
- A packed trunk directory, created in a step the README excerpt does not show
- tiktoken.model and tokenizer_config.json in a directory, for text input
- A machine with a C toolchain for the portable C99 build (build steps are not in the excerpt)
- An HF_TOKEN environment variable if you use download-model.sh
Steps
- Build the engine and download the checkpoint and trunk as in the batch use case. (inferred, check the README)
- Run a generation with --dump-cache-trace <trace_dir> added to the laptop preset command. (inferred, check the README)
- python tools/sim_cache.py <trace_dir> (inferred, check the README)
Prompt for your agent
In the repo FareedKhan-dev/kimi-k3-in-c, run a short generation with --dump-cache-trace <trace_dir> and --incremental. Expect expert_hist.json and expert_trace.bin in that directory. Verify both files exist and are non-empty before replaying them with tools/sim_cache.py.
Caveat. The README does not show the exact arguments for sim_cache.py, so check its usage in the tools folder before running it.
Get 5 new use cases every morning. Free, one short email, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Disclaimer
Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page