Fixes for the failure modes people actually hit: builds, memory, ports, thinking, and other quirks.
The model won’t load, or the quantization type is rejected
Which file and which build you have decides this:
*-PQ2_0.gguf or *-PTQ1_0.gguf on upstream llama.cpp: refused as unknown types. Those packings need the PrismML binaries, which setup.sh installs. On a stock build, use the Q2_0 file instead (for the 27B, Ternary-Bonsai-2-27B-Q2_0-prism-fork-required.gguf in Ternary-Bonsai-2-27B-gguf-dev; the suffix is historical).
An MLX pack in mlx_lm.generate or mlx_lm.server: the released mlx-lm (0.32.0) doesn’t know the prism_hadamard_qwen35 architecture. Use mlx-vlm 0.7.8 or newer, which the demo’s ./scripts/run_mlx.sh and ./scripts/start_mlx_server.sh do; mlx-lm support ships in its next release.
An MLX pack in an older mlx-vlm: upgrade (pip install "mlx-vlm>=0.7.8") or use the loader bundled in the repo’s runtime/ directory.
Bonsai 2 stores its weights in a rotated basis and needs the runtime’s matching Hadamard transform. A runtime that knows the file format but not Bonsai 2 loads the file and produces nonsense:
Upstream llama.cpp older than b11555 loads Q2_0 without a warning. Update to b11555 or newer, or use the PrismML binaries.
Apps that bundle their own engine (LM Studio, Ollama, Locally AI, and others) behave the same way until they ship an updated runtime. Check the engine version in the app, or run the model through the demo’s server and point the app at that.
An MLX loader without Bonsai 2 support skips the activation transform and returns wrong output rather than an error. Use mlx-vlm 0.7.8 or newer.
If someone reports gibberish from Bonsai 2, check which build they used before anything else.
Generation is much slower than the published numbers
The published speeds (for the 27B, ~130 tok/s on an RTX 5090 and ~47 tok/s on an M5 Max) assume native low-bit kernels and full GPU offload. Check, in order:
Is the runtime dequantizing? A runtime that recognizes the file but lacks the right kernels may fall back to higher precision: same output, none of the speed. If memory use during inference is far above the weight file plus KV cache (e.g. multiple GB more), that’s the signature. Use the PrismML binaries, which are known-good.
Are layers on the GPU? With raw llama-cli/llama-server, pass -ngl 99. The demo scripts set this automatically. The load log prints how many layers were offloaded.
Is thinking eating the time? Reasoning is usually the bulk of the wait. Pick a lower Reasoning effort in the chat UI, send reasoning_effort: "medium" to the 27B, cap it with --reasoning-budget N, or turn it off for short answers.
Right binary for your hardware? On macOS, make sure you’re using the Metal (Apple Silicon) build, and on a GPU machine the CUDA, ROCm, or Vulkan archive rather than the CPU one. See the binary variants.
Long context? Decode slows as the KV cache grows; benchmark numbers are short-context. Compare against community benchmarks for your hardware.
Out of memory, or the machine freezes at startup
Total memory = weight file + KV cache, and the KV cache grows linearly with context (64 KiB per token on the 27B at FP16, about 6.3 GiB at 100K).Older revisions passed llama.cpp’s -c 0, which uses the model’s full training context (262K) regardless of available memory. The scripts now pick a RAM-tiered context instead, and BONSAI_CTX=0 maps to that safe default rather than -c 0. If you still hit memory pressure:
Pin a smaller context: BONSAI_CTX=8192 ./scripts/start_llama_server.sh (or -c 8192 with raw llama-cli).
Turn on the 4-bit KV cache: BONSAI_KV4=1 cuts cache memory roughly 3.5×, or use llama.cpp’s own --cache-type-k q8_0 --cache-type-v q8_0 to roughly halve it.
Free VRAM on tight cards with BONSAI_MMPROJ_CPU=1, which keeps the vision projector in system RAM (slower image prompts only).
Or step down a size: BONSAI_MODEL=9B, 4B, or 2B.
”GGUF model not found” from the scripts
The script’s BONSAI_MODEL doesn’t match what’s downloaded. Download the size you asked for:
BONSAI_MODEL=9B ./scripts/download_models.sh
BONSAI_MODEL=all is valid only for setup and download scripts, not for run/server scripts, which need exactly one model. If you installed with BONSAI_SKIP_GGUF=1 (MLX only), the llama.cpp scripts stop with an error pointing at both options: run run_mlx.sh / start_mlx_server.sh instead, or download the GGUF weights. The earlier families still select with BONSAI_FAMILY; see Bonsai1_README.md.
Port already in use
The Bonsai server refuses to start if something is on 8080: stop it with kill $(lsof -ti TCP:8080) (macOS/Linux), or start on another port with PORT=8090 ./scripts/start_llama_server.sh.
A standalone open-webui serve also defaults to 8080. Use ./scripts/start_openwebui.sh (which picks 9090+) or pass --port. See Open WebUI.
Windows: “running scripts is disabled on this system”
PowerShell’s execution policy blocks setup.ps1. Allow it for the current session only:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass.\setup.ps1
Apple M5: Metal compile errors, then out-of-memory
On M5 (and A19) devices with certain macOS 26 point releases, ggml compiles its Metal library at runtime to enable the tensor API, and stricter MetalPerformancePrimitives headers break that compile:
ggml_metal_library_init_from_source: error compiling sourceggml_metal_device_init: - the tensor API is not supported in this environment - disabling
This is an ecosystem-wide issue affecting every ggml-based project; M1–M4 are unaffected. Disable the tensor API. Full Metal speed is kept; only the Neural Accelerator prefill boost is lost:
This is much faster than falling back to CPU (BONSAI_NGL=0). If out-of-memory errors persist on lower-memory machines, also pin a smaller context, e.g. -c 16384.
CUDA source build hangs or gets killed
Compiling CUDA kernels is memory-intensive. Each parallel job can take several GB of VRAM and system RAM, so -j$(nproc) can exhaust it. build_cuda_linux.sh and build_cuda_windows.ps1 detect GPU VRAM and cap parallelism at -j 2 below 16 GB. Building by hand, reduce -j yourself or close other GPU-heavy applications.
The model emits <think> blocks or stalls before answering
Every Bonsai 2 size reasons by default, and even simple prompts can use 3,000+ thinking tokens.
Give it room: max_tokens (or -n) of 8,192 or more with thinking on. A small cap ends generation mid-thought, before any answer.
To turn thinking off: on the 9B, 4B, and 2B, start the launchers with BONSAI_THINKING=0, which also switches to the non-thinking sampling profile; on the 27B, pass --reasoning-budget 0 through the launcher. Over the API, send "chat_template_kwargs": {"enable_thinking": false} (llama-server) or top-level "enable_thinking": false (mlx-vlm server) together with the non-thinking sampling from the model page.
To shorten it instead: reasoning_effort: "medium" on the 27B (low is not supported and does not reduce thinking), or cap it with --reasoning-budget N.
If you’re using the built-in chat UI, check the Reasoning effort picker (lightbulb icon). It’s saved per browser and overrides the server default for every future chat, including new ones. If replies are slower than expected even after turning thinking off on the server, this is almost always why: set the picker itself to your desired effort, or clear site data for localhost:8080.
The 9B, 4B, or 2B repeats itself or gets stuck reasoning
The small models want a presence penalty that the 27B does not: presence_penalty 1.0 in thinking mode (1.5 without thinking), applied over the last 64 tokens (--repeat-last-n 64 in llama.cpp, presence_context_size=64 in MLX, whose default window is 20). The demo launchers apply it; set it yourself in direct llama-server or mlx-vlm calls. Also avoid greedy decoding (temperature=0) with thinking on; it can loop on some prompts. The full tables are on each model page (9B).
Still stuck?
Ask in the PrismML Discord or open an issue on the demo repo with your platform, binary variant, and the full load log. The demo repo’s FAQ.md has more.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Bonsai","colors":{"primary":"#6b5353","light":"#e8e4df","dark":"#6b5353"},"logo":{"light":"https://mintcdn.com/prismml/mQScX1J5vEe0-L40/images/PrismIcon_HorizontalDark(2).svg?fit=max\u0026auto=format\u0026n=mQScX1J5vEe0-L40\u0026q=85\u0026s=24c5c941d6f990a4aab4041c9b243291","dark":"https://mintcdn.com/prismml/mQScX1J5vEe0-L40/images/PrismIcon_HorizontalLight.svg?fit=max\u0026auto=format\u0026n=mQScX1J5vEe0-L40\u0026q=85\u0026s=0e1b904021bd1e651c46416735a7c2d3"},"favicon":{"light":"https://mintcdn.com/prismml/mQScX1J5vEe0-L40/images/PrismIcon_HorizontalDark(2).svg?fit=max\u0026auto=format\u0026n=mQScX1J5vEe0-L40\u0026q=85\u0026s=24c5c941d6f990a4aab4041c9b243291","dark":"https://mintcdn.com/prismml/mQScX1J5vEe0-L40/images/PrismIcon_HorizontalLight.svg?fit=max\u0026auto=format\u0026n=mQScX1J5vEe0-L40\u0026q=85\u0026s=0e1b904021bd1e651c46416735a7c2d3"},"navbar":{"links":[{"href":"https://prismml.com","label":"PrismML"}],"primary":{"type":"github","href":"https://github.com/PrismML-Eng/Bonsai-demo"}},"footer":{"socials":{"x":"https://x.com/PrismML","linkedin":"https://www.linkedin.com/company/prismml","github":"https://github.com/PrismML-Eng","discord":"https://discord.gg/prismml"}},"contextual":{"options":["copy","view","chatgpt","claude","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"prismml","hasAudioNarration":false,"actualSubdomain":"prismml","customDomains":["docs.prismml.com"],"gitSource":{"type":"github","owner":"prismml-eng","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ad06fe69e1ce8e223e85407","clientVersion":"0.0.4277","searchFilterCounts":[{"language":"default","tag":"Models","count":5},{"language":"default","tag":"Run Locally","count":4},{"language":"default","tag":"Get started","count":3},{"language":"default","tag":"Download","count":2},{"language":"default","tag":"Integrations","count":2},{"language":"default","tag":"Resources","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"resources/troubleshooting","slug":"/resources/troubleshooting","pageMetadata":{"title":"Troubleshooting","description":"Fixes for the failure modes people actually hit: builds, memory, ports, thinking, and other quirks.","icon":"wrench","href":"/resources/troubleshooting"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Fixes for the failure modes people actually hit: builds, memory, ports, thinking, and other quirks.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`the-model-won’t-load-or-the-quantization-type-is-rejected`,children:`The model won’t load, or the quantization type is rejected`}),`\n`,_jsx(_components.p,{children:`Which file and which build you have decides this:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`*-PQ2_0.gguf`}),` or `,_jsx(_components.code,{children:`*-PTQ1_0.gguf`}),` on upstream llama.cpp`]}),`: refused as unknown types. Those packings need the `,_jsx(_components.a,{href:`/run/llamacpp#get-a-binary`,children:`PrismML binaries`}),`, which `,_jsx(_components.code,{children:`setup.sh`}),` installs. On a stock build, use the `,_jsx(_components.code,{children:`Q2_0`}),` file instead (for the 27B, `,_jsx(_components.code,{children:`Ternary-Bonsai-2-27B-Q2_0-prism-fork-required.gguf`}),` in `,_jsx(_components.a,{href:`https://huggingface.co/prism-ml/Ternary-Bonsai-2-27B-gguf-dev`,children:_jsx(_components.code,{children:`Ternary-Bonsai-2-27B-gguf-dev`})}),`; the suffix is historical).`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[`An MLX pack in `,_jsx(_components.code,{children:`mlx_lm.generate`}),` or `,_jsx(_components.code,{children:`mlx_lm.server`})]}),`: the released mlx-lm (0.32.0) doesn’t know the `,_jsx(_components.code,{children:`prism_hadamard_qwen35`}),` architecture. Use mlx-vlm 0.7.8 or newer, which the demo’s `,_jsx(_components.code,{children:`./scripts/run_mlx.sh`}),` and `,_jsx(_components.code,{children:`./scripts/start_mlx_server.sh`}),` do; mlx-lm support ships in its next release.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`An MLX pack in an older mlx-vlm`}),`: upgrade (`,_jsx(_components.code,{children:`pip install \"mlx-vlm>=0.7.8\"`}),`) or use the loader bundled in the repo’s `,_jsx(_components.code,{children:`runtime/`}),` directory.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/download/formats`,children:`Formats \u0026 runtime support`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`the-model-outputs-gibberish`,children:`The model outputs gibberish`}),`\n`,_jsx(_components.p,{children:`Bonsai 2 stores its weights in a rotated basis and needs the runtime’s matching Hadamard transform. A runtime that knows the file format but not Bonsai 2 loads the file and produces nonsense:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[`Upstream llama.cpp older than `,_jsx(_components.code,{children:`b11555`})]}),` loads `,_jsx(_components.code,{children:`Q2_0`}),` without a warning. Update to `,_jsx(_components.code,{children:`b11555`}),` or newer, or use the PrismML binaries.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Apps that bundle their own engine`}),` (LM Studio, Ollama, Locally AI, and others) behave the same way until they ship an updated runtime. Check the engine version in the app, or run the model through the `,_jsx(_components.a,{href:`/run/server`,children:`demo’s server`}),` and point the app at that.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`An MLX loader without Bonsai 2 support`}),` skips the activation transform and returns wrong output rather than an error. Use mlx-vlm 0.7.8 or newer.`]}),`\n`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`If someone reports gibberish from Bonsai 2, check which build they used before anything else.`})}),`\n`,_jsx(Heading,{level:`2`,id:`generation-is-much-slower-than-the-published-numbers`,children:`Generation is much slower than the published numbers`}),`\n`,_jsx(_components.p,{children:`The published speeds (for the 27B, ~130 tok/s on an RTX 5090 and ~47 tok/s on an M5 Max) assume native low-bit kernels and full GPU offload. Check, in order:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Is the runtime dequantizing?`}),` A runtime that recognizes the file but lacks the right kernels may fall back to higher precision: same output, none of the speed. If memory use during inference is far above the weight file plus KV cache (e.g. multiple GB more), that’s the signature. Use the `,_jsx(_components.a,{href:`https://github.com/PrismML-Eng/llama.cpp/releases`,children:`PrismML binaries`}),`, which are known-good.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Are layers on the GPU?`}),` With raw `,_jsx(_components.code,{children:`llama-cli`}),`/`,_jsx(_components.code,{children:`llama-server`}),`, pass `,_jsx(_components.code,{children:`-ngl 99`}),`. The demo scripts set this automatically. The load log prints how many layers were offloaded.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Is thinking eating the time?`}),` Reasoning is usually the bulk of the wait. Pick a lower `,_jsx(_components.strong,{children:`Reasoning effort`}),` in the chat UI, send `,_jsx(_components.code,{children:`reasoning_effort: \"medium\"`}),` to the 27B, cap it with `,_jsx(_components.code,{children:`--reasoning-budget N`}),`, or turn it off for short answers.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Right binary for your hardware?`}),` On macOS, make sure you’re using the Metal (Apple Silicon) build, and on a GPU machine the CUDA, ROCm, or Vulkan archive rather than the CPU one. See the `,_jsx(_components.a,{href:`/download/formats#pre-built-binaries`,children:`binary variants`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Long context?`}),` Decode slows as the KV cache grows; benchmark numbers are short-context. Compare against `,_jsx(_components.a,{href:`https://github.com/PrismML-Eng/Bonsai-demo/tree/main/community-benchmarks`,children:`community benchmarks`}),` for your hardware.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`out-of-memory-or-the-machine-freezes-at-startup`,children:`Out of memory, or the machine freezes at startup`}),`\n`,_jsx(_components.p,{children:`Total memory = weight file + KV cache, and the KV cache grows linearly with context (64 KiB per token on the 27B at FP16, about 6.3 GiB at 100K).`}),`\n`,_jsxs(_components.p,{children:[`Older revisions passed llama.cpp’s `,_jsx(_components.code,{children:`-c 0`}),`, which uses the model’s full training context (262K) regardless of available memory. The scripts now pick a RAM-tiered context instead, and `,_jsx(_components.code,{children:`BONSAI_CTX=0`}),` maps to that safe default rather than `,_jsx(_components.code,{children:`-c 0`}),`. If you still hit memory pressure:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Pin a smaller context: `,_jsx(_components.code,{children:`BONSAI_CTX=8192 ./scripts/start_llama_server.sh`}),` (or `,_jsx(_components.code,{children:`-c 8192`}),` with raw `,_jsx(_components.code,{children:`llama-cli`}),`).`]}),`\n`,_jsxs(_components.li,{children:[`Turn on the 4-bit KV cache: `,_jsx(_components.code,{children:`BONSAI_KV4=1`}),` cuts cache memory roughly 3.5×, or use llama.cpp’s own `,_jsx(_components.code,{children:`--cache-type-k q8_0 --cache-type-v q8_0`}),` to roughly halve it.`]}),`\n`,_jsxs(_components.li,{children:[`Free VRAM on tight cards with `,_jsx(_components.code,{children:`BONSAI_MMPROJ_CPU=1`}),`, which keeps the vision projector in system RAM (slower image prompts only).`]}),`\n`,_jsxs(_components.li,{children:[`Or step down a size: `,_jsx(_components.code,{children:`BONSAI_MODEL=9B`}),`, `,_jsx(_components.code,{children:`4B`}),`, or `,_jsx(_components.code,{children:`2B`}),`.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`”gguf-model-not-found”-from-the-scripts`,children:`”GGUF model not found” from the scripts`}),`\n`,_jsxs(_components.p,{children:[`The script’s `,_jsx(_components.code,{children:`BONSAI_MODEL`}),` doesn’t match what’s downloaded. Download the size you asked for:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`BONSAI_MODEL`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`9B`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` ./scripts/download_models.sh`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`BONSAI_MODEL=all`}),` is valid `,_jsx(_components.strong,{children:`only`}),` for setup and download scripts, not for run/server scripts, which need exactly one model. If you installed with `,_jsx(_components.code,{children:`BONSAI_SKIP_GGUF=1`}),` (MLX only), the llama.cpp scripts stop with an error pointing at both options: run `,_jsx(_components.code,{children:`run_mlx.sh`}),` / `,_jsx(_components.code,{children:`start_mlx_server.sh`}),` instead, or download the GGUF weights. The earlier families still select with `,_jsx(_components.code,{children:`BONSAI_FAMILY`}),`; see `,_jsx(_components.a,{href:`https://github.com/PrismML-Eng/Bonsai-demo/blob/main/Bonsai1_README.md`,children:`Bonsai1_README.md`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`port-already-in-use`,children:`Port already in use`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`The Bonsai server refuses to start if something is on `,_jsx(_components.strong,{children:`8080`}),`: stop it with `,_jsx(_components.code,{children:`kill $(lsof -ti TCP:8080)`}),` (macOS/Linux), or start on another port with `,_jsx(_components.code,{children:`PORT=8090 ./scripts/start_llama_server.sh`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`A standalone `,_jsx(_components.code,{children:`open-webui serve`}),` also defaults to 8080. Use `,_jsx(_components.code,{children:`./scripts/start_openwebui.sh`}),` (which picks 9090+) or pass `,_jsx(_components.code,{children:`--port`}),`. See `,_jsx(_components.a,{href:`/run/open-webui`,children:`Open WebUI`}),`.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`windows-“running-scripts-is-disabled-on-this-system”`,children:`Windows: “running scripts is disabled on this system”`}),`\n`,_jsxs(_components.p,{children:[`PowerShell’s execution policy blocks `,_jsx(_components.code,{children:`setup.ps1`}),`. Allow it for the current session only:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`powershell`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`powershell`,children:_jsxs(_components.code,{language:`powershell`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`Set-ExecutionPolicy`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` -`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Scope `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`Process`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` -`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`ExecutionPolicy Bypass`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.\\\\setup.ps1`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`apple-m5-metal-compile-errors-then-out-of-memory`,children:`Apple M5: Metal compile errors, then out-of-memory`}),`\n`,_jsxs(_components.p,{children:[`On M5 (and A19) devices with certain macOS 26 point releases, ggml compiles its Metal library at runtime to enable the tensor API, and stricter `,_jsx(_components.code,{children:`MetalPerformancePrimitives`}),` headers break that compile:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`ggml_metal_library_init_from_source: error compiling source`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`ggml_metal_device_init: - the tensor API is not supported in this environment - disabling`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`This is an ecosystem-wide issue affecting every ggml-based project; M1–M4 are unaffected. Disable the tensor API. Full Metal speed is kept; only the Neural Accelerator prefill boost is lost:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`GGML_METAL_TENSOR_DISABLE`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`1`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` ./scripts/run_llama.sh`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -p`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Hello\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`GGML_METAL_TENSOR_DISABLE`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`1`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` ./scripts/start_llama_server.sh`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`This is much faster than falling back to CPU (`,_jsx(_components.code,{children:`BONSAI_NGL=0`}),`). If out-of-memory errors persist on lower-memory machines, also pin a smaller context, e.g. `,_jsx(_components.code,{children:`-c 16384`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`cuda-source-build-hangs-or-gets-killed`,children:`CUDA source build hangs or gets killed`}),`\n`,_jsxs(_components.p,{children:[`Compiling CUDA kernels is memory-intensive. Each parallel job can take several GB of VRAM and system RAM, so `,_jsx(_components.code,{children:`-j$(nproc)`}),` can exhaust it. `,_jsx(_components.code,{children:`build_cuda_linux.sh`}),` and `,_jsx(_components.code,{children:`build_cuda_windows.ps1`}),` detect GPU VRAM and cap parallelism at `,_jsx(_components.code,{children:`-j 2`}),` below 16 GB. Building by hand, reduce `,_jsx(_components.code,{children:`-j`}),` yourself or close other GPU-heavy applications.`]}),`\n`,_jsxs(Heading,{level:`2`,id:`the-model-emits-\u003cthink>-blocks-or-stalls-before-answering`,children:[`The model emits `,_jsx(_components.code,{children:`\u003cthink>`}),` blocks or stalls before answering`]}),`\n`,_jsxs(_components.p,{children:[`Every Bonsai 2 size reasons `,_jsx(_components.strong,{children:`by default`}),`, and even simple prompts can use 3,000+ thinking tokens.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Give it room: `,_jsx(_components.code,{children:`max_tokens`}),` (or `,_jsx(_components.code,{children:`-n`}),`) of 8,192 or more with thinking on. A small cap ends generation mid-thought, before any answer.`]}),`\n`,_jsxs(_components.li,{children:[`To turn thinking off: on the 9B, 4B, and 2B, start the launchers with `,_jsx(_components.code,{children:`BONSAI_THINKING=0`}),`, which also switches to the non-thinking sampling profile; on the 27B, pass `,_jsx(_components.code,{children:`--reasoning-budget 0`}),` through the launcher. Over the API, send `,_jsx(_components.code,{children:`\"chat_template_kwargs\": {\"enable_thinking\": false}`}),` (llama-server) or top-level `,_jsx(_components.code,{children:`\"enable_thinking\": false`}),` (mlx-vlm server) together with the non-thinking sampling from the model page.`]}),`\n`,_jsxs(_components.li,{children:[`To shorten it instead: `,_jsx(_components.code,{children:`reasoning_effort: \"medium\"`}),` on the 27B (`,_jsx(_components.code,{children:`low`}),` is not supported and does not reduce thinking), or cap it with `,_jsx(_components.code,{children:`--reasoning-budget N`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`If you’re using the built-in chat UI, check the `,_jsx(_components.strong,{children:`Reasoning effort`}),` picker (lightbulb icon). It’s saved per browser and overrides the server default for every future chat, including new ones. If replies are slower than expected even after turning thinking off on the server, this is almost always why: set the picker itself to your desired effort, or clear site data for `,_jsx(_components.code,{children:`localhost:8080`}),`.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`the-9b-4b-or-2b-repeats-itself-or-gets-stuck-reasoning`,children:`The 9B, 4B, or 2B repeats itself or gets stuck reasoning`}),`\n`,_jsxs(_components.p,{children:[`The small models want a presence penalty that the 27B does not: `,_jsx(_components.code,{children:`presence_penalty`}),` 1.0 in thinking mode (1.5 without thinking), applied over the last 64 tokens (`,_jsx(_components.code,{children:`--repeat-last-n 64`}),` in llama.cpp, `,_jsx(_components.code,{children:`presence_context_size=64`}),` in MLX, whose default window is 20). The demo launchers apply it; set it yourself in direct `,_jsx(_components.code,{children:`llama-server`}),` or mlx-vlm calls. Also avoid greedy decoding (`,_jsx(_components.code,{children:`temperature=0`}),`) with thinking on; it can loop on some prompts. The full tables are on each model page (`,_jsx(_components.a,{href:`/models/bonsai-2-9b#best-practices`,children:`9B`}),`).`]}),`\n`,_jsx(Heading,{level:`2`,id:`still-stuck`,children:`Still stuck?`}),`\n`,_jsxs(_components.p,{children:[`Ask in the `,_jsx(_components.a,{href:`https://discord.gg/prismml`,children:`PrismML Discord`}),` or `,_jsx(_components.a,{href:`https://github.com/PrismML-Eng/Bonsai-demo/issues`,children:`open an issue`}),` on the demo repo with your platform, binary variant, and the full load log. The demo repo’s `,_jsx(_components.a,{href:`https://github.com/PrismML-Eng/Bonsai-demo/blob/main/FAQ.md`,children:`FAQ.md`}),` has more.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Troubleshooting","description":"Fixes for the failure modes people actually hit: builds, memory, ports, thinking, and other quirks.","icon":"wrench","href":"/resources/troubleshooting"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"The model won’t load, or the quantization type is rejected","slug":"the-model-won’t-load-or-the-quantization-type-is-rejected","depth":2,"children":[]},{"title":"The model outputs gibberish","slug":"the-model-outputs-gibberish","depth":2,"children":[]},{"title":"Generation is much slower than the published numbers","slug":"generation-is-much-slower-than-the-published-numbers","depth":2,"children":[]},{"title":"Out of memory, or the machine freezes at startup","slug":"out-of-memory-or-the-machine-freezes-at-startup","depth":2,"children":[]},{"title":"”GGUF model not found” from the scripts","slug":"”gguf-model-not-found”-from-the-scripts","depth":2,"children":[]},{"title":"Port already in use","slug":"port-already-in-use","depth":2,"children":[]},{"title":"Windows: “running scripts is disabled on this system”","slug":"windows-“running-scripts-is-disabled-on-this-system”","depth":2,"children":[]},{"title":"Apple M5: Metal compile errors, then out-of-memory","slug":"apple-m5-metal-compile-errors-then-out-of-memory","depth":2,"children":[]},{"title":"CUDA source build hangs or gets killed","slug":"cuda-source-build-hangs-or-gets-killed","depth":2,"children":[]},{"title":"The model emits \u003cthink> blocks or stalls before answering","slug":"the-model-emits-\u003cthink>-blocks-or-stalls-before-answering","depth":2,"children":[]},{"title":"The 9B, 4B, or 2B repeats itself or gets stuck reasoning","slug":"the-9b-4b-or-2b-repeats-itself-or-gets-stuck-reasoning","depth":2,"children":[]},{"title":"Still stuck?","slug":"still-stuck","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"prismml","siteName":"Bonsai","title":"Troubleshooting - Bonsai","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-15T06:17:13.551Z","originalFileLocation":"resources/troubleshooting.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Fixes for the failure modes people actually hit: builds, memory, ports, thinking, and other quirks.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Bonsai\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/svg+xml\" sizes=\"180x180\" href=\"https://mintcdn.com/prismml/mQScX1J5vEe0-L40/images/PrismIcon_HorizontalDark(2).svg?fit=max\u0026amp;auto=format\u0026amp;n=mQScX1J5vEe0-L40\u0026amp;q=85\u0026amp;s=24c5c941d6f990a4aab4041c9b243291\">\u003clink data-mint-head rel=\"icon\" type=\"image/svg+xml\" sizes=\"32x32\" href=\"https://mintcdn.com/prismml/mQScX1J5vEe0-L40/images/PrismIcon_HorizontalDark(2).svg?fit=max\u0026amp;auto=format\u0026amp;n=mQScX1J5vEe0-L40\u0026amp;q=85\u0026amp;s=24c5c941d6f990a4aab4041c9b243291\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/svg+xml\" sizes=\"16x16\" href=\"https://mintcdn.com/prismml/mQScX1J5vEe0-L40/images/PrismIcon_HorizontalDark(2).svg?fit=max\u0026amp;auto=format\u0026amp;n=mQScX1J5vEe0-L40\u0026amp;q=85\u0026amp;s=24c5c941d6f990a4aab4041c9b243291\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/svg+xml\" href=\"https://mintcdn.com/prismml/mQScX1J5vEe0-L40/images/PrismIcon_HorizontalDark(2).svg?fit=max\u0026amp;auto=format\u0026amp;n=mQScX1J5vEe0-L40\u0026amp;q=85\u0026amp;s=24c5c941d6f990a4aab4041c9b243291\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/svg+xml\" sizes=\"32x32\" href=\"https://mintcdn.com/prismml/mQScX1J5vEe0-L40/images/PrismIcon_HorizontalLight.svg?fit=max\u0026amp;auto=format\u0026amp;n=mQScX1J5vEe0-L40\u0026amp;q=85\u0026amp;s=0e1b904021bd1e651c46416735a7c2d3\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/svg+xml\" sizes=\"16x16\" href=\"https://mintcdn.com/prismml/mQScX1J5vEe0-L40/images/PrismIcon_HorizontalLight.svg?fit=max\u0026amp;auto=format\u0026amp;n=mQScX1J5vEe0-L40\u0026amp;q=85\u0026amp;s=0e1b904021bd1e651c46416735a7c2d3\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/svg+xml\" href=\"https://mintcdn.com/prismml/mQScX1J5vEe0-L40/images/PrismIcon_HorizontalLight.svg?fit=max\u0026amp;auto=format\u0026amp;n=mQScX1J5vEe0-L40\u0026amp;q=85\u0026amp;s=0e1b904021bd1e651c46416735a7c2d3\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Troubleshooting - Bonsai\">\u003cmeta data-mint-head property=\"og:description\" content=\"Fixes for the failure modes people actually hit: builds, memory, ports, thinking, and other quirks.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Bonsai\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.prismml.com/resources/troubleshooting\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://prismml.mintlify.site/_mintlify/api/og/v2?division=Resources\u0026amp;title=Troubleshooting\u0026amp;description=Fixes+for+the+failure+modes+people+actually+hit%3A+builds%2C+memory%2C+ports%2C+thinking%2C+and+other+quirks.\u0026amp;theme=7d40fdeeb938b0cc97482738\u0026amp;signature=fdd5543536827bd52c4cc58b5cb144758aa1f82a0af27682c767a8d7c9fc208a\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Troubleshooting - Bonsai\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Fixes for the failure modes people actually hit: builds, memory, ports, thinking, and other quirks.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://prismml.mintlify.site/_mintlify/api/og/v2?division=Resources\u0026amp;title=Troubleshooting\u0026amp;description=Fixes+for+the+failure+modes+people+actually+hit%3A+builds%2C+memory%2C+ports%2C+thinking%2C+and+other+quirks.\u0026amp;theme=7d40fdeeb938b0cc97482738\u0026amp;signature=fdd5543536827bd52c4cc58b5cb144758aa1f82a0af27682c767a8d7c9fc208a\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"https://mintlify.s3.us-west-1.amazonaws.com/prismml/_generated/favicon/browserconfig.xml?v=3\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Bonsai\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#6b5353\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.prismml.com/resources/troubleshooting\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/resources/troubleshooting.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.prismml.com/#organization\",\"name\":\"Bonsai\",\"url\":\"https://docs.prismml.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/prismml/mQScX1J5vEe0-L40/images/PrismIcon_HorizontalDark(2).svg?fit=max\u0026auto=format\u0026n=mQScX1J5vEe0-L40\u0026q=85\u0026s=24c5c941d6f990a4aab4041c9b243291\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.prismml.com#website\",\"name\":\"Bonsai\",\"url\":\"https://docs.prismml.com\",\"publisher\":{\"@id\":\"https://docs.prismml.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.prismml.com/resources/troubleshooting#webpage\",\"url\":\"https://docs.prismml.com/resources/troubleshooting\",\"name\":\"Troubleshooting\",\"description\":\"Fixes for the failure modes people actually hit: builds, memory, ports, thinking, and other quirks.\",\"dateModified\":\"2026-10-15T06:17:13.551Z\",\"isPartOf\":{\"@id\":\"https://docs.prismml.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.prismml.com/resources/troubleshooting#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.prismml.com/resources/troubleshooting#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Bonsai\",\"item\":\"https://docs.prismml.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Troubleshooting\",\"item\":\"https://docs.prismml.com/resources/troubleshooting\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.prismml.com/resources/troubleshooting#article\",\"headline\":\"Troubleshooting\",\"name\":\"Troubleshooting\",\"description\":\"Fixes for the failure modes people actually hit: builds, memory, ports, thinking, and other quirks.\",\"url\":\"https://docs.prismml.com/resources/troubleshooting\",\"mainEntityOfPage\":{\"@id\":\"https://docs.prismml.com/resources/troubleshooting#webpage\"},\"dateModified\":\"2026-10-15T06:17:13.551Z\",\"publisher\":{\"@id\":\"https://docs.prismml.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.prismml.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Bonsai\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Bonsai\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/resources/troubleshooting.md","siteName":"Bonsai","nav":{"global":null,"pages":[{"group":"Get started","pages":[{"title":"Introduction","icon":"hand-wave","href":"/get-started/introduction"},{"title":"Quickstart","icon":"play","href":"/get-started/quickstart"},{"title":"Try It Without Installing","icon":"browser","href":"/get-started/try-online"}]},{"group":"Models","pages":[{"title":"Ternary Bonsai 2 27B","href":"/models/bonsai-2-27b"},{"title":"Ternary Bonsai 2 9B","href":"/models/bonsai-2-9b"},{"title":"Ternary Bonsai 2 4B","href":"/models/bonsai-2-4b"},{"title":"Ternary Bonsai 2 2B","href":"/models/bonsai-2-2b"},{"title":"Bonsai Image 4B","href":"/models/bonsai-image"}]},{"group":"Download","pages":[{"title":"Download the Models","icon":"download","href":"/download/models"},{"title":"Formats \u0026 Runtime Support","icon":"box","href":"/download/formats"}]},{"group":"Run Locally","pages":[{"title":"Run the Server","icon":"server","href":"/run/server"},{"title":"llama.cpp","icon":"terminal","href":"/run/llamacpp"},{"title":"MLX","icon":"apple","href":"/run/mlx"},{"title":"Open WebUI","icon":"window","href":"/run/open-webui"}]},{"group":"Integrations","pages":[{"title":"Hermes","icon":"robot","href":"/integrations/hermes"},{"title":"LM Studio","description":"Run and serve Bonsai locally with LM Studio and its bundled OpenAI-compatible server.","icon":"desktop","href":"/integrations/lmstudio"}]},{"group":"Resources","pages":[{"title":"Troubleshooting","icon":"wrench","href":"/resources/troubleshooting"},{"title":"Community \u0026 Resources","description":"Whitepapers, source repositories, community benchmarks, and where to get help.","icon":"users","href":"/resources/community"}]}]},"basePath":"","title":"Troubleshooting - Bonsai","deploymentId":"dpl_BzgRxZmUbhHRoPLkBx1DiVRSyQhV","buildId":"dpl_BzgRxZmUbhHRoPLkBx1DiVRSyQhV","dynamics":[],"chunks":[]}