NVIDIA L4 vs NVIDIA L40S, AI & Machine Learning Comparison

NVIDIA L4
NVIDIA L4
vs
NVIDIA L40S
NVIDIA L40S

NVIDIA L40S wins 150 of 159 benchmarks, averaging 159% faster.

Both cards were measured first-party on our bench, same suite, same test rig.

What the numbers say

The gap is widest in Z-Image Turbo (1024px), where NVIDIA L40S leads by 296% (4.6 vs 18.2 images/min); the closest fight is Qwen2.5 1.5B + 0.5B draft (2% apart); VRAM decides part of this one: NVIDIA L40S runs 152 of our 12 AI workloads while the other card runs 138, models that don't fit score zero.

Benchmark results head-to-head

BenchmarkNVIDIA L4NVIDIA L40SDifference
Qwen3-4B tok/s84212.05-60%
Llama 3.1 8B tok/s50.45135.51-63%
Qwen2.5-Coder 14B tok/s27.4674.6-63%
Qwen3-32B tok/s12.4234.44-64%
Llama 3.3 70B tok/s016.49n/a
Stable Diffusion XL images/min5.1817.02-70%
Z-Image Turbo images/min2.4758.325-70%
FLUX.1 dev images/min03.836n/a
FLUX.1 Kontext dev images/min01.693n/a
Qwen-Image-Edit images/min01.06n/a
Wan 2.2 5B (720p) frames/s0.150.49-69%
DeepSeek-R1 Distill Llama 8B tok/s50.39135.55-63%
DeepSeek-R1 Distill 1.5B tok/s191.38426.38-55%
DeepSeek-R1 Distill 14B tok/s27.3974.6-63%
DeepSeek-R1 Distill 7B tok/s53.27143.97-63%
Gemma 3 12B tok/s31.0180.92-62%
Gemma 3 4B tok/s82.03198.87-59%
Gemma 4 12B tok/s31.4980.82-61%
Llama 3.2 1B tok/s259.48618.87-58%
Llama 3.2 3B tok/s107.1270.85-60%
Mistral 7B v0.3 tok/s54.02144.74-63%
Mistral Small 24B tok/s17.3348.43-64%
Phi-4 14B tok/s27.2474.98-64%
Phi-4 Mini 3.8B tok/s88.48228.93-61%
Qwen2.5-Coder 7B tok/s53.26143.93-63%
Qwen3 0.6B tok/s357.79655.75-45%
Qwen3 1.7B tok/s177.5405.52-56%
Qwen3 14B tok/s27.6175.12-63%
Qwen3 30B A3B tok/s96.15213.66-55%
Qwen3 8B tok/s48.95130.27-62%
SmolLM3 3B tok/s112.07272.88-59%
TRELLIS Image-to-3D assets/hour284.8776.1-63%
Codestral 22B tok/s18.1450.06-64%
DeepSeek-R1 Distill 32B tok/s12.2834.6-65%
Devstral Small 24B tok/s17.3448.43-64%
Dolphin 2.9.1 Yi 1.5 34B tok/s11.9233.08-64%
Dolphin Mistral 24B Venice tok/s17.3448.43-64%
Dolphin X1 8B tok/s50.12135.48-63%
Dolphin 3.0 Llama 3.1 8B tok/s50.24135.55-63%
Dolphin 3.0 R1 Mistral 24B tok/s17.3248.4-64%
Gemma 3 27B tok/s14.1838.48-63%
Qwen2.5-Coder 32B tok/s12.2934.59-64%
Qwen3-Coder 30B A3B tok/s99.14219.04-55%
QwQ 32B tok/s12.2834.59-64%
StarCoder2 15B tok/s24.466.88-64%
Z-Image Turbo (1024px) images/min4.618.2-75%
BiRefNet images/min305.81863.81-65%
Depth Anything V2 Large images/min770.37959.33-20%
Depth Anything V2 Small images/min916.66970.61-6%
Dolphin X1 Trinity Nano 6B tok/s166.6246.45-32%
SAM ViT-Base images/min315.89998.79-68%
SAM ViT-Huge images/min70.46238.08-70%
Swin2SR 4x Upscaler images/min18.2334.14-47%
Sana 1.6B images/min13.8450.81-73%
FLUX.1 Schnell images/min026.24n/a
PixArt-Sigma XL images/min8.0826.95-70%
Qwen2.5-1.5B-Instruct tok/s191.39427.23-55%
AuraFlow v0.3 images/min1.023.58-72%
gpt-oss-20b tok/s91.78233.82-61%
Kokoro TTS 82M x realtime97.35243.99-60%
MusicGen Small x realtime1.012.43-58%
Phi-3.5-mini-instruct tok/s90.56229.06-60%
Qwen2.5-3B-Instruct tok/s110.84270.04-59%
Stable Diffusion 3.5 Large images/min04.54n/a
Stable Diffusion 3.5 Medium images/min2.9611.58-74%
Whisper large-v3 x realtime70.11193.2-64%
Florence-2 Base images/min174.65184.2-5%
Florence-2 Large images/min93.77106.54-12%
Qwen-AgentWorld-35B-A3B tok/s70.23156.98-55%
Meta-Llama-3.1-8B-Instruct tok/s50.36135.46-63%
Qwen2.5-7B-Instruct tok/s53.32143.94-63%
Ornith-1.0-35B tok/s70.31157.39-55%
Kwaipilot_KAT-Coder-V2.5-Dev tok/s79.01173.06-54%
Qwen2.5-0.5B-Instruct tok/s399.4738.06-46%
GLM-4.7-Flash tok/s75.03157.89-52%
DeepSeek-R1-0528-Qwen3-8B tok/s49.07130.23-62%
gemma-2-2b-it tok/s114.17278.1-59%
gemma-3-1b-it tok/s216.27426.49-49%
gemma-3-270m-it tok/s493.31822.52-40%
Ornith-1.0-9B tok/s43.35114.57-62%
Qwen_Qwen3-0.6B tok/s356.93656.26-46%
Qwen2.5-14B-Instruct tok/s27.3774.62-63%
CogVideoX-5B I2V clips/min00.383n/a
Qwen2.5 1.5B LoRA train tok/s3720.912120.1-69%
Qwen2.5 7B LoRA train tok/s1063.93736-72%
SmolLM2 1.7B LoRA train tok/s3240.212052.1-73%
TinyLlama 1.1B LoRA train tok/s475616408.1-71%
Stable Video Diffusion XT clips/min01.166n/a
Wan 2.2 TI2V-5B (image to video) clips/min01.606n/a
Qwen2.5 1.5B served serve tok/s18274686.8-61%
Qwen2.5 7B served serve tok/s469.91406.8-67%
SmolLM2 1.7B served serve tok/s1524.93525.9-57%
TinyLlama 1.1B served serve tok/s2584.36278.4-59%
AI21-Jamba-Reasoning-3B tok/s107.59258.41-58%
Olmo-3.1-32B-Think tok/s12.2734.11-64%
Dolphin-Mistral-24B-Venice-Edition tok/s17.248.43-64%
DarkIdol-Llama-3.1-8B-Instruct-1.2-Uncensored tok/s48.82134.78-64%
DeepSeek-Coder-V2-Lite tok/s110.11257.64-57%
DeepSeek-R1 Distill 14B (Q3_K_M) tok/s27.8785.85-68%
DeepSeek-R1-Distill-Qwen-32B-abliterated tok/s12.2634.43-64%
dolphin-2.9-llama3-8b tok/s50.04134.94-63%
EVA-Qwen2.5-14B-v0.2 tok/s27.374.63-63%
gemma-2-2b-it-abliterated tok/s113278.14-59%
gemma-2-9b tok/s33.888.87-62%
Gemma 3 12B (Q3_K_M) tok/s32.2993.05-65%
GLM-4.7-Flash-REAP-23B-A3B tok/s70.87146.51-52%
Josiefied-Qwen3-8B-abliterated-v1 tok/s48.72130.25-63%
Hermes-3-Llama-3.2-3B tok/s106.14265.87-60%
SmolLM3-3B tok/s110.77272.96-59%
L3-8B-Stheno-v3.2 tok/s50.07135.53-63%
LFM2.5-1.2B tok/s278.53661.54-58%
LFM2.5-8B-A1B tok/s170.2394.48-57%
Llama-2-7B tok/s56.06150.35-63%
Llama-3.2-3B-Instruct-uncensored tok/s101.16271.01-63%
Phi-4-mini tok/s87.21229.28-62%
Mistral-7B-Instruct-v0.1 tok/s53.6144.82-63%
Mistral-7B-Instruct-v0.2 tok/s53.31144.82-63%
Mistral-7B-Instruct-v0.3 tok/s53.66144.68-63%
Mistral-Nemo-Instruct-2407 tok/s33.0189.72-63%
NemoMix-Unleashed-12B tok/s33.0288.85-63%
Hermes-4-14B tok/s27.4875.1-63%
phi-2 tok/s114.99283.26-59%
Phi-4 14B (Q3_K_M) tok/s27.8689.18-69%
Qwen3-1.7B tok/s176.08405.3-57%
Qwen3-14B tok/s27.4875.01-63%
Qwen3-30B-A3B tok/s95.02214.05-56%
Qwen3-4B-Instruct-2507 tok/s83.03210.24-61%
Qwen3-8B tok/s48.34130.28-63%
Qwen1.5-0.5B tok/s431.41774.78-44%
Qwen2-1.5B tok/s189.18416.57-55%
Uncensored tok/s27.2974.31-63%
Qwen2.5-32B tok/s12.2434.59-65%
Qwen2.5-Coder-0.5B tok/s397.1715.81-45%
Qwen2.5-Coder-1.5B tok/s184.6427.12-57%
Qwen2.5-Coder-14B-Instruct-abliterated tok/s27.2974.63-63%
Qwen2.5-Coder-3B tok/s109.42269.9-59%
Qwen2.5-Coder-7B-Instruct-abliterated tok/s53.02142.97-63%
Qwen3-4B-Instruct-2507 tok/s83.13212.05-61%
Qwen3-4B-Thinking-2507 tok/s83.12211.88-61%
SmolLM2-135M tok/s652.15916.56-29%
Cydonia-24B-v4.3 tok/s17.348.43-64%
Codestral 22B (Q3_K_M) tok/s17.9659.53-70%
Mistral Small 24B (Q3_K_M) tok/s16.6258.21-71%
Qwen2.5-Coder 32B (Q3_K_M) tok/s12.0541.06-71%
Qwen3 30B A3B (Q3_K_M) tok/s94.03224.95-58%
Qwen2.5 1.5B + 0.5B draft x vs solo0.9680.946+2%
DeepSeek-R1-Distill-Llama-70B tok/s016.49n/a
Hermes-4-70B tok/s016.45n/a
Qwen3-Coder-Next-abliterated tok/s00n/a
Laguna-XS-2.1 tok/s00n/a
Llama-3.3-70B-Instruct-abliterated tok/s016.49n/a
Meta-Llama-3.1-70B tok/s016.49n/a
Nanbeige4.2-3B tok/s00n/a
Nemotron-3-Nano-30B-A3B tok/s0190.96n/a
Qwen3-Coder-Next tok/s00n/a
Qwen3-Next-80B-A3B-Thinking tok/s00n/a
Qwen3-Coder-Next tok/s00n/a
Qwen3-Next-80B-A3B-Thinking tok/s00n/a
Qwen3-Next-80B-A3B tok/s00n/a

