# 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: 2026-11-28

Published: 2026-11-16

Compared: 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.](https://www.9owls.com/assets/infographics/compare/nvidia-l4-vs-l40s-for-llm-inference-IG01.a87e21ee31.svg "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.")

## How much GPU memory does each have?

| GPU | GPU memory | Memory bandwidth | Source |
|---|---|---|---|
| NVIDIA L4 | 24 GB | 300 GB/s | [NVIDIA L4 product page](https://www.nvidia.com/en-us/data-center/l4/) |
| NVIDIA L40S | 48 GB GDDR6 with ECC | 864 GB/s | [NVIDIA L40S product page](https://www.nvidia.com/en-us/data-center/l40s/) |

## 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.

> **Note:** The KV cache, activations and the serving engine need memory on top, and that remainder sets the context length and the number of concurrent users.

| Model size | 16-bit weights | 4-bit weights | NVIDIA L4 (24 GB) | NVIDIA L40S (48 GB) |
|---|---|---|---|---|
| 8B | about 16 GB | about 4 GB | 16-bit fits, about 8 GB left | 16-bit fits, about 32 GB left |
| 32B | about 64 GB | about 16 GB | 4-bit fits, about 8 GB left | 4-bit fits, about 32 GB left; 16-bit does not fit |
| 70B | about 140 GB | about 35 GB | Does not fit, even in 4-bit | 4-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](https://www.9owls.com/compare/ollama-vs-vllm/); [Serve an OpenAI-compatible API with vLLM](https://www.9owls.com/guides/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](https://www.9owls.com/launchables/) 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](https://www.9owls.com/guides/deploy-a-launchable-on-nvidia-brev/) covers the deploy steps, and [Run Open WebUI with vLLM on a cloud GPU](https://www.9owls.com/guides/run-open-webui-with-vllm-on-a-cloud-gpu/) covers the Open WebUI + vLLM stack.

| Launchable | Default GPU |
|---|---|
| [Ollama + Open WebUI starter](https://www.9owls.com/launchables/ollama-open-webui/) | NVIDIA L4 (24 GB) |
| [Wan 2.2 Video Studio (ComfyUI)](https://www.9owls.com/launchables/open-video-studio/) | NVIDIA L4 (24 GB) |
| [Chatterbox + WhisperX Voice Lab](https://www.9owls.com/launchables/voice-lab/) | NVIDIA L4 (24 GB) |
| [RAPIDS Data Science with cuDF and cuML](https://www.9owls.com/launchables/rapids-datascience/) | NVIDIA L4 (24 GB) |
| [Open WebUI + vLLM](https://www.9owls.com/launchables/open-webui-vllm/) | NVIDIA L40S (48 GB) |
| [ComfyUI Pro](https://www.9owls.com/launchables/comfyui-pro/) | NVIDIA L40S (48 GB) |
| [LoRA Training (ai-toolkit + kohya_ss)](https://www.9owls.com/launchables/lora-training/) | NVIDIA L40S (48 GB) |
| [RAGFlow on your own GPU](https://www.9owls.com/launchables/ragflow/) | NVIDIA L40S (48 GB) |
| [LlamaFactory (LlamaBoard)](https://www.9owls.com/launchables/llama-factory/) | NVIDIA L40S (48 GB) |
| [Nemotron Chat with Open WebUI and vLLM](https://www.9owls.com/launchables/nemotron-chat/) | NVIDIA L40S (48 GB) |
| [OpenHands Coding Agent on Nemotron](https://www.9owls.com/launchables/openhands-nemotron/) | NVIDIA L40S (48 GB) |
| [Paperclip Multi-Agent Team on Nemotron](https://www.9owls.com/launchables/paperclip-nemotron/) | NVIDIA L40S (48 GB) |
| [NeMo Guardrails + garak LLM Security Lab](https://www.9owls.com/launchables/nemo-guardrails-garak/) | NVIDIA L40S (48 GB) |
| [Nemotron Omni Multimodal Studio](https://www.9owls.com/launchables/nemotron-omni-studio/) | NVIDIA L40S (48 GB) |
| [Cosmos 3 Nano World Model Studio](https://www.9owls.com/launchables/cosmos3-video-studio/) | NVIDIA L40S (48 GB) |
| [Isaac Lab](https://www.9owls.com/launchables/isaac-lab-newton/) | NVIDIA L40S (48 GB) |
| [Pipecat](https://www.9owls.com/launchables/pipecat-voice-agent-nemotron/) | NVIDIA L40S (48 GB) |
| [Open Notebook on Nemotron](https://www.9owls.com/launchables/open-notebook-nemotron/) | NVIDIA L40S (48 GB) |
| [RAGFlow RAG with NVIDIA Nemotron](https://www.9owls.com/launchables/ragflow-nemotron/) | NVIDIA 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.

| GPU | Instance type | Price per hour | Read |
|---|---|---|---|
| NVIDIA L4 | GCP `g2-standard-4` | about $0.85 | Brev console, 2026-11-15 |
| NVIDIA L4 | GCP `g2-standard-8` | about $1.02 | Brev console, 2026-11-15 |
| NVIDIA L40S | AWS g6e.xlarge | about $2.26 | Brev console, 2026-11-19 |
| NVIDIA L40S | AWS `g6e.xlarge`, the Open WebUI + vLLM default | about $2.25 | Brev 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.

| GPU | Launchable | Test date | GPU memory in use |
|---|---|---|---|
| NVIDIA L4 | [Ollama + Open WebUI starter](https://www.9owls.com/launchables/ollama-open-webui/), `gpt-oss:20b` | 2026-11-15 | 12488 of 23034 MiB |
| NVIDIA L4 | [Hermes Agent on Nemotron 3.5 Bolt](https://www.9owls.com/launchables/hermes-agent-nemotron-bolt/), llama.cpp | 2026-11-19 | 4492 of 23034 MiB |
| NVIDIA L40S | [Nemotron Chat](https://www.9owls.com/launchables/nemotron-chat/), vLLM | 2026-11-15 | 40781 of 46068 MiB |
| NVIDIA L40S | [Open Notebook on Nemotron](https://www.9owls.com/launchables/open-notebook-nemotron/), two vLLM servers and speech | 2026-11-15 | 39724 of 46068 MiB |

Two vLLM servers on one NVIDIA L40S need their memory shares set with care; see [the cache-blocks error](https://www.9owls.com/guides/vllm-cache-blocks-memory-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](https://www.9owls.com/guides/stop-start-and-delete-an-nvidia-brev-instance/); packaging your own repository is in [NightKeeper](https://www.9owls.com/nightkeeper/).

## Sources: where do these facts come from?

- [NVIDIA L4 product page](https://www.nvidia.com/en-us/data-center/l4/), read 2026-11-16
- [NVIDIA L40S product page](https://www.nvidia.com/en-us/data-center/l40s/), read 2026-11-16
- [NVIDIA Brev documentation, Launchables](https://docs.nvidia.com/brev/latest/concepts/launchables), read 2026-11-16
- Brev console list prices recorded in our Launchable records, read 2026-11-15 and 2026-11-19
- [Open WebUI + vLLM deploy page on NVIDIA Brev](https://brev.nvidia.com/launchable/deploy?launchableID=env-3M6reXdi0sY0m18g80JNRJN0WtE), read 2026-12-03
- 9owls fresh-deploy test records: Ollama + Open WebUI starter, Nemotron Chat and Open Notebook on Nemotron (2026-11-15), Hermes Agent on Nemotron 3.5 Bolt (2026-11-19)

## 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](https://www.9owls.com/company/#contact).

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.

## Related pages

- [Ollama vs vLLM](https://www.9owls.com/compare/ollama-vs-vllm/)
- [Serve an OpenAI-compatible API with vLLM](https://www.9owls.com/guides/serve-an-openai-compatible-api-with-vllm/)
- [Chat and model serving](https://www.9owls.com/topics/chat-and-model-serving/)
- [Ollama + Open WebUI starter](https://www.9owls.com/launchables/ollama-open-webui/)
- [Open WebUI + vLLM](https://www.9owls.com/launchables/open-webui-vllm/)
- [Launchables: open-source GPU stacks, kept running](https://www.9owls.com/launchables/)

[All comparisons](https://www.9owls.com/compare/)
