Microsoft · Phi

Phi-4

Phi-4 is a 14B chat and text-generation model available through supported Badgr execution routes.

Last validated or meaningfully updated: 2026-07-27

ChatFine-tunable

Availability

Badgr AI API

Available through Badgr

Dedicated endpoint

Available through Badgr

Custom GPU deployment

Available through Badgr

Deployment profile

Architecture
Phi3ForCausalLM
Licence
MIT
Minimum VRAM
~32GB
Context
16K tokens

Recommended: L40S 48GB. VRAM is an estimate and increases with context, cache, concurrency, and runtime overhead.

Model identity

Languages
en
Updated
29 days ago
HuggingFace revision
2db69c1c3e

Popularity and trust

Downloads (last month)

647.2K

Likes

2.3K

Spaces using this model

100

Files and formats

Weight formats

Safetensors

Repository files

21

Tokenizer

BPE

Chat template

Available

GPU deployment scenarios

Estimated from parameter count and quantisation. Will switch to “Verified by Badgr” once a real run backs a tier.

Testing

L40S 48GB

Short context, low concurrency

Small production

A100 80GB

8K context, 1-4 concurrent requests

Higher throughput

H100 80GB

32K context, continuous batching

Large production

L40S 48GB

Higher concurrency

Estimated — multimodal inputs, long context, and concurrency all increase real VRAM use beyond this estimate.

Also runs well on A100 80GB, H100 80GB. Available in United States, Europe, Asia Pacific.

Serving compatibility

RuntimeStatusNotes
vLLMEstimatedUsed for Badgr dedicated endpoints
TransformersDeclared by sourceBasic fallback
llama.cppRequires GGUF conversionNo GGUF weights found in repo
SGLangUnknownNot evaluated
TensorRT-LLMUnknownConversion may be required
TGIUnknownNot evaluated

Call this model through Badgr

curl https://api.aibadgr.com/v1/chat/completions \
  -H "Authorization: Bearer $BADGR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"microsoft/phi-4","messages":[{"role":"user","content":"Hello"}]}'

Ready-to-run Badgr configurations

Quick test

badgr serve microsoft/phi-4 --max-cost 2

Validated dedicated endpoint command

badgr serve microsoft/phi-4 --gpu L40S --max-cost 10

Advanced configuration (defaults to automatic)

  • Runtime
  • Quantisation
  • GPU and GPU count
  • Context length
  • Maximum concurrency
  • Region
  • Maximum hourly spend
  • Persistent or capped runtime

Estimated pricing

Provider estimate: cold start

3–6 min

Provider estimate: endpoint cost

$0.86 – $0.99/hr

Idle cost

$0 when stopped

Per-token throughput cost is not shown here: Badgr has not benchmarked this model yet, and this page does not display figures it cannot back with real data.

Recommended Badgr routes

L40S 48GB · United States

Available

from $0.86/hr

Best for

ComfyUI, vLLM Endpoint, Qwen 2.5 7B Instruct

Startup: 3–6 min

Reliability: Good

Last checked: just now

L40S 48GB · Europe

Available

from $0.86/hr

Best for

ComfyUI, vLLM Endpoint, Qwen 2.5 7B Instruct

Startup: 3–6 min

Reliability: Good

Last checked: just now

L40S 48GB · Asia Pacific

Available

from $0.86/hr

Best for

ComfyUI, vLLM Endpoint, Qwen 2.5 7B Instruct

Startup: 3–6 min

Reliability: Good

Last checked: just now

L40S 48GB · United States

Available

from $0.99/hr

Best for

ComfyUI, vLLM Endpoint, Qwen 2.5 7B Instruct

Startup: 3–6 min

Reliability: Good

Last checked: just now

L40S 48GB · Europe

Available

from $0.99/hr

Best for

ComfyUI, vLLM Endpoint, Qwen 2.5 7B Instruct

Startup: 3–6 min

Reliability: Good

Last checked: just now

L40S 48GB · Asia Pacific

Available

from $0.99/hr

Best for

ComfyUI, vLLM Endpoint, Qwen 2.5 7B Instruct

Startup: 3–6 min

Reliability: Good

Last checked: just now

Known limitations

  • Memory use increases with context length and concurrency.

Related troubleshooting