{"record":{"id":"2e1c53527ea6aca4","repo":"unslothai/unsloth","slug":"llama-cpp-is-not-installed-so-these-dictation-mod","errorCode":null,"errorMessage":"llama.cpp is not installed, so these dictation models cannot run. Run `unsloth studio update` to install it.","messagePattern":"llama\\.cpp is not installed, so these dictation models cannot run\\. Run `unsloth studio update` to install it\\.","errorType":"http","errorClass":"SttUnavailableError","httpStatus":501,"severity":"error","filePath":"studio/backend/core/inference/stt_mtmd_sidecar.py","lineNumber":162,"sourceCode":"    try:\n        import av  # noqa: F401\n    except Exception:\n        # No PyAV means every transcription 501s on decode, so offering a\n        # multi-gigabyte download here would be a waste.\n        return False\n    return True\n\n\ndef _llama_server_child_env(binary: str) -> dict:\n    \"\"\"The chat backend's llama-server environment, for the same binary.\"\"\"\n    from core.inference.llama_cpp import LlamaCppBackend\n    return LlamaCppBackend._llama_server_env_for_binary(binary)\n\n\ndef ensure_engine_available() -> str:\n    binary = find_llama_server_binary()\n    if not binary:\n        raise SttUnavailableError(\n            \"llama.cpp is not installed, so these dictation models cannot run. \"\n            \"Run `unsloth studio update` to install it.\"\n        )\n    return binary\n\n\ndef _reap(process: Optional[subprocess.Popen]) -> None:\n    \"\"\"Stop a child and wait for it, so its port and VRAM are actually free.\n\n    terminate() alone returns before the process has gone, and a child that\n    ignores SIGTERM would hold both until Studio exits.\n    \"\"\"\n    if process is None:\n        return\n    try:\n        if process.poll() is None:\n            process.terminate()\n            try:","sourceCodeStart":144,"sourceCodeEnd":180,"githubUrl":"https://github.com/unslothai/unsloth/blob/203007d19051dcd2ae33876786d117c99f6b0368/studio/backend/core/inference/stt_mtmd_sidecar.py#L144-L180","documentation":"SttUnavailableError raised by ensure_engine_available() in the mtmd sidecar: find_llama_server_binary() (delegating to LlamaCppBackend._find_llama_server_binary) found no llama-server executable, so multimodal dictation models cannot run at all. Unlike transient engine errors, this is an installation gap — nothing is on disk to execute.","triggerScenarios":"Calling any mtmd sidecar entry point (load/transcribe/ensure) on a machine where llama.cpp was never installed or its managed install is missing, because `unsloth studio update` was not run or its install step failed.","commonSituations":"Fresh environment without the Studio update step; partial update where the chat backend installed but llama-server was pruned; managed install directory deleted or on an unreadable path; PATH/shim issues after moving the install.","solutions":["Run `unsloth studio update` and let it install llama.cpp, then retry.","Verify the managed install directory contains the llama-server binary and it is executable.","If the update step fails, read its logs for the download/build failure (network, disk space, permissions) and fix that first."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"from core.inference.stt_mtmd_sidecar import find_llama_server_binary\nif find_llama_server_binary() is None:\n    prompt_run_studio_update()\n    return","typeGuard":"from core.inference.stt_mtmd_sidecar import find_llama_server_binary\n\ndef llama_cpp_ready() -> bool:\n    return find_llama_server_binary() is not None","tryCatchPattern":"try:\n    sidecar.load(model_id)\nexcept SttUnavailableError as exc:\n    if \"not installed\" in str(exc):\n        prompt_run_studio_update()  # then retry after install","preventionTips":["Run `unsloth studio update` as part of environment provisioning.","Check the managed install path exists and is executable before offering MTMD models in the UI.","Disable MTMD model options until llama-server is present."],"tags":["stt","mtmd","llama-cpp","installation","missing-binary"],"backgroundTag":null,"analyzedSha":"203007d19051dcd2ae33876786d117c99f6b0368","analyzedAt":"2026-08-15T02:48:39.846Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}