llamaperf

NVIDIA L4 vs M5 Ultra 256GB for local LLMs

3 reports on the NVIDIA L4 and 24 on the M5 Ultra 256GB

Which is faster for local LLMs?

On Qwen3.8 27B at 4-bit, the NVIDIA L4 has 14.6 generation tokens/s (one run); the M5 Ultra 256GB has 50.0 generation tokens/s (one run); prompt processing 1800.0 tokens/s (one run). Those are community reports whose engines and settings differ, so the gap is a rough sign, not a controlled measure of the two cards. Memory bandwidth, which caps how fast a card can write, is 4.1x higher on the M5 Ultra 256GB (300 GB/s on the NVIDIA L4, 1,229 on the M5 Ultra 256GB).

NVIDIA L4
Memory
24GB
Memory bandwidth
300 GB/s
FP16 compute
121 TFLOPS
Reports
3
M5 Ultra 256GB
Memory
256GB unified
Memory bandwidth
1,229 GB/s
FP16 compute
not on record
Reports
24

Measured on both

Generation and prompt processing speeds from plain runs (one device, one request, no speculative decoding, the whole model in the device's memory) of the same model size at the same bit class. Each side shows the engines and reported context behind its median. Context can mean a configured window or prompt depth, so these are community comparisons with differing settings. How to read these

ModelNVIDIA L4M5 Ultra 256GB
Qwen3.8 27B4-bit14.6one runllama.cppcontext not stated50.0one runPP 1800.0 (one run)oMLX8K context

Estimated by the calculator

The quant the calculator recommends for each card and its estimated speed at a 32,768-token context with 32 GB of system RAM, from memory bandwidth and the model's shape. Where a model was also measured above, the measurement wins.

ModelNVIDIA L4M5 Ultra 256GB
Qwen3.8 27B10.9 t/sQ4_K_M14.9 t/sFP16
Qwen3.8 125B · 6B active16.4 t/sQ2_K, experts in RAM50.8 t/sQ8_0
Qwen3.6 35B · 3B active38.5 t/sQ4_K_S53.5 t/sFP16
DeepSeek V4 Flash 284B · 13B activedoesn't fit at these settings66.9 t/sQ4_K_M
Qwen3.6 27B10.9 t/sQ4_K_M14.9 t/sFP16
Gemma 4 26B · 4B active24.5 t/sQ5_K_S40.1 t/sFP16
GLM-5.3 320B · 18B activedoesn't fit at these settings35.6 t/sQ3_K_M

Change the context, RAM or model in the calculator: NVIDIA L4 · M5 Ultra 256GB

Every report on each card, with its source: NVIDIA L4 · M5 Ultra 256GB

More comparisons