Executable programs and extensions
Last updated
What is Crane? Run LLM, OCR and audio models behind a local Rust API
Crane connects local AI models to Rust applications
Crane is a Rust project built on Hugging Face Candle for running text, OCR1, and speech models and connecting them to applications through the crane-serve HTTP API2. Developers embedding inference3 in Rust or managing their own server can verify the chat path with a small Qwen3.5 model, then add the capabilities they need.
An app that adds chat, receipt OCR, and speech transcription can end up with conflicting Python dependencies or separate environments for each feature. Crane brings text, image, and audio examples together in a Rust/Candle repository and exposes them through the local crane-serve API. Start with one text model, verify requests between the app and server, then add other models so issues remain easier to isolate.
Rust catches many errors at compile time and makes it convenient to package an application as an executable. Candle provides tensor operations and model components in Rust. These are development and deployment benefits; changing languages alone does not make a model faster or guarantee support for every checkpoint4.
How Crane differs from other local runtimes
Ollama simplifies downloading and running models behind an API. MLX5 is a compute framework for Apple Silicon, with applications such as oMLX built on top of it. Crane provides Rust model implementations through Candle and CPU6, Metal7, and CUDA8 execution paths. It generally loads one model per process, so separate chat and speech models can run as separate servers on different ports.
An existing program sends requests to crane-serve and receives responses through an OpenAI-compatible chat API. Crane does not replace desktop-app features such as file management or conversation history. Project-level Metal support does not mean every model runs on Metal, so check the device support for each checkpoint.

Pin the commit and build for your device
The build below pins the commit reviewed on September 23, 2026. You need the Rust toolchain; macOS also needs Xcode Command Line Tools, while Linux with NVIDIA CUDA needs a compatible CUDA toolkit. Choose one Cargo command for your device rather than running all three.
Choose Metal and Accelerate on Apple Silicon Mac, CUDA on Linux with an NVIDIA GPU9, or the CPU build for a first check without a GPU. Model weights are not part of compilation, so download a model separately after building the executable.
git clone https://github.com/lucasjinreal/Crane.git
cd Crane
git checkout --detach 99a60887bdca16b4852b7bc953ca03c1df374e88cargo build --release -p crane-serve --features "metal,accelerate"cargo build --release -p crane-serve --features cudacargo build --release -p crane-serve
Check the chat path with a small Qwen model
The server executable needs model weights separately. Start with Qwen/Qwen3.5-0.8B, which is listed in the README and model card. This checkpoint also includes a vision encoder, but the first test is a text request summarizing meeting notes, so use the --text-only server option. Enabling one capability at a time makes failures easier to isolate.
Use hf download and confirm that the model directory contains configuration, tokenizer, and weight files. If uv is already installed, uvx hf runs the download tool in an isolated uv-managed environment, so a separate Python virtual environment10 is not needed. Otherwise, follow Hugging Face's OS-specific CLI11 installation instructions.
uvx hf download Qwen/Qwen3.5-0.8B --local-dir models/Qwen3.5-0.8BKeep the test server accessible only on this computer
The --model-name crane-local value is the name used in API requests, and --context 4096 sets the context limit for this test. Setting --host 127.0.0.1 accepts requests from this computer only. Crane's default host is 0.0.0.0, which listens on all network interfaces, so local testing should expose only the required scope.
Check the server log for its address and model-loading status. If the interface does not open automatically, visit http://127.0.0.1:8080/ in a browser; --ui provides the web interface. First test whether a short note receives a complete answer. If it fails, inspect the model path, text-only option, and logs before adding longer inputs or OCR.
./target/release/crane-serve --model-path models/Qwen3.5-0.8B --model-type qwen3_5_vl --text-only --model-name crane-local --host 127.0.0.1 --port 8080 --context 4096 --uiSend requests from an app through the OpenAI-compatible API
Calling the API directly with curl separates server checks from client configuration. curl -N displays streamed content without buffering, so you can see the first token12 and subsequent output. The request's model value must match crane-local from the server command. Supported Qwen templates can disable thinking mode with enable_thinking set to false.
Set the OpenAI-compatible client base URL to http://127.0.0.1:8080/v1 and the model name to crane-local. This example accepts unauthenticated requests only on localhost. If the app requires an API key and you enter a placeholder such as local, it does not become a server password or enable authentication. Use a non-sensitive note or short code explanation to verify the app reaches the same server as the browser test.
curl -N http://127.0.0.1:8080/v1/chat/completions -H 'Content-Type: application/json' -d '{"model":"crane-local","messages":[{"role":"user","content":"Say hello in one short sentence."}],"stream":true,"max_tokens":256,"temperature":0,"chat_template_kwargs":{"enable_thinking":false}}'Add OCR, ASR, and TTS after chat works
After confirming chat, review the repository's PaddleOCR-family, Qwen3-ASR, and Qwen3-TTS paths separately. OCR reads text from images, ASR13 converts speech to text14, and TTS15 produces audio from text, so they use different model types and inputs. For meeting transcription, process a short sample through a separate server using the model type and API format in its README. Separate ports reduce the chance that changing one feature interrupts another.
Use a non-sensitive sample before real recordings or receipts. Test separately whether OCR reads image text, ASR captures Korean speech, and TTS produces the needed language. A model's startup log and output quality are separate checks.
Recheck file format and GPU support for Bonsai 2
The Bonsai 2 Prism release is a designated GGUF16 containing PTQ1_0 or PQ2_0 ternary weights, not an ordinary GGUF. Crane adds an implementation that reads this special type and applies the TernaryLinear path. Use the specified Prism file rather than substituting a regular Q4 GGUF.
The official instructions describe CPU and NVIDIA CUDA execution for Bonsai 2; they do not say that Qwen3.5's Metal path applies unchanged. A successful Crane build on Mac does not guarantee Mac GPU acceleration for this model. Check memory use with the selected Prism file and context 4096 rather than estimating from the 27B parameter count alone.
./target/release/crane-serve \
--model-path /absolute/path/Ternary-Bonsai-2-27B-PTQ1_0.gguf \
--model-name bonsai-local --host 127.0.0.1 --port 8080 \
--context 4096 --uiCompare runtimes using the same task and conditions
For comparison with another runtime17, use the same meeting note and separate initial model loading and warm-up from the main measurements. After warm-up, run the same request three times and record the median, with time to first token18, generation speed, and total completion time kept distinct. This helps locate differences in input processing versus answer generation.
Match thinking mode, output limit, model, quantization19, and context length20 before attributing a speed difference to the backend. Record new requests separately from continuing conversations, and note different formats such as MLX and GGUF. Faster output is not a reason to switch if meeting summaries omit decisions; also consider whether required tasks complete reliably and environment-management time decreases.

