Shadeform primary logo

L40S vs L4

Explore a head to head comparison of specifications, performance, and pricing.

L40S

The NVIDIA L40S delivers high-performance computing capabilities for AI, machine learning, and data science applications.

ManufacturerNVIDIA
GPU Architecture
Average Price$5.06/hr
GPU VRAM48 GB
Cloud Availability7 clouds
System Memory1536 GB
CPU Cores142
Storage30.7 TB

L4

The NVIDIA L4 delivers high-performance computing capabilities for AI, machine learning, and data science applications.

ManufacturerNVIDIA
GPU Architecture
Average Price$3.56/hr
GPU VRAM24 GB
Cloud Availability1 clouds
System Memory384 GB
CPU Cores64
Storage500 GB

L40S vs L4: Which Should You Choose?

The L40S offers 48 GB of VRAM — 2× the 24 GB on the L4 — making it better suited for large model workloads that require holding more parameters in GPU memory. On FP16 throughput, the L40S delivers 91.61 TFLOPS versus 30.29 TFLOPS on the L4 — 3× faster for mixed-precision training and inference. Memory bandwidth favors the L40S at 0.86 TB/s compared to 0.30 TB/s on the L4, which directly impacts inference latency for memory-bandwidth-bound models. On Shadeform, the L40S starts from $0.74/hr versus $0.95/hr for the L4 — 28% more expensive — reflecting the performance premium. The L40S is available across 7 cloud providers on Shadeform compared to 1 for the L4, giving more options for region and pricing flexibility.

L40S — Best Use Cases

  • LLM inference and model serving
  • Image generation and diffusion models
  • Smaller fine-tuning runs
  • Cost-efficient GPU compute

Choose L40S when:

  • You need 48 GB+ VRAM for large models or long context windows
  • Cost efficiency is your primary concern
  • You are training large models or running high-throughput inference
  • You need flexibility across multiple cloud providers or regions

L4 — Best Use Cases

  • LLM inference and model serving
  • Image generation and diffusion models
  • Smaller fine-tuning runs
  • Cost-efficient GPU compute

Choose L4 when:

  • 24 GB VRAM is sufficient for your workload
  • Maximum performance justifies the higher cost
  • Your workload does not require peak FP16 throughput
  • Your preferred provider already has availability

See how the L40S & L4 compare

Compare detailed hardware specifications and average pricing for the L40S and L4.

Compare Hardware Specifications

L40SL4
GPU Type
L40S
L4
VRAM per GPU
48 GB
24 GB
Manufacturer
NVIDIA
NVIDIA
Architecture
Ada Lovelace
Ada Lovelace
Interconnect
PCIe Gen4
PCIe Gen4
Memory Bandwidth
864 GB/s
300 GB/s
FP16 TFLOPS
91.61 TFLOPS (1:1)
30.29 TFLOPS (1:1)
CUDA Cores
18176
7424
Tensor Cores
568 (4th Gen)
232 (4th Gen)
RT Cores
142 (3rd Gen)
58 (3rd Gen)
Base Clock
1110 MHz
795 MHz
Boost Clock
2520 MHz
2040 MHz
TDP
350W
72W
Process Node
TSMC 4N
TSMC 4N
Data Formats
INT4, INT8, FP8, BF16, FP16, TF32, FP32
FP8, INT8, BF16, FP16, TF32, FP32

Compare Average On-Demand Pricing

L40SL4
1 GPU
$1.28 /hr
$0.95 /hr
2 GPUs
$2.69 /hr
$1.90 /hr
4 GPUs
$5.37 /hr
$3.80 /hr
8 GPUs
$8.95 /hr
$7.60 /hr

Frequently Asked Questions: L40S vs L4

The main differences are VRAM (48 GB vs 24 GB), FP16 throughput (91.61 vs 30.29 TFLOPS).

The L40S is generally better for large language model training due to its higher throughput and 48 GB of VRAM, which allows fitting larger models or larger batch sizes in a single pass. For smaller models or fine-tuning tasks where cost matters more, both GPUs can be effective.

On Shadeform, the L40S is available from $0.74/hr. The L4 starts from $0.95/hr. Prices vary by provider, region, and contract length. Reserved commitments can reduce hourly costs significantly compared to on-demand pricing.

The L40S has more VRAM at 48 GB, compared to 24 GB on the L4. Higher VRAM allows you to run larger models without quantization, use longer context windows, and process larger batch sizes — all of which improve throughput and reduce latency for memory-bound workloads.

Based on TFLOPS per dollar, the L40S offers better raw compute value at current Shadeform on-demand rates. However, the best choice depends on your specific workload — if you need the extra VRAM or throughput of the L4, paying the premium may be justified by faster job completion and lower total cost.

The L40S is currently available across 7 cloud providers on Shadeform's network, compared to 1 for the L4. Shadeform lets you deploy either GPU across all available providers from a single platform, so you can always find available capacity without manually checking each cloud.

Mixing different GPU types in a single training cluster is generally not recommended, as it creates performance bottlenecks where faster GPUs wait for slower ones. For best results, use a homogeneous cluster of either L40S or L4. Shadeform supports on-demand clusters of up to 64 GPUs of the same type with no commitment required.

Explore L40S & L4 Instances

Browse available instances with L40S and L4 GPUs. Filter by provider, availability, and more to find the perfect instance for your needs.

Explore more GPU comparisons

Select any two GPUs to compare their specifications and explore pricing across providers.

Manage 30+ GPU clouds in one platform