Check your compiler
Open Terminal and run:
clang --versionOur run reported Apple clang 17.0.0. If this opens an installation prompt, install Apple's Command Line Tools first, then rerun the check. That fresh installation is outside our tested scope.
Download into a new folder
Run each command in order. If any command fails, stop before the next one.
mkdirmust create a new folder; choose another name if it already exists.mkdir tiny-local-demo cd tiny-local-demo curl -fL https://raw.githubusercontent.com/karpathy/llama2.c/350e04fe35433e6d2941dce5a1f53308f87058eb/run.c -o run.c curl -fL https://raw.githubusercontent.com/karpathy/llama2.c/350e04fe35433e6d2941dce5a1f53308f87058eb/tokenizer.bin -o tokenizer.bin curl -fL https://huggingface.co/karpathy/tinyllamas/resolve/main/stories15M.bin -o stories15M.binThe source and tokenizer are pinned to a specific revision. Check the model before running it:
printf '%s\n' 'cd590644d963867a2b6e5a1107f51fad663c41d79c149fbecbbb1f95fa81f49a stories15M.bin' | shasum -a 256 -c -Expected output stories15M.bin: OKIf the checksum differs, stop. Do not replace the expected checksum with the downloaded file's value.
Compile and generate
Checkclang -O3 -o run run.c -lm ./run stories15M.bin -t 0 -n 128 -i 'Once upon a time'The prompt is continued into a story. Our run began:
Expected output Once upon a time, there was a little girl named Lily. She loved to play outside in the sunshine.The program also prints
achieved tok/s. That confirms generation completed; the value depends on your machine. The 128-token limit can stop mid-sentence. All inference uses the downloaded files on your CPU. You can rerun the second command without an internet connection.This 15-million-parameter model generates simple stories. It is not instruction-tuned, does not answer questions reliably, and is not included in our fit or recommendation catalogue. Its job here is to prove that your machine can generate text locally.
Choose your next setup
For a chat interface and a larger model, continue to Ollama and Open WebUI. That workflow is sourced but has not been tested end to end on our bench. For hardware planning, use the configurator with a model from its supported catalogue; the tiny demo is not a speed benchmark for those models.
This demo creates no background service. Keep the folder to rerun it, or remove the
tiny-local-demofolder in Finder when finished.
Troubleshooting
Install Apple's Command Line Tools using the linked Apple instructions, then open a new Terminal and repeat step 1.
Run
pwdandls. Your current folder must containrun,stories15M.binandtokenizer.bin. Return to the folder created in step 2 before trying again.The model is tiny and only demonstrates generation. A successful process exit and generated text validate this setup; factual accuracy is not part of the test. The sun remains unavailable for ball games.