GGUF quantizations of microsoft/Phi-4-multimodal-instruct —
a 5.6 B parameter multimodal model by Microsoft supporting text, vision (images), and audio inputs.
One mmproj for all:mmproj-phi4-mm-f16.gguf works with every text GGUF above.
It cannot be quantized further — the CLIP FF layer dimension (4304) is not divisible by 32.
VRAM Requirements
Full GPU offload (-ngl 99):
Configuration
VRAM
F16 + mmproj-F16
~10,000 MiB
Q8_0 + mmproj-F16
~5,400 MiB
Q4_K_M + mmproj-F16
~3,500 MiB
Quality Metrics
Perplexity (wikitext-2-raw test set, context 512)
Model
PPL
vs F16
F16 (baseline)
14.9338 ± 0.107
—
Q8_0
14.9107 ± 0.106
−0.15% ✅ lossless
Q4_K_M
16.3183 ± 0.121
+9.3%
Throughput (llama-bench, RTX 5090, pp512 / tg128)
Model
Prompt (t/s)
Generation (t/s)
Q8_0
21,352
247
Q4_K_M
19,904
324
Multimodal Benchmarks (lmms-eval)
VQA evaluation in progress — will be added when complete. Suite: MMStar, OCRBench, AI2D, MathVista, HallusionBench.
Usage
LM Studio (Recommended for Desktop)
LM Studio has native GGUF support including multimodal vision. No command-line needed.
Text-only:
Open LM Studio → search Swicked86/phi4-mm-gguf
Download phi4-mm-Q8_0.gguf (GPU) or phi4-mm-Q4_K_M.gguf (CPU / low VRAM)
Load the model → Chat
With vision (image input):
Download both phi4-mm-Q8_0.ggufandmmproj-phi4-mm-f16.gguf
Load the main model in LM Studio
In Model Settings → Multimodal → Vision Model (mmproj), browse to mmproj-phi4-mm-f16.gguf
In Chat, click the image icon to attach a photo and ask questions about it
The mmproj file is the vision encoder. Without it the model runs text-only. mmproj-phi4-mm-f16.gguf is compatible with all three text GGUFs.
llama.cpp CLI
Step 1 — Download the files
bash
1# Install huggingface-cli if needed2pip install huggingface_hub
34# Text + vision (recommended)5huggingface-cli download Swicked86/phi4-mm-gguf phi4-mm-Q8_0.gguf mmproj-phi4-mm-f16.gguf --local-dir ./phi4-mm
67# CPU / low-VRAM variant8huggingface-cli download Swicked86/phi4-mm-gguf phi4-mm-Q4_K_M.gguf mmproj-phi4-mm-f16.gguf --local-dir ./phi4-mm
> /image photo.jpg
Image loaded.
> What is in this image?
[model describes the image]
> /image chart.png
Image loaded.
> Summarise the trend shown in this chart.
[model analyses the chart]
> Explain the previous image again but in French.
[responds without re-loading the image]
Modality support summary for GGUF (llama.cpp / LM Studio)
Modality
Supported
Notes
Text
✅
All three GGUFs
Vision (images)
✅
Requires mmproj-phi4-mm-f16.gguf + --mmproj flag
Audio / Speech
❌
Not available — see below
Audio is not supported in the GGUF files. phi4-mm's speech capability uses a custom conformer-based audio encoder (24 conformer blocks, initialized from a proprietary AED ASR model) plus a rank-320 speech LoRA applied to the language decoder. The GGUF conversion pipeline (convert_hf_to_gguf.py) only exports the text transformer and the SigLIP vision encoder (mmproj) — the audio encoder tensors are not extracted. There is currently no audioproj equivalent in llama.cpp for phi4-mm.
To use audio/speech transcription, use the vLLM path below with the original bf16 safetensors model.
vLLM — Full Multimodal (Image + Audio, bf16 Safetensors)
Use vLLM when you want maximum quality and full multimodal support (images + audio) from the original bf16 safetensors weights. For constrained hardware, use the GGUF options above instead.
Requirements: Python 3.10+, CUDA GPU with ~16 GB VRAM, vLLM 0.7.0+
1 — Install vLLM and download the model
bash
1python3 -m venv ~/.vllm-env
2source ~/.vllm-env/bin/activate
3pip install --upgrade pip
4pip install vllm
56# Download the original safetensors model (~14 GB, 3 shards)7huggingface-cli login # paste your HF token if the model is gated8huggingface-cli download microsoft/Phi-4-multimodal-instruct \9 --local-dir ~/phi4-mm-hf
Stable context ceiling for phi4-mm (131 K nominal)
--kv-cache-memory-bytes
8G
Tune down to 4G on 12–16 GB GPUs
--limit-mm-per-prompt
{"image":3,"audio":3}
Max attachments per request
--tool-call-parser phi4_mini_json
—
phi4-mm emits functools[...] not Hermes — required for tool calling
--trust-remote-code
—
Required for phi4-mm's custom modelling code
Official vLLM LoRA flags: Microsoft's published vLLM command includes explicit LoRA adapter flags to activate
the rank-320 vision and speech adapters stored in separate subfolders of the model directory:
1from openai import OpenAI
23client = OpenAI(base_url="http://localhost:8080/v1", api_key="local")4response = client.chat.completions.create(5 model="phi4-mm",6 messages=[{"role":"user","content":"What is the capital of France?"}],7 max_tokens=256,8)9print(response.choices[0].message.content)
phi4-mm uses a custom conformer-based audio encoder with rank-320 speech LoRA — no separate ASR model needed.
Supported formats: wav, mp3, ogg, flac.
Tool calling
phi4-mm emits tool calls as functools[{"name":"...","arguments":{...}}].
The --tool-call-parser phi4_mini_json flag (vLLM 0.7+) handles this format automatically.
For a complete chat template that injects tools into phi4-mm's native <|tool|>...<|/tool|> block,
see deploy/wsl-vllm/phi4-mm-tool-template.jinja
in the companion repo.
Ollama (CPU / NUC / edge)
See the deploy/ folder for a complete Modelfile, NUC install script, and OpenClaw integration config.
FROM ./phi4-mm-Q4_K_M.gguf
PARAMETER num_ctx 8192
PARAMETER num_thread 8
PARAMETER num_gpu 0
PARAMETER flash_attn false
PARAMETER temperature 0.7
Architecture
Property
Value
Base model
Phi-4-Mini (3.8 B LLM backbone)
Total parameters
~5.6 B
GGUF arch
phi3
Context length
128 K tokens (131,072)
Modalities
Text, Vision (SigLIP-400M), Audio/Speech
The vision encoder (mmproj-phi4-mm-f16.gguf) is a SigLIP-400M encoder finetuned
with LLM2CLIP, with a 2-layer MLP projector. Audio/speech is not embedded in the GGUF — see the audio limitation callout above.