Does temperature break JSON output? Small LLMs, measured
3 small local LLMs, 20 emails to JSON at temperature 0, 0.8 and 1.5. With llama.cpp's default samplers, JSON stayed valid. Without them, 1.5 broke it.
Every number in these posts comes from the same ordinary laptop: a 2-core CPU, 19 GB of RAM and no GPU. They start with which runtime to use, then which small model fits, then what those models can be trusted to do.
3 small local LLMs, 20 emails to JSON at temperature 0, 0.8 and 1.5. With llama.cpp's default samplers, JSON stayed valid. Without them, 1.5 broke it.
6 small local LLMs, 20 emails to JSON, with and without llama.cpp's json_schema grammar. Valid JSON went to 100%; right answers did not move.
10 small LLMs on a 2-core laptop CPU: speed, RAM, first-token time and a 20-question check. Gemma 4 E2B was the best trade-off.
I benchmarked Ollama and llama.cpp on a 2-core laptop CPU with the same GGUF files. With equal settings the speed matched. The defaults did not.