{"slug":"llama-cpp","name":"llama.cpp","kind":"runbook","what":"The gold-standard C/C++ inference engine for GGUF models, with Metal as a first-class backend.","page":"https://insidethemachine.ai/setups/llama-cpp","status":"docs-checked","status_label":"Not run: commands checked against the official docs only","status_note":"Commands checked against the official docs on 2026-10-15. Not run end to end.","wrapper":"The wrapper scripts are generated from the site data. Every .sh passed bash -n and shellcheck and ran in plan mode on Linux (Debian 13). Every .ps1 passed the PowerShell parser and chat.ps1 ran in plan, verify and rollback mode under PowerShell 7 on Linux with Windows calls mocked. Not run on macOS or real Windows.","wrapper_tested":null,"sh":"https://insidethemachine.ai/install/llama-cpp.sh","ps1":"https://insidethemachine.ai/install/llama-cpp.ps1","md":"https://insidethemachine.ai/install/llama-cpp.md","json":"https://insidethemachine.ai/install/llama-cpp.json","one_liner":"curl -fsSL https://insidethemachine.ai/install/llama-cpp.sh | bash","one_liner_windows":"irm https://insidethemachine.ai/install/llama-cpp.ps1 | iex","actions":{"install":"curl -fsSL https://insidethemachine.ai/install/llama-cpp.sh | bash","plan":"curl -fsSL https://insidethemachine.ai/install/llama-cpp.sh | bash -s -- plan","verify":"curl -fsSL https://insidethemachine.ai/install/llama-cpp.sh | bash -s -- verify","rollback":"curl -fsSL https://insidethemachine.ai/install/llama-cpp.sh | bash -s -- rollback --yes"},"env":{"ITM_RAM":"memory in GB instead of detecting it"},"model_by_memory_gb":null,"low_memory":null,"platforms":{"macos":{"install":[{"title":"Install llama.cpp","lines":[{"k":"run","c":"curl -LsSf https://llama.app/install.sh | sh"},{"k":"note","c":"alternative: brew install llama.cpp   (Homebrew formula is at 0.6.0 as of 2026-10-15)"}]},{"title":"Configure (your choices)","lines":[{"k":"you","c":"llama cli -hf ggml-org/Qwen3.5-0.8B-GGUF","why":"download from Hugging Face and chat (README example)"},{"k":"you","c":"llama serve -hf ggml-org/Qwen3.5-0.8B-GGUF","why":"OpenAI-compatible API server + web UI"}]}],"verify":[{"run":"command -v llama","expect":"path to the llama binary (Homebrew/older builds may expose llama-cli / llama-server instead)"},{"run":"curl -s http://localhost:8080/v1/models","expect":"JSON listing the loaded model (server running; 8080 is the server's usual default, check startup log)"}],"rollback":[{"k":"mac","c":"brew uninstall llama.cpp"},{"k":"note","c":"script install: follow uninstall instructions at https://llama.app"},{"k":"note","c":"-hf downloads are cached (macOS default ~/Library/Caches/llama.cpp); delete to free space"}]},"linux":{"install":[{"title":"Install llama.cpp","lines":[{"k":"run","c":"curl -LsSf https://llama.app/install.sh | sh"}]},{"title":"Configure (your choices)","lines":[{"k":"you","c":"llama cli -hf ggml-org/Qwen3.5-0.8B-GGUF","why":"download from Hugging Face and chat (README example)"},{"k":"you","c":"llama serve -hf ggml-org/Qwen3.5-0.8B-GGUF","why":"OpenAI-compatible API server + web UI"}]}],"verify":[{"run":"command -v llama","expect":"path to the llama binary (Homebrew/older builds may expose llama-cli / llama-server instead)"},{"run":"curl -s http://localhost:8080/v1/models","expect":"JSON listing the loaded model (server running; 8080 is the server's usual default, check startup log)"}],"rollback":[{"k":"mac","c":"brew uninstall llama.cpp"},{"k":"note","c":"script install: follow uninstall instructions at https://llama.app"},{"k":"note","c":"-hf downloads are cached (macOS default ~/Library/Caches/llama.cpp); delete to free space"}]},"windows":{"install":[{"title":"Install llama.cpp","lines":[{"k":"run","c":"irm https://llama.app/install.ps1 | iex"}]}],"verify":[{"run":"command -v llama","expect":"path to the llama binary (Homebrew/older builds may expose llama-cli / llama-server instead)","you":true},{"run":"curl -s http://localhost:8080/v1/models","expect":"JSON listing the loaded model (server running; 8080 is the server's usual default, check startup log)","you":true}],"rollback":[{"k":"you","c":"brew uninstall llama.cpp","why":"macOS/Linux command; do the same by hand"},{"k":"note","c":"script install: follow uninstall instructions at https://llama.app"},{"k":"you","c":"# -hf downloads are cached (macOS default ~/Library/Caches/llama.cpp); delete to free space","why":"macOS/Linux command; do the same by hand"}]}}}