Skip to content
,

L40S vs A100: Which GPU Is Better for AI Inference, Training and Cost?

The L40S has more raw compute and FP8; the A100 has more memory, over twice the bandwidth and NVLink. A detailed L40S vs A100 comparison: full spec table, why the winner changes with batch size, LLM inference and training results, image generation, which models fit, cost per million tokens, current prices and clear recommendations by workload.

4 min read

L40S vs A100 — l40s vs a100

Short answer

In the L40S vs A100 comparison, neither GPU wins everything. The NVIDIA L40S (Ada Lovelace, 2023) has 48 GB of GDDR6 at 864 GB/s, 362 TFLOPS dense FP16 and native FP8 (733 TFLOPS), while the A100 80 GB (Ampere, 2020) has 80 GB of HBM2e at about 2 TB/s, 312 TFLOPS FP16, no FP8, plus NVLink and MIG. The L40S is usually cheaper to rent (median around $1.65 vs $2.19/hour on our tracker) and wins batched inference of models that fit in 48 GB, image generation and graphics. The A100 wins single-user latency, models over 40 GB, and multi-GPU training thanks to its bandwidth, memory and NVLink.

Specifications compared

SpecificationNVIDIA L40SNVIDIA A100 80 GB SXMA100 80 GB PCIe
ArchitectureAda Lovelace (AD102)Ampere (GA100)Ampere (GA100)
Launch202320202020
CUDA cores18,1766,9126,912
Tensor cores568 (4th gen)432 (3rd gen)432 (3rd gen)
RT cores142NoneNone
Memory48 GB GDDR6 ECC80 GB HBM2e80 GB HBM2e
Bandwidth864 GB/s2,039 GB/s1,935 GB/s
FP3291.6 TFLOPS19.5 TFLOPS19.5 TFLOPS
TF32 tensor (dense)183 TFLOPS156 TFLOPS156 TFLOPS
FP16/BF16 tensor (dense)362 TFLOPS312 TFLOPS312 TFLOPS
FP8 tensor (dense)733 TFLOPSNot supportedNot supported
FP64Minimal9.7 TFLOPS (19.5 tensor)9.7 TFLOPS
NVLinkNo600 GB/sBridge, 600 GB/s
MIGNoUp to 7Up to 7
Power350 W400 W300 W
Form factorDual-slot PCIe Gen4, passiveSXM4Dual-slot PCIe
Video encode/decode3 NVENC (AV1), 3 NVDECNVDEC/JPEG onlyNVDEC/JPEG only

See NVIDIA A100 specs and how to read a GPU spec sheet.

The key trade-off: compute vs bandwidth

LLM inference has two phases:

  • Prefill (processing the prompt) is compute-bound: the L40S's higher FP16 and FP8 throughput helps.
  • Decode (generating each token) is memory-bandwidth-bound at small batch sizes: the A100's 2.4× bandwidth helps.

As batch size grows, decoding becomes more compute-bound, shifting the advantage to the L40S. See prefill vs decode and GPU memory bandwidth.

LLM inference: the winner depends on batch size

Approximate vLLM throughput reported in a 2026 comparison (Llama 3.1 70B on two GPUs; L40S in FP8, A100 in BF16). Treat these as indicative.

Batch size2 × L40S (FP8)2 × A100 80 GB (BF16)Winner
1 (single user)~90 tok/s~170 tok/sA100 (bandwidth)
8~800 tok/s~500 tok/sL40S
32~2,600 tok/s~1,400 tok/sL40S (FP8 compute)

Interpretation: for interactive, low-concurrency use, the A100 feels faster. For high-throughput serving, the L40S's FP8 tensor cores deliver more tokens per dollar. Note that FP8 also halves memory use compared with BF16. See LLM inference engines compared.

Which models fit

ModelPrecisionSizeL40S (48 GB)A100 (80 GB)
8BFP1616 GBYesYes
14BFP1628 GBYesYes
32BFP832 GBYes (modest KV cache room)Yes (INT8/weight-only)
32BFP1664 GBNoYes (tight)
70BFP8 / 8-bit70 GBNo (needs 2)Tight on 1
70B4-bit~40 GBTightYes

Use the VRAM calculator.

Training and fine-tuning

WorkloadBetter choiceWhy
LoRA/QLoRA on 7–14BEither; L40S often cheaperCompute similar; memory sufficient
Full fine-tuning of 7B+A10080 GB and NVLink
Multi-GPU trainingA100 SXM600 GB/s NVLink vs PCIe only on L40S
FP8 training (Transformer Engine)L40S supports FP8A100 doesn't
HPC with FP64A100L40S has minimal FP64

See What is LoRA? and distributed training parallelism.

Image generation, video and graphics

The L40S is a clear winner for Stable Diffusion/FLUX throughput, rendering, virtual workstations and video pipelines: it has RT cores, NVENC with AV1, display-class graphics features and strong FP16/FP32 throughput. The A100 has no RT cores or video encoders. See best GPU for Stable Diffusion.

Prices

On our GPU price tracker (November 30, 2026):

GPULowest on-demandTypical
L40S (48 GB)~$0.80/hr~$1.65/hr
A100 (80 GB)~$0.89/hr~$2.19/hr median

Comparison site getdeploying lists about 42 providers renting the L40S and 49 renting the A100, with median on-demand prices around $1.62 and $1.96 respectively. Purchase prices: the L40S sells for roughly $7,000–$10,000 new; the A100 80 GB for roughly $8,000–$15,000 new. See A100 price.

Cost per million tokens (example)

Using the batch-32 figures above and typical prices for two GPUs:

SetupHourly cost (2 GPUs)ThroughputCost per 1M tokens
2 × L40S (FP8)~$3.30~2,600 tok/s~$0.35
2 × A100 (BF16)~$4.38~1,400 tok/s~$0.87

At high concurrency, the L40S can be roughly 2× cheaper per token. At batch 1, the A100 can be cheaper per token despite its higher price. See LLM inference cost per token.

Power and deployment

  • L40S: 350 W, passive PCIe card for standard servers (up to 8 per server), no NVLink.
  • A100 SXM: 400 W in HGX servers with NVSwitch; A100 PCIe at 300 W fits standard servers.
  • Both are air-coolable. See GPU power consumption.

Recommendations

WorkloadPick
High-concurrency chatbot or API serving (models ≤ 32B)L40S
Low-latency single-user inferenceA100
Models over 40 GB on one GPUA100 80 GB
Multi-GPU trainingA100 SXM
Fine-tuning small models on a budgetL40S
Image/video generation, renderingL40S
Scientific computing (FP64)A100
Multi-tenant GPU sharingA100 (MIG)

For newer options, compare the H100 and RTX PRO 6000 Blackwell.

Frequently asked questions

Is the L40S faster than the A100?

For compute-heavy and high-batch FP8 workloads, yes. For memory-bandwidth-bound tasks like single-user LLM generation, the A100 is faster.

Is the L40S good for LLM training?

It works well for fine-tuning and smaller training jobs. For large multi-GPU training, the A100 (or H100) with NVLink is better.

Why is the L40S cheaper than the A100?

It uses GDDR6 instead of expensive HBM, has no NVLink, and is a PCIe card based on the same chip family as workstation GPUs.

Does the L40S support FP8?

Yes. Its fourth-generation tensor cores support FP8 with the Transformer Engine; the A100 does not.

Sources and further reading

Think you understand it now? Prove it.

Solve real Tensor Core math in the TensorCore.si Challenge and earn a certificate with your name.

Take the challenge

Leave a Reply

Your email address will not be published. Required fields are marked *