Whole-job comparison

How long each card takes to finish a complete pipeline, not just one model. NVIDIA L4 is faster on 0 of 8; NVIDIA L40S on 8.

WorkflowNVIDIA L4NVIDIA L40SDifferenceCost per run
50-image depth pass17 s6 sNVIDIA L40S 2.80x faster$0.002 vs $0.001
30-minute podcast pass2 min75 sNVIDIA L40S 1.60x faster$0.015 vs $0.017
500-image masking run7.5 min2.2 minNVIDIA L40S 3.46x faster$0.055 vs $0.028
20-asset 3D game kit8.3 min2.9 minNVIDIA L40S 2.85x faster$0.061 vs $0.039
200-product catalogue cutout12.1 min6.2 minNVIDIA L40S 1.94x faster$0.089 vs $0.082
24-frame storyboard12.2 min4.1 minNVIDIA L40S 3.01x faster$0.089 vs $0.053
Full codebase review36.4 min13.5 minNVIDIA L40S 2.71x faster$0.267 vs $0.177
10 short social clips60.3 min19.1 minNVIDIA L40S 3.17x faster$0.442 vs $0.251

Renting by the hour, NVIDIA L40S finishes 7 of 8 cheaper. The quicker card is not automatically the cheaper way to get the work done.

Cost to rent

