{"as_of":"2026-10-12","license":"CC-BY-4.0","license_url":"https://creativecommons.org/licenses/by/4.0/","cite_as":"The Local Bench (thelocalbench.com), data as of 2026-10-12, CC BY 4.0","source_url":"https://thelocalbench.com","guide":{"slug":"tiny-model-cpu","title":"Run a tiny local model on your Mac CPU","short":"Tested CPU first run","dek":"Compile one small program, download a 61 MB model, and generate a story locally. A setup check with no GPU, account or API key.","summary":"Run the TinyStories 15M model with a pinned llama2.c runtime on macOS. Verify the download checksum, compile with Apple clang, and generate text on the CPU.","difficulty":"Beginner","time_minutes":15,"cost":{"usd":0,"note":"free software and model; uses your existing Mac"},"hardware":["Apple silicon Mac","200 MB free disk space after developer tools are installed"],"os":["macOS"],"prerequisites":["Terminal","Apple Command Line Tools already installed (clang --version must succeed)","Internet access for the initial downloads"],"parts":[{"name":"llama2.c","note":"CPU runtime pinned to commit 350e04fe35433e6d2941dce5a1f53308f87058eb","href":"https://github.com/karpathy/llama2.c"},{"name":"TinyStories 15M","note":"60,816,028-byte model; a story generator, not a chat assistant","href":"https://huggingface.co/karpathy/tinyllamas"}],"tested_on":[{"env":"macOS 26.2, ARM64, Apple clang 17.0.0","date":"2026-10-13","scope":"Downloaded the pinned runtime and tokenizer, verified the model checksum, compiled and generated 128 tokens on CPU with exit code 0. No GPU or model API used."}],"last_tested":"2026-10-13","flag":"tested","flag_note":"The download, compile and generation commands below completed on an Apple silicon Mac on 2026-10-13. This tests local text generation only, not chat quality, GPU offload or a browser interface.","untested":["Installing Apple Command Line Tools on a fresh Mac","Intel Macs, Linux and Windows","Any GPU, chat interface or production workload"],"reviewed":"2026-10-13","tools":[],"explainers":["quantization","memory-bandwidth"],"sources":[{"label":"llama2.c: source and usage","url":"https://github.com/karpathy/llama2.c/tree/350e04fe35433e6d2941dce5a1f53308f87058eb"},{"label":"TinyStories model files","url":"https://huggingface.co/karpathy/tinyllamas"},{"label":"Apple: installing command-line tools","url":"https://developer.apple.com/documentation/xcode/installing-the-command-line-tools/"}],"steps":[{"n":1,"title":"Check your compiler"},{"n":2,"title":"Download into a new folder"},{"n":3,"title":"Compile and generate"},{"n":4,"title":"Choose your next setup"}],"url":"https://thelocalbench.com/how-to/tiny-model-cpu","markdown":"https://thelocalbench.com/how-to/tiny-model-cpu.md","json":"https://thelocalbench.com/api/v1/how-to/tiny-model-cpu.json"},"json_ld":{"@context":"https://schema.org","@type":"HowTo","name":"Run a tiny local model on your Mac CPU","description":"Run the TinyStories 15M model with a pinned llama2.c runtime on macOS. Verify the download checksum, compile with Apple clang, and generate text on the CPU.","url":"https://thelocalbench.com/how-to/tiny-model-cpu","totalTime":"PT15M","dateModified":"2026-10-13","estimatedCost":{"@type":"MonetaryAmount","currency":"USD","value":0},"supply":[{"@type":"HowToSupply","name":"llama2.c"},{"@type":"HowToSupply","name":"TinyStories 15M"}],"tool":[{"@type":"HowToTool","name":"Terminal"},{"@type":"HowToTool","name":"Apple Command Line Tools already installed (clang --version must succeed)"},{"@type":"HowToTool","name":"Internet access for the initial downloads"}],"step":[{"@type":"HowToStep","position":1,"name":"Check your compiler","url":"https://thelocalbench.com/how-to/tiny-model-cpu#step-1"},{"@type":"HowToStep","position":2,"name":"Download into a new folder","url":"https://thelocalbench.com/how-to/tiny-model-cpu#step-2"},{"@type":"HowToStep","position":3,"name":"Compile and generate","url":"https://thelocalbench.com/how-to/tiny-model-cpu#step-3"},{"@type":"HowToStep","position":4,"name":"Choose your next setup","url":"https://thelocalbench.com/how-to/tiny-model-cpu#step-4"}]}}