/vibe:ollama-multimodal-modelfile-expertfrom vibe
Authors Ollama Modelfiles for vision-language models (LLaVA, Llama 3.2-Vision, MiniCPM-V) with mmproj projector handling and correct image-token templates. Use when creating or publishing multimodal model files.
Ships in vibe. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are an expert at authoring Ollama Modelfiles for vision-language models: LLaVA 1.5/1.6, Llama 3.2-Vision (11B/90B), MiniCPM-V, Pixtral, and Qwen2-VL. You wire the mmproj (multimodal projector) blob alongside the language model GGUF, format the image-token template correctly, and ship a single ollama create-buildable artifact.
Vision-LMs in the GGUF ecosystem ship as two files:
model-q4_K_M.gguf) — text decoder.mmproj-model-f16.gguf) — vision encoder + projector.The Ollama runtime loads both, runs the image through the vision encoder, projects it into the LM's embedding space, and inserts the resulting embeddings at the location of an <image> (or model-specific) marker in the prompt.
In a Modelfile, you reference the mmproj via the same FROM directive — Ollama autodetects the second blob when both are co-located in the GGUF source directory, or you reference an mmproj GGUF alongside the base.
FROM ./llava-v1.6-mistral-7b-Q4_K_M.gguf
FROM ./mmproj-llava-v1.6-mistral-7b-f16.gguf
TEMPLATE """{{ if .System }}{{ .System }}
{{ end }}{{ if .Prompt }}[INST] {{ .Prompt }} [/INST]
{{ end }}{{ .Response }}"""
PARAMETER stop "[INST]"
PARAMETER stop "[/INST]"
PARAMETER num_ctx 4096
SYSTEM """You are a vision assistant. Describe images concisely and accurately."""
Run:
ollama create my-llava -f Modelfile
ollama run my-llava "Describe this image: ./cat.jpg"
The CLI auto-detects the path-like token and routes the file as image input.
FROM ./Llama-3.2-11B-Vision-Instruct-Q4_K_M.gguf
FROM ./mmproj-Llama-3.2-11B-Vision-Instruct-f16.gguf
TEMPLATE """{{- if .System }}<|start_header_id|>system<|end_header_id|>
{{ .System }}<|eot_id|>{{ end }}
{{- range .Messages }}<|start_header_id|>{{ .Role }}<|end_header_id|>
{{ .Content }}<|eot_id|>{{ end }}<|start_header_id|>assistant<|end_header_id|>
"""
PARAMETER stop "<|eot_id|>"
PARAMETER num_ctx 8192
Llama 3.2-Vision uses the same instruct template as Llama 3 text — image tokens are inserted by the runtime, not the template.
FROM ./minicpm-v-2_6-Q4_K_M.gguf
FROM ./mmproj-minicpm-v-2_6-f16.gguf
TEMPLATE """{{ if .System }}<|im_start|>system
{{ .System }}<|im_end|>
{{ end }}{{ range .Messages }}<|im_start|>{{ .Role }}
{{ .Content }}<|im_end|>
{{ end }}<|im_start|>assistant
"""
PARAMETER stop "<|im_start|>"
PARAMETER stop "<|im_end|>"
PARAMETER num_ctx 8192
ChatML-style template. MiniCPM-V supports interleaved multi-image input.
curl http://localhost:11434/api/chat -d '{
"model": "my-llava",
"messages": [
{
"role": "user",
"content": "What is in this image?",
"images": ["'$(base64 -w0 cat.jpg)'"]
}
]
}'
Images go in the images array as base64 strings (no data: prefix). Multiple images allowed.
import ollama, base64
img = base64.b64encode(open("cat.jpg","rb").read()).decode()
resp = ollama.chat(model="my-llava", messages=[
{"role":"user","content":"What's in this image?","images":[img]}
])
print(resp["message"]["content"])
Recent convert_hf_to_gguf.py supports a --mmproj flag to extract the projector:
# Text decoder GGUF
python convert_hf_to_gguf.py /models/llava-v1.6-mistral-7b \
--outfile llava-1.6-mistral-7b-f16.gguf --outtype f16
# Multimodal projector (vision encoder + projector)
python convert_hf_to_gguf.py /models/llava-v1.6-mistral-7b \
--outfile mmproj-llava-1.6-mistral-7b-f16.gguf --mmproj
Then quantize the text path and keep mmproj at f16 (it's small):
./llama-quantize llava-1.6-mistral-7b-f16.gguf llava-1.6-mistral-7b-q4_K_M.gguf Q4_K_M
ollama run will succeed but error at first image with vision projector not loaded. Both FROM lines are required.<image> token in the template; the runtime inserts embeddings. MiniCPM-V variants sometimes do. Check the model's HF README.libmtmd, llama-mtmd-cli) replaced model-specific CLIs (llava-cli, qwen2vl-cli).ollama pull llava, ollama pull llama3.2-vision, ollama pull minicpm-v, ollama pull moondream./v1/chat/completions endpoint accepts image_url content blocks; Ollama translates these.ollama run.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub anubhavg-icpl/vibe --plugin vibe5,304 skills in this plugin
/3d-pipelineChoose a 3D generation or reconstruction pipeline given input type, output format, and use case. Use when you need help with 3d pipeline./8-bit-orbit-video-templateHyperframes Video TemplateShip a premium template-mode Hyperframes composition with a ready default showcase and deterministic timeline behavior./a2a-agent-specProduce the Agent Card and skills schema for an agent that should be callable over A2A. Use when you need help with a2a agent spec.Other plugins' skills for the same job