Instructions to use ajvikram/cranebear-vlm-4b-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use ajvikram/cranebear-vlm-4b-gguf with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf ajvikram/cranebear-vlm-4b-gguf:F16 # Run inference directly in the terminal: llama cli -hf ajvikram/cranebear-vlm-4b-gguf:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf ajvikram/cranebear-vlm-4b-gguf:F16 # Run inference directly in the terminal: llama cli -hf ajvikram/cranebear-vlm-4b-gguf:F16
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf ajvikram/cranebear-vlm-4b-gguf:F16 # Run inference directly in the terminal: ./llama-cli -hf ajvikram/cranebear-vlm-4b-gguf:F16
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf ajvikram/cranebear-vlm-4b-gguf:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf ajvikram/cranebear-vlm-4b-gguf:F16
Use Docker
docker model run hf.co/ajvikram/cranebear-vlm-4b-gguf:F16
- LM Studio
- Jan
- vLLM
How to use ajvikram/cranebear-vlm-4b-gguf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ajvikram/cranebear-vlm-4b-gguf" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ajvikram/cranebear-vlm-4b-gguf", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/ajvikram/cranebear-vlm-4b-gguf:F16
- Ollama
How to use ajvikram/cranebear-vlm-4b-gguf with Ollama:
ollama run hf.co/ajvikram/cranebear-vlm-4b-gguf:F16
- Unsloth Desktop
- Pi
How to use ajvikram/cranebear-vlm-4b-gguf with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf ajvikram/cranebear-vlm-4b-gguf:F16
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "ajvikram/cranebear-vlm-4b-gguf:F16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use ajvikram/cranebear-vlm-4b-gguf with Docker Model Runner:
docker model run hf.co/ajvikram/cranebear-vlm-4b-gguf:F16
- Lemonade
How to use ajvikram/cranebear-vlm-4b-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull ajvikram/cranebear-vlm-4b-gguf:F16
Run and chat with the model
lemonade run user.cranebear-vlm-4b-gguf-F16
List all available models
lemonade list
- Hermes Agent
How to use ajvikram/cranebear-vlm-4b-gguf with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf ajvikram/cranebear-vlm-4b-gguf:F16
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default ajvikram/cranebear-vlm-4b-gguf:F16
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use ajvikram/cranebear-vlm-4b-gguf with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf ajvikram/cranebear-vlm-4b-gguf:F16
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "ajvikram/cranebear-vlm-4b-gguf:F16" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
CraneBear VLM 4B (GGUF) โ transcript + optional photo โ extraction JSON
A LoRA fine-tune of Qwen3-VL-4B-Instruct
that turns a panic emergency voice transcript, with an optional photo, into
the same 7-key extraction JSON the CraneBear text model emits, for a human
dispatcher. Ships as a Q4_K_M text GGUF plus an f16 multimodal projector, for
llama.cpp / llama-server / the iOS mtmd path.
The model extracts. A human decides. It never triages, dispatches, or advises. Severity bands are evidence labels for a trained dispatcher.
This repo replaces ajvikram/emergency-vision-triage-2b-gguf, which was a
text-only decoder with no vision tower despite its name (documented in the
training write-up); that repo is deprecated.
Two checkpoints
| File | Use it for | 24-case held-out set (partner's, text-only) |
|---|---|---|
vlm-v2-r2-q4_k_m.gguf |
best text extraction (no photo) | 93.8% macro, 0% missed-IMMEDIATE (raw 92.7%) |
vlm-v2-r3-q4_k_m.gguf + mmproj-vlm-v2-r3-f16.gguf |
transcript + photo | 91.7% macro, 0% missed-IMMEDIATE (raw 88.5%) |
For reference, the partner's production text model (cranebear-extraction-4b,
round 3) scores 91.7% / 0% on the same set, on-contract. Both checkpoints here
were trained on the same 800-row round-3 text set; r3 adds 1,018
(transcript, photo) pairs.
Status: what is and is not established
Established, measured:
- Text contract: both checkpoints pass the partner's blocking gate (0% missed-IMMEDIATE, asserted) and the โฅ90% macro gate on their 24-case set.
- The vision path is real: r3 reads hazards from photos (7/7 on the photo-adds slice of a 60-case photo set), ignores irrelevant photos in 14/18 cases, and over-triages far less than a text-only checkpoint shown the same photos (false-IMMEDIATE 3/16 vs 16/31).
- Served through
llama-serverand through the partner's Swift/mtmdpath, the two stacks agree on these numbers.
Not established โ do not treat as production-safe for photo input yet:
- The 60-case photo eval set carries proposed, unratified labels and only 34 sourced photos. On it, r3 still has 1 missed-IMMEDIATE, 1 photo-subtracted severity, 2 photo-only HIGH confidences.
- Those last two classes go to zero for every checkpoint when the caller applies the text-first merge (below). That merge is a caller-side guardrail; it is not inside the weights.
- The photo training taught four rules (a photo may add a hazard; a photo never subtracts; photo-only evidence never HIGH; an irrelevant photo changes nothing). It did not teach a photo supplying a rule-1 sign (a person under rubble) or a casualty count โ no public image set covers that ethically.
- Never run on a phone. All numbers are llama.cpp on a Mac.
Serving contract (must match exactly)
- Prompt: the SYSTEM text in
Modelfile.vlm-v2-r3(byte-identical to the CraneBear text model's round-3 prompt). With a photo, append the paragraph inphoto_addendum.pyto the system prompt and place the image beforeTranscript:in the user turn. - No think block. Qwen3-VL-Instruct's template has none; rendering one is a served/trained mismatch.
- Grammar:
cranebear-extraction-presence.gbnf. The model emits a presence-encoded object (no nulls); the consumer maps sentinels to nulls. - Greedy (temperature 0). Photos downscaled to 512 px longest side (~200 image tokens).
llama-server -m vlm-v2-r3-q4_k_m.gguf --mmproj mmproj-vlm-v2-r3-f16.gguf -c 4096 -ngl 99
# POST /v1/chat/completions with the system prompt (+ addendum), an image_url
# content part, "Transcript:\n<text>", and "grammar": <the gbnf>.
Recommended caller-side merge for photo input (what the partner's
Guardrails.mergePhoto does): run the text-only pass first, then the photo
pass; take severity = max on MINOR < DELAYED < IMMEDIATE (DECEASED only from
text), OR the hazard bits, keep a stated casualty count, and cap photo-only
severity confidence at MEDIUM. Measured: this removes every "photo subtracted"
and "photo-only HIGH" case for every checkpoint tested.
Training
- Base
Qwen/Qwen3-VL-4B-Instruct(16-bit), LoRA r=16 on the language tower, vision encoder frozen, early stopping on eval loss, best checkpoint loaded. - r2: 800 text rows (partner-schema, presence-encoded), 4 epochs, ~3.4 h.
- r3: + 1,018 photo pairs from 880 Wikimedia Commons photos (CC0 / CC BY / CC BY-SA / PD, recorded per file) with deterministic labels derived from each photo's category and the four photo rules โ no teacher model. 300 steps, ~6.9 h. mmproj is byte-identical to the base's (frozen tower).
- Hardware: NVIDIA DGX Spark (GB10). Reproduction scripts, data engines, eval
harnesses and the full round-by-round record (including a documented
negative round 4) live in the
slm-factoryrepo.
Files
vlm-v2-r2-q4_k_m.gguf,vlm-v2-r3-q4_k_m.ggufโ text models (Q4_K_M, 2.5 GB)mmproj-vlm-v2-r3-f16.ggufโ vision projector for r3 (839 MB)cranebear-extraction-presence.gbnfโ grammarModelfile.vlm-v2-r2,Modelfile.vlm-v2-r3โ Ollama Modelfiles (SYSTEM block = the prompt)photo_addendum.pyโ the photo paragraph, with its SHAevals/โ the raw eval printouts behind every number aboveSHA256SUMS
- Downloads last month
- 224
4-bit
Model tree for ajvikram/cranebear-vlm-4b-gguf
Base model
Qwen/Qwen3-VL-4B-Instruct