Terminology notes
OCR — The process of recognizing characters in images or scanned documents and turning them into text. Table layout and reading order still need the original image to verify.
Back to the textAPI — A defined interface that lets other code call a program’s functions.
Back to the textInference — The process of using a trained model to compute an output for an input. Here, local inference means running the model on the user’s device.
Back to the textCheckpoint — A file containing saved model weights and related state. Versions or tasks in one model family may use different checkpoints.
Back to the textMLX — Apple’s machine-learning framework, which runs models using memory shared by the CPU and GPU on Apple Silicon.
Back to the textCPU — The central processor that runs the operating system and general-purpose instructions; in AI workloads it also handles tasks such as preprocessing and data movement.
Back to the textMetal — Apple’s low-level technology for graphics and parallel GPU computation.
Back to the textCUDA — A software platform for general-purpose computing on NVIDIA GPUs.
Back to the textGPU — A processor designed to handle many calculations in parallel. It performs model computations during AI inference.
Back to the textPython virtual environment — An isolated space for installing Python packages per project, helping reduce package-version conflicts.
Back to the textCLI — Short for Command-Line Interface: operating a program by entering commands in a terminal.
Back to the textToken — A unit into which a model divides input or output for processing.
Back to the textAutomatic Speech Recognition — Technology that recognizes spoken language in audio and converts it to text.
Back to the textSpeech-to-Text — The task or system that converts spoken audio into text. The term is often used interchangeably with Automatic Speech Recognition (ASR).
Back to the textText-to-Speech — Technology that converts text into spoken audio with pronunciation and prosody.
Back to the textGGUF — A file format for model data, widely used by llama.cpp-based tools.
Back to the textRuntime — The software environment that provides facilities needed while a program runs. In local AI, it can also refer to a model execution engine.
Back to the textTime to First Token — The time from sending a request until its first output token arrives.
Back to the textQuantization — A way to represent model weights or values with fewer bits, reducing storage and memory use. The coarser representation can also affect accuracy.
Back to the textContext window — The token span of input and generated content a model can handle in one request. The supported limit and memory use depend on the model and runtime settings.
Back to the text
Frequently asked questions
- What should you check first in this article?
- Crane is a Rust project built on Hugging Face Candle for running text, OCR, and speech models and connecting them to applications through the crane-serve HTTP API. Developers embedding inference in Rust or managing their own server can verify the chat path with a small Qwen3.5 model, then add the capabilities they need.
- How much memory does it need?
- The official instructions describe CPU and NVIDIA CUDA execution for Bonsai 2; they do not say that Qwen3.5's Metal path applies unchanged. A successful Crane build on Mac does not guarantee Mac GPU acceleration for this model. Check memory use with the selected Prism file and context 4096 rather than estimating from the 27B parameter count alone.
- Where can you check the conditions and sources?
- The server executable needs model weights separately. Start with Qwen/Qwen3.5-0.8B, which is listed in the README and model card. This checkpoint also includes a vision encoder, but the first test is a text request summarizing meeting notes, so use the --text-only server option. Enabling one capability at a time makes failures easier to isolate.
Read next
new model
Bonsai 2 27B: what to check before the 6 GB headline
Executable programs and extensions
Which local LLM app or serving engine should you start with?
Executable programs and extensions
Run local AI on a Mac with oMLX: prefill acceleration in 0.8.0rc1
Local speech recognition & synthesis
What is Qwen3-TTS? Turn text into speech on your computer
