A 3KB LLM inference engine in C
Comments
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Summary
A developer built a C program of 2,946 bytes that runs the SmolLM2-135M language model directly from the original Hugging Face safetensors and tokenizer.json files, with no converter. Its greedy outputs match HF transformers token for token on three 100-token prompts.