Run Phi-4-mini 3.8B on a VPS.

Prices checked

The cheapest VPS that runs Phi-4-mini 3.8B is Leaseweb VPS 1 at $5.02 a month, with 6 GB of RAM for the 5 GB it needs, checked .

Best plans for Phi-4-mini 3.8B

Most tokens per second for your money, comfortable fits first.

  1. 1

    VPS 1 · 4 vCPU / 6 GB · Europe

    Leaseweb · 4C · 6 GB · ~4.1–8.2 tok/s

    $5.02/mo
  2. 2

    VPS 1 · 4 vCPU / 6 GB · UK

    Leaseweb · 4C · 6 GB · ~4.1–8.2 tok/s

    $6.02/mo
    View
  3. 3

    VPS 2 · 6 vCPU / 16 GB · Europe

    Leaseweb · 6C · 16 GB · ~6.2–12 tok/s

    $9.04/mo
    View
  4. 4

    VPS 1 · 4 vCPU / 6 GB · US

    Leaseweb · 4C · 6 GB · ~4.1–8.2 tok/s

    $6.29/mo
    View
  5. 5

    VPS 2 · 6 vCPU / 16 GB · UK

    Leaseweb · 6C · 16 GB · ~6.2–12 tok/s

    $9.63/mo
    View
  6. 6

    VPS 2 · 6 vCPU / 16 GB · US

    Leaseweb · 6C · 16 GB · ~6.2–12 tok/s

    $9.89/mo
    View

What it needs

RAM needed

5 GB

CPU inference at Q4_K_M

Weights

2.5 GB

Q4_K_M

KV cache

1 GB

8K context

OS and runtime

1.5 GB

headroom

MIT-licensed small model that is unusually good at math and function calling.

Size
3.84B parameters
Context
128K tokens
Kind
chat
Released
2025-02
License
MIT

Facts from Hugging Face: exact GGUF file sizes, KV geometry from the GGUF header, 346,389 downloads.

ollama run phi4-mini:3.8bmodel card Microsoft

Or rent a GPU

every GPU price

1 provider rents the RTX A5000, with 24 GB of GPU memory against the 5 GB Phi-4-mini 3.8B needs.

Cheapest board that fits

RTX A5000

24 GB of GPU memory

On demand

$0.16per GPU an hour

RunPod

Held for a month

$116.80

730 hours of RTX A5000 · Community Cloud

Or buy hardware

all machines

14 reference machines fit Phi-4-mini 3.8B.

  1. Raspberry Pi 5 (16 GB)

    Approximate

    16 GB · 17 GB/s · ~1.9–2.9 tok/s

    $305= 61 mo of VPS
  2. GeForce RTX 5060 Ti 16 GB (card only)

    Approximate

    16 GB · 448 GB/s · ~100+ tok/s

    $456= 91 mo of VPS
  3. Mac mini (M6, 16 GB)

    16 GB · 153 GB/s · ~35–53 tok/s

    $899= 10+ yrs of VPS
  4. GeForce RTX 5070 Ti 16 GB (card only)

    Approximate

    16 GB · 896 GB/s · ~100+ tok/s

    $1,190= 10+ yrs of VPS
  5. Mac mini (M6, 32 GB)

    32 GB · 153 GB/s · ~35–53 tok/s

    $1,299= 10+ yrs of VPS
  6. GeForce RTX 5080 16 GB (card only)

    Approximate

    16 GB · 960 GB/s · ~100+ tok/s

    $1,650= 10+ yrs of VPS

Buy · per month

$8.78

$8.47 hardware + $0.31 power

Rent · per month

$5.02

Leaseweb VPS 1 · 4 vCPU / 6 GB · Europe

Break-even

The Raspberry Pi 5 (16 GB) pays for itself after 65 months of replacing the VPS, and it streams an estimated 1.9–2.9 tok/s against the VPS's CPU-only pace.

How we count

On a CPU-only VPS Phi-4-mini 3.8B needs about 5 GB of RAM: 2.5 GB of Q4_K_M weights, 1 GB of KV cache for an 8,192-token context and 1.5 GB for the OS and runtime. 260 of the 527 plans in the index fit and include a disk. A plan runs it comfortably with 20% headroom over the total, and is a tight fit with exactly enough.

Other quants: Q8_0 weights take 4.1 GB (near-lossless, about half of F16); F16 takes 7.7 GB.

The plans are ranked by estimated tokens per second per dollar, comfortable fits first. Speed is effective memory bandwidth divided by active weight bytes (4 GB/s per shared vCPU, 6 per dedicated), shown as a band. Real numbers depend on the host CPU generation, AVX-512 and AMX support and how noisy the neighbours are, so treat them as an order of magnitude.

A GPU rate is per GPU for an hour, and the monthly figure is 730 hours of the whole instance at it, tax excluded.

A machine tagged approximate is priced at the typical US street price in August 2026 rather than its maker's own price. Local speed is peak bandwidth times 0.7 efficiency (0.35 on CPU-only boards) divided by active weight bytes; unified-memory machines are assumed to give models 75% of their RAM. GPU cards need a host PC that is not in the price.

Frequently asked

How much RAM does Phi-4-mini 3.8B need?
About 5 GB for CPU inference at Q4_K_M: 2.5 GB of weights, 1 GB of KV cache at 8,192 tokens of context, and 1.5 GB of headroom. Longer contexts need more KV cache (128 KB per token for this model).
What is the cheapest VPS that can run Phi-4-mini 3.8B?
Leaseweb VPS 1 · 4 vCPU / 6 GB · Europe (6 GB RAM, 4 vCPU) at $5.02/mo excl. VAT runs it comfortably as of 31 Oct 2026.
How fast will Phi-4-mini 3.8B run on a VPS without a GPU?
Roughly 4.1–8.2 tok/s on the top pick. Token generation is limited by memory bandwidth, because each new token reads all of the weights once. More vCPUs help, dedicated ones most, but a GPU or an Apple silicon machine is 10 to 50 times faster.

Same lineup

Same size class