CardPer hour
NVIDIA L4$0.440
NVIDIA L40S$0.790

NVIDIA L4 is 1.80x cheaper per hour. Cheapest on-demand rate we see across RunPod and Vast.

Specifications compared

NVIDIA L4NVIDIA L40S
VRAM24GB48GB
ArchitectureAda LovelaceAda Lovelace
Memory bandwidth300 GB/s864 GB/s
Boost clock2,040 MHz2,520 MHz
TDP72 W350 W
Launch MSRP$2,500$7,500
Release2023-03-212023-08-08

FAQ

Which is better for ai & machine learning: NVIDIA L4 or NVIDIA L40S?
NVIDIA L40S performs better for ai & machine learning, winning 150 of 159 benchmarks in our suite with an average 159% advantage.
What are the main hardware differences between NVIDIA L4 and NVIDIA L40S?
NVIDIA L4 has 24GB VRAM and a 72W TDP, while NVIDIA L40S has 48GB VRAM and a 350W TDP.
Does VRAM matter more than speed between NVIDIA L4 and NVIDIA L40S?
For AI, yes, NVIDIA L40S fits 16 more of our 12 workloads than NVIDIA L4. A model that exceeds VRAM doesn't run slower, it doesn't run at all, so the card that fits the model wins that workload outright.
Where is the biggest performance difference between NVIDIA L4 and NVIDIA L40S?
Z-Image Turbo (1024px): NVIDIA L40S leads by roughly 296% (4.6 vs 18.2 images/min) in our testing.

NVIDIA L4 full review · NVIDIA L40S full review · All AI & Machine Learning rankings