// comparison

NVIDIA L4 vs L40S for LLM inference

The NVIDIA L4 has 24 GB of GPU memory and the NVIDIA L40S has 48 GB, which in 16-bit weights caps the model at about 12 billion parameters on the NVIDIA L4 and about 24 billion on the NVIDIA L40S before any memory for the KV cache.

Updated

Published

  • NVIDIA L4
  • NVIDIA L40S

Disclosure: 9owls publishes Launchables on both GPUs; NVIDIA did not pay for or review this page. Criteria: GPU memory and bandwidth from NVIDIA's product pages, model fit by arithmetic, hourly prices from dated Brev console reads, and our own fresh-deploy test records from 2026-11-15 and 2026-11-19. We ran no throughput or concurrency test.

NVIDIA L4 has 24 GB and L40S 48 GB; a 70B model in 4-bit fits only the L40S; prices about $1.02/hr and $2.26/hr as dated.
The NVIDIA L4 has 24 GB of GPU memory and 300 GB/s of bandwidth; the NVIDIA L40S has 48 GB and 864 GB/s. Counting weights only, an 8B model in 16-bit and a 32B model in 4-bit fit both, and a 70B model in 4-bit fits only the L40S. Brev console list prices were about $1.02 an hour for GCP g2-standard-8 (2026-11-15) and about $2.26 an hour for AWS g6e.xlarge (2026-11-19). Source: NVIDIA product pages, Brev console, 9owls fresh-deploy tests.
On this page

How much GPU memory does each have?

How much GPU memory does each have?
GPUGPU memoryMemory bandwidthSource
NVIDIA L424 GB300 GB/sNVIDIA L4 product page (external site)
NVIDIA L40S48 GB GDDR6 with ECC864 GB/sNVIDIA L40S product page (external site)

Which models fit in 24 GB and in 48 GB?

The arithmetic below counts model weights only. Assumption: weight memory in GB equals the parameter count in billions times the bytes per weight, with 1 GB taken as one billion bytes. 16-bit weights use 2 bytes each, 8-bit weights 1 byte and 4-bit weights half a byte.

Which models fit in 24 GB and in 48 GB?
Model size16-bit weights4-bit weightsNVIDIA L4 (24 GB)NVIDIA L40S (48 GB)
8Babout 16 GBabout 4 GB16-bit fits, about 8 GB left16-bit fits, about 32 GB left
32Babout 64 GBabout 16 GB4-bit fits, about 8 GB left4-bit fits, about 32 GB left; 16-bit does not fit
70Babout 140 GBabout 35 GBDoes not fit, even in 4-bit4-bit fits, about 13 GB left

On the NVIDIA L4 (24 GB), an 8B model in 16-bit weights leaves about 8 GB, and a 32B model in 4-bit weights leaves about 8 GB. A 70B model does not fit, even in 4-bit weights.

On the NVIDIA L40S (48 GB), an 8B model in 16-bit weights leaves about 32 GB, a 32B model in 4-bit weights leaves about 32 GB, and a 70B model in 4-bit weights leaves about 13 GB. A 32B model in 16-bit weights does not fit.

To choose a serving engine for the model, see Ollama vs vLLM; Serve an OpenAI-compatible API with vLLM walks through serving a model with vLLM.

NVIDIA L4 vs L40S: which Launchables default to each?

Four Launchables on the Launchables page default to the NVIDIA L4 (24 GB). The other fifteen default to the NVIDIA L40S (48 GB). How to deploy a Launchable on NVIDIA Brev covers the deploy steps, and Run Open WebUI with vLLM on a cloud GPU covers the Open WebUI + vLLM stack.

NVIDIA L4 vs L40S: which Launchables default to each?
LaunchableDefault GPU
Ollama + Open WebUI starterNVIDIA L4 (24 GB)
Wan 2.2 Video Studio (ComfyUI)NVIDIA L4 (24 GB)
Chatterbox + WhisperX Voice LabNVIDIA L4 (24 GB)
RAPIDS Data Science with cuDF and cuMLNVIDIA L4 (24 GB)
Open WebUI + vLLMNVIDIA L40S (48 GB)
ComfyUI ProNVIDIA L40S (48 GB)
LoRA Training (ai-toolkit + kohya_ss)NVIDIA L40S (48 GB)
RAGFlow on your own GPUNVIDIA L40S (48 GB)
LlamaFactory (LlamaBoard)NVIDIA L40S (48 GB)
Nemotron Chat with Open WebUI and vLLMNVIDIA L40S (48 GB)
OpenHands Coding Agent on NemotronNVIDIA L40S (48 GB)
Paperclip Multi-Agent Team on NemotronNVIDIA L40S (48 GB)
NeMo Guardrails + garak LLM Security LabNVIDIA L40S (48 GB)
Nemotron Omni Multimodal StudioNVIDIA L40S (48 GB)
Cosmos 3 Nano World Model StudioNVIDIA L40S (48 GB)
Isaac LabNVIDIA L40S (48 GB)
PipecatNVIDIA L40S (48 GB)
Open Notebook on NemotronNVIDIA L40S (48 GB)
RAGFlow RAG with NVIDIA NemotronNVIDIA L40S (48 GB)

NVIDIA L4 vs L40S: what does each cost per hour on NVIDIA Brev?

Prices are Brev console list prices for the instance types our Launchables use, each with its read date. They change; check the console before you deploy.

NVIDIA L4 vs L40S: what does each cost per hour on NVIDIA Brev?
GPUInstance typePrice per hourRead
NVIDIA L4GCP g2-standard-4about $0.85Brev console, 2026-11-15
NVIDIA L4GCP g2-standard-8about $1.02Brev console, 2026-11-15
NVIDIA L40SAWS g6e.xlargeabout $2.26Brev console, 2026-11-19
NVIDIA L40SAWS g6e.xlarge, the Open WebUI + vLLM defaultabout $2.25Brev deploy page, 2026-12-03

What did our tests record on each GPU?

These are our own fresh-deploy test records, one run each. They show how much memory each stack used, not throughput.

What did our tests record on each GPU?
GPULaunchableTest dateGPU memory in use
NVIDIA L4Ollama + Open WebUI starter, gpt-oss:20b2026-11-1512488 of 23034 MiB
NVIDIA L4Hermes Agent on Nemotron 3.5 Bolt, llama.cpp2026-11-194492 of 23034 MiB
NVIDIA L40SNemotron Chat, vLLM2026-11-1540781 of 46068 MiB
NVIDIA L40SOpen Notebook on Nemotron, two vLLM servers and speech2026-11-1539724 of 46068 MiB

Two vLLM servers on one NVIDIA L40S need their memory shares set with care; see the cache-blocks error.

Where do billing, stopping and packaging my own repository live?

Billing and stopping are in how to stop and delete an NVIDIA Brev instance; packaging your own repository is in NightKeeper.

Sources: where do these facts come from?

How was this page made?

9owls published this page and publishes Launchables on both GPUs. The GPU specifications come from NVIDIA's product pages, read 2026-11-16. The model-fit table is arithmetic on weights only, with the assumption stated above it. Prices and test values come from our own dated records; no throughput or concurrency number is given because we have not measured one. Found an error? Tell us on the company page.

What changed on 2026-11-28: added the disclosure and criteria, dated hourly prices, our recorded GPU memory per Launchable and the cache-blocks link, and replaced the billing and packaging sections with links.

All comparisons