RunsOnMy ModelsGPUs & MacsBy VRAMAPI pricesVRAM calculatorNew

Can phi 4 run on the L40S?

Yes. At 8K context the best fit is F16, using about 29.5 GB of the 45.6 GB usable on the L40S. Estimated speed ceiling: ~29 tokens/sec.

Memory by quant and context

Quant4K ctx8K ctxMax tok/s (est., 8K)
2-bit (Q2_K) •6.6 GB Fits7.4 GB Fits154
3-bit (Q3_K_M) •8.1 GB Fits8.9 GB Fits120
4-bit (Q4_K_M) •9.7 GB Fits10.4 GB Fits97
5-bit (Q5_K_M) •11.1 GB Fits11.9 GB Fits83
6-bit (Q6_K) •12.6 GB Fits13.4 GB Fits72
8-bit (Q8_0) •15.9 GB Fits16.7 GB Fits55
16-bit (F16/BF16) •28.7 GB Fits29.5 GB Fits29

• real GGUF file size from unsloth/phi-4-GGUF. Speed is a bandwidth ceiling (864 GB/s), not a benchmark. Methodology.

More

phi 4 on every GPU and Mac · Every model that runs on the L40S · Other models that fit 48 GB VRAM · Try other settings in the calculator

Data: Hugging Face Hub (microsoft/phi-4), NVIDIA specs. Data as of 2026-11-17.