fareedkhan-dev/kimi-k3-in-c ? reverse-engineered prompt

Reverse engineered prompt

Build me this little C app that can run Kimi K3 inference on a single CPU with very small memory use.

I want a command line tool that can load the model files, read a prompt, and generate text in a way that works on an ordinary Linux x86 64 machine without GPUs or big external math libraries. It should support both simple prompt completion and a chat style mode with multi turn history, and it should print a clear run report showing tokens, time, and memory use.

Please make it portable C99, keep it dependency free if possible, and make sure the same prompt gives the same output no matter how much RAM the machine has, only the speed should change. Include a quick way to build, a couple of example commands, and basic tests so I can check that it runs correctly. If you need to, look up the current model format and any expected docs online before wiring it up.

Are you gonna build this?

make sure you review the code using arcumet

Try freeSponsored — opens Arcumet in a new tab