GPU Fundamentals & LLM Deployment Guide

From "what does a GPU actually do" to "which card should I use": VRAM, bandwidth, precision, architectures and multi-GPU interconnects, plus a VRAM calculator, GPU comparison and a selection method to get your LLM deployment math right.

Beginner-friendlyVRAM calculatorGPU filterSelection guideTroubleshooting

00Key takeaways

Three conclusions, if you only have a minute.

Reading specs

For inference, check VRAM capacity and bandwidth first

When an LLM generates token by token, every step reads the weights from VRAM: capacity decides whether it fits, bandwidth decides how fast it types. Peak TFLOPS matters more for training and high-concurrency prefill.

Multi-GPU

Tensor parallelism needs NVLink; independent replicas are fine on PCIe

Measured the same way, NVLink 4.0 is about 7× PCIe 5.0 ×16. Splitting one model across GPUs needs a fast interconnect; one full model per GPU works over PCIe. RTX 40/50 consumer cards have no NVLink.

Selection

Work backward from needs; rent before you buy

Compute the VRAM your model needs, then fix scenario and budget. Validate with an API or hourly rentals, measure real usage, then decide whether to own hardware. NVIDIA's ecosystem is the most mature and cheapest to debug.

01What a GPU actually is

A GPU isn't a "faster CPU" — it's a different way of working. Once that clicks, every spec makes sense.

A kitchen analogy

A CPU is a few master chefs: they can cook anything and handle complex, step-dependent work, but there are only a few of them. A GPU is a giant kitchen with thousands of workers, each doing one simple step, all at the same time — enormous throughput.

AI is dominated by massive, repetitive matrix multiply-adds, which suit GPUs perfectly. The general workers are CUDA Cores; the specialist squads that crunch whole matrix tiles at once are Tensor Cores, which drive most AI performance.

Five things on a card that really matter

1 · Compute units

CUDA Cores / Tensor Cores

The workers. Each generation's Tensor Cores support different number formats (FP16, BF16, INT8, FP8, FP4…) — the root reason old cards run new models slowly or not at all.

2 · VRAM

The workbench

Weights, KV cache and intermediate results live here. If it doesn't fit, data comes from the "warehouse" (system RAM) and speed drops by an order of magnitude. Capacity decides whether it runs.

3 · Memory bandwidth

The conveyor belt

How much data per second can be read from VRAM. In single-stream generation each token reads all the weights, so bandwidth sets the speed ceiling. Bandwidth decides how fast it runs.

4 · PCIe

The road to the motherboard

The channel between CPU and GPU. For single-GPU inference it mostly affects load time; without NVLink, GPU-to-GPU traffic also has to use it.

5 · GPU interconnect (NVLink / NVSwitch)

A dedicated express line between GPUs

GPUs cooperating on one model must constantly exchange intermediate results. PCIe is a public road; NVLink is a private highway between GPUs. See Chapter 08.

Remember it in one lineVRAM capacity = bench size; bandwidth = belt speed; compute = worker speed; NVLink = private lanes between stations. Single-stream LLM inference is usually limited by the bench and the belt, not by hand speed.

02Specs that matter

Spec sheets are full of numbers; focus on the few that matter for your workload.

Memory bandwidth at a glance

B200 (HBM3e)~7700 GB/s
MI300X (HBM3)5300 GB/s
H100 SXM (HBM3)3350 GB/s
A100 80G (HBM2e)2039 GB/s
RTX 5090 (GDDR7)1792 GB/s
RTX 4090 (GDDR6X)1008 GB/s
Dual-channel DDR5~90 GB/s

Drawn to scale from official specifications.

Estimate the token-speed ceiling

Single-stream speed ceiling (tokens/s) ≈ memory bandwidth ÷ bytes of weights read per token

Example: an 8B model in BF16 is ~16 GB; RTX 4090 bandwidth is 1008 GB/s, so the ceiling is ~60 tokens/s, with 60–80% of that typical in practice. MoE models only read their active parameters per token, so huge MoE models can still be fast — but VRAM must hold all parameters.

What each workload cares about

WorkloadMost importantSecondaryWhy
Inference (single / low concurrency)VRAM + bandwidth—Token-by-token decoding is memory-bound; compute mostly waits on data
Inference (high concurrency / long prompts)VRAM + computeBandwidth, interconnectBatching and long-prompt prefill are compute-bound; KV cache grows large
LoRA / QLoRA fine-tuningVRAMComputeMostly frozen weights + activations; very few trainable parameters
Full fine-tuning / trainingVRAM + compute + interconnectCluster networkStores weights, gradients and optimizer states (~16 bytes/param) and syncs gradients constantly
Don't be misled by TFLOPSOn paper the RTX 4090's FP16 Tensor throughput is close to the A100's (about 165–330 vs 312 TFLOPS depending on accumulate precision), but the 4090 has 24 GB at 1008 GB/s versus the A100's 80 GB at 2039 GB/s. For large models the A100 is clearly better. Also note vendors often quote "sparse" TFLOPS, which is 2× dense — compare like with like.

Don't confuse RT Cores with Tensor Cores

Tensor Core

Matrix-multiply units — they drive AI performance. Introduced with Volta (V100) in 2017; each generation adds number formats.

RT Core

Ray-tracing units for games and 3D rendering. Irrelevant to LLM inference; ignore them when choosing an AI card.

03Memory hierarchy & KV cache

Where data lives changes speed by tens of times. This is why "enough RAM but not enough VRAM" is still slow or fails.

From fastest to slowest

TierLocationTypical bandwidthHolds
Registers / on-chip cache (SRAM)Inside the chipTens of TB/sData being computed right now
VRAM: HBM / GDDROn the card300–7700 GB/sWeights, KV cache, activations
System RAM (DDR)Motherboard~50–100 GB/s desktop; several hundred GB/s on multi-channel serversOffloaded weights that don't fit
NVMe SSDDisk3–14 GB/sModel files, checkpoints
Network / object storageData centerNetwork-dependentDatasets, model hubs

Once weights spill from VRAM to system RAM, read bandwidth drops from thousands of GB/s to around a hundred — 10–20× slower — and also has to cross PCIe (~64 GB/s per direction on 5.0 ×16). Running out of VRAM doesn't make things a bit slower; it makes them an order of magnitude slower.

HBM vs. GDDR

HBM (High Bandwidth Memory)

HBM2e / HBM3 / HBM3e

Stacked next to the die: very high bandwidth, large capacity (40–192 GB+), ECC, expensive. Used in flagship data-center parts like A100 / H100 / H200 / B200 / MI300X.

GDDR

GDDR6 / GDDR6X / GDDR7

Conventional memory chips, lower cost. Used in consumer cards (RTX 3090/4090/5090) and some data-center cards (T4, A10, L4, L20, L40S); data-center models usually support ECC, consumer cards typically don't or ship with it off.

Why ECC mattersUnder sustained heavy load, bits in memory can occasionally flip, silently corrupting output. Not a big deal for personal experiments; for 24/7 production or finance/healthcare workloads, choose data-center cards with ECC.

KV cache: why long conversations eat VRAM

During generation the model caches the Key/Value results of processed tokens to avoid recomputing them — the KV cache. It grows linearly with context length × concurrency, and with long contexts or many users it often exceeds the weights themselves.

KV bytes per token = 2 (K and V) × layers × KV heads × head dim × bytes per element
Total VRAM ≈ weights + KV per token × context length × concurrency + activations & framework overhead (~10–20%)

Example: Llama 3.1 8B (32 layers, 8 KV heads, head dim 128, BF16) needs ~128 KB per token; a single 128K-token context is ~16 GB, plus ~16 GB of BF16 weights — over 32 GB total, which won't fit a 24 GB RTX 4090. Options: shorten context, quantize the KV cache to FP8, or quantize weights to INT8/INT4. Try it in the Chapter 10 calculator.

04Precision & VRAM math

Precision is how many bits each number uses. The same model can differ 4× in VRAM depending on format.

Common number formats

FormatPer parameterCharacteristicsTensor Core support
FP324 bytesHigh precision, largeAll cards; rarely used for LLM inference
FP162 bytesGood precision, narrow range, can overflowVolta (V100) and later
BF162 bytesSame range as FP32, lower precision, rarely overflows; the standard release formatAmpere (A100 / RTX 30) and later
FP81 byteHalves VRAM and boosts speed with small accuracy lossAda (L40S / RTX 40), Hopper and later
INT81 byteQuantized format, some accuracy lossTuring (T4 / RTX 20) and later
INT4 / FP40.5 byteHeavy compression, evaluate accuracy; FP4 is new in BlackwellINT4 mostly software dequant; FP4 needs Blackwell

FP16 vs. BF16: both are 16 bits; FP16 spends more bits on precision (mantissa), BF16 on range (exponent). BF16 is stable and rarely overflows, so most new models ship in BF16. V100 and T4 lack BF16 and must convert to FP16 or run quantized builds.

Mental math for weight memory

Weight VRAM (GB) ≈ parameters (billions) × bytes per parameter
Model sizeBF16INT8 / FP8INT4Single 24 GB card (with headroom)?
7–8B14–16 GB7–8 GB4–5 GBBF16 OK, limited context
13–14B26–28 GB13–14 GB7–8 GBNeeds 8- or 4-bit
30–34B60–68 GB30–34 GB16–18 GBINT4 only, tight
70B140 GB70 GB35–40 GBNo — needs 48 GB+ or multi-GPU
Weights onlyAdd KV cache and runtime overhead; keep 20–30% headroom. INT4 files include scales and other metadata, so they're usually slightly larger than "parameters × 0.5".

05Architecture generations

An architecture is a generation of chip design. Hardware units added in newer architectures physically don't exist on older cards — no driver update can add them.

2016Pascal · P100 / GTX 10 series
No Tensor Cores; NVLink 1.0 debuted with P100. Unsuitable for modern LLMs.
2017Volta · V100
First Tensor Cores (FP16 only); no BF16; NVLink 2.0.
2018Turing · T4 / RTX 20 series
Tensor Cores add INT8 / INT4; first RT Cores on consumer cards. No BF16.
2020Ampere · A100 / A10 / RTX 30 series
BF16, TF32, structured sparsity; NVLink 3.0. Minimum for mainstream optimizations such as FlashAttention 2.
2022Ada Lovelace · L4 / L20 / L40S / RTX 40 series
Adds FP8; NVLink removed across the line.
2022Hopper · H100 / H200 / H20
FP8 + Transformer Engine, NVLink 4.0; the workhorse for LLM training and inference.
2024Blackwell · B200 / GB200 / RTX 50 series
Adds FP4, NVLink 5.0; GB200 NVL72 joins 72 GPUs into one NVLink domain.
2026Rubin · Vera Rubin
NVIDIA's announced next data-center architecture, with HBM4 and NVLink 6.
Generations are hard limitsV100 has no BF16 units and can only run FP16 or quantized builds; FlashAttention 2 requires Ampere or newer. Starting with CUDA 13.0 (August 2025), Maxwell, Pascal and Volta are no longer supported — those cards need CUDA 12.x drivers and images.

06Vendors & product lines

One vendor sells several lines with very different purposes. Don't use a gaming card as a production card.

NVIDIA's three lines

LineExamplesCharacteristicsBest for
Data centerT4 / A10 / L4 / L40S / A100 / H100 / H200 / B200ECC, passive cooling, 24/7 design, enterprise support; flagships have HBM and NVLinkProduction, training, multi-GPU
Professional workstationRTX A6000 / RTX 6000 Ada / RTX PRO 6000 BlackwellLarge VRAM (48–96 GB), ECC, pro driversDesign/rendering, local mid-to-large model inference
Consumer gamingGeForce RTX 3090 / 4090 / 5090Cheap, strong compute, 24–32 GB, usually no ECC, no NVLink from 40 seriesLearning, experiments, workflow validation

Other vendors

AMD

Instinct MI300X / MI325X / MI355X

192 / 256 / 288 GB HBM — huge single-card memory, great for large-model inference. Software stack is ROCm; vLLM, SGLang and PyTorch support mainstream inference, but custom kernels and niche tooling still lag CUDA.

Intel

Gaudi 3

128 GB HBM2e, scaling over standard Ethernet (RoCE). Suits enterprises reducing single-vendor dependence; ecosystem much smaller than CUDA.

Not all "non-NVIDIA" cards are AI acceleratorsSome cloud GPU SKUs (e.g. Intel XG310) are cloud-gaming/video-transcoding cards without CUDA, unsuitable for LLMs. MI300X and Gaudi 3 are genuine AI accelerators that simply need extra porting effort.

07Model naming

Read the model name and you can roughly tell architecture and positioning.

Data-center cards: first letter = architecture

LetterArchitectureYearExamples
PPascal2016P100, P40
VVolta2017V100
TTuring2018T4
AAmpere2020A100, A10, A30
LAda Lovelace2022L4, L20, L40S
HHopper2022H100, H200, H20
BBlackwell2024B200, B300; the G in GB200 stands for the Grace CPU
Watch for exceptionsThe "A" in RTX A6000 means Ampere, while RTX 6000 Ada is Ada — same "6000", different generations, so always read the full name. Bigger numbers usually mean higher tier, but don't compare across architectures (an L40S is not simply "stronger than" an A100).

Consumer cards: RTX + number

First two digits = generation

RTX is a brand (the ray-tracing line), not an architecture. 20 series = Turing, 30 = Ampere, 40 = Ada, 50 = Blackwell.

Last two digits = tier

90 is the flagship, then 80/70/60. In the 30 series only the RTX 3090 supports an NVLink bridge; the 40 and 50 series have none.

09Parallelism strategies

There are several ways to use multiple GPUs, with very different interconnect demands.

StrategyHow it splitsCommunicationInterconnect needs
Data parallel / replicasFull model on each GPU, each handles different requests or dataNear zero for inference; gradient sync each step in trainingPCIe is fine
Pipeline parallel (PP)Different layers on different GPUs; data flows through in stagesMedium (activations at layer boundaries)PCIe OK; common across nodes
Tensor parallel (TP)Each layer's matrices split across GPUs, merged every layerVery high (all-reduce per layer)Needs NVLink
Expert parallel (EP)Different MoE experts on different GPUsHigh (all-to-all token routing)Fast interconnect preferred
Classic pitfallTensor parallelism across four RTX 4090s often underperforms badly with spiky GPU utilization: per-layer all-reduce is throttled by PCIe. Run nvidia-smi topo -m to check links: NV# means NVLink; PIX/PXB/PHB/NODE/SYS mean PCIe paths (later = farther).

With only consumer cards, the pragmatic approach is: if the model fits one GPU, run one replica per GPU behind a load balancer; if it doesn't, prefer pipeline parallelism or a larger-memory card.

10VRAM calculator

Enter a model and usage, and estimate the VRAM needed and the single-stream speed ceiling.

Weights-
KV cache-
Overhead (~15%)-
Total needed-
Single-stream ceiling-

Estimates only. For MoE models, estimate speed from active parameters. Frameworks like vLLM pre-allocate most VRAM as a KV cache pool by default, so observed usage will differ.

11GPU comparison

Core specs of common cards; click a tag to filter. Prices change with the market and aren't listed.

ModelArchitectureVRAMBandwidthBF16FP8NVLinkPositioning
RTX 3090Ampere24GB GDDR6X936 GB/sYesNo2-card bridgeConsumer, value experiments
RTX 4090Ada24GB GDDR6X1008 GB/sYesYesNoneConsumer, single-GPU inference
RTX 5090Blackwell32GB GDDR71792 GB/sYesYesNoneTop consumer card
T4Turing16GB GDDR6320 GB/sNoNoNoneEntry inference, low power
V100Volta16 / 32GB HBM2900 GB/sNoNoNVLink 2.0Legacy, choose with care
A10Ampere24GB GDDR6600 GB/sYesNoNoneEntry data-center inference
L4Ada24GB GDDR6300 GB/sYesYesNoneLow-power inference, video
L20 / L40SAda48GB GDDR6864 GB/sYesYesNoneSingle-GPU inference, graphics
A100 40/80GAmpere40 / 80GB HBM2e1555 / 2039 GB/sYesNoNVLink 3.0Training & inference workhorse
H100 SXMHopper80GB HBM33350 GB/sYesYesNVLink 4.0Training, large-scale inference
H200Hopper141GB HBM3e4800 GB/sYesYesNVLink 4.0Large-model inference
B200Blackwell180–192GB HBM3e~7700 GB/sYesYesNVLink 5.0New flagship, FP4 support
RTX 6000 AdaAda48GB GDDR6 ECC960 GB/sYesYesNonePro workstation
MI300XAMD CDNA 3192GB HBM35300 GB/sYesYesInfinity FabricLarge-VRAM inference
Gaudi 3Intel128GB HBM2e3700 GB/sYesYesEthernet RoCEEnterprise AI accelerator

Bandwidth per official specs; H100 PCIe is ~2000 GB/s, the table shows SXM.

Why a cheap V100 isn't necessarily a bargain
Mainstream models ship in BF16, which V100 doesn't support — you must convert to FP16 (risking overflow) or run quantized builds. FlashAttention 2 and FP8 need newer architectures, and current CUDA no longer supports Volta. Rent is low, but the same job may take several times longer, so cost per result may not be lower.
Prerequisites for running LLMs on an RTX 3090 / 4090
24 GB runs 7–8B in BF16 or 14B–32B at 4-bit. Notes: ① system RAM ≥ 32 GB, ideally 64 GB, so loading doesn't get the process killed; ② use quantization-friendly frameworks such as vLLM, llama.cpp or Ollama; ③ for long contexts, enable FP8 KV cache or cap the max context length.

12How to choose

Don't start from "which card is strongest" — work backward from "what do I need to run".

  1. Fix model and precision: use the VRAM calculator to get weights + KV cache, i.e. the minimum GB per GPU.
  2. Fix scenario and concurrency: personal use, internal team tools and public services have very different stability and throughput needs (see table).
  3. Decide if you need multiple GPUs: don't split if one GPU fits; if you must, tensor parallelism needs NVLink.
  4. Compare unit cost: cost per million tokens or per result, not just hourly price.
  5. Check the software stack: does the architecture support the precision you need (BF16 / FP8), CUDA and driver versions, framework compatibility.
ScenarioTypical needsStarting point
Personal learning / trials7B–14B, single stream24 GB consumer card (3090 / 4090), Mac unified memory, or hourly rental
Small-team internal tools14B–32B quantized, light concurrencySingle 24–48 GB card (4090 / 5090 / L40S), or rent an A100
Public production service24/7, high availability, complianceData-center cards such as L40S / A100 / H100 / H200, with ECC and vendor support
70B-class modelsLong context, many users2–4× A100/H100 (NVLink), or a single H200 / MI300X
Training / full fine-tuningCompute + interconnect + cluster networkH100/B200 clusters + InfiniBand; LoRA on small models needs just one 24–80 GB GPU

Advice by profile

Individuals / small teams

Low cost, validation stage
  • Prefer NVIDIA — the most resources
  • 24–32 GB consumer cards cover most 7B–32B needs
  • When unsure, rent by the hour
  • AMD / Intel are not a priority yet

Stable production

24/7, many users
  • Mainly data-center cards
  • You're paying for ECC, long-term stability, vendor support
  • No NVLink → no large-scale tensor parallelism
  • Consider MI300X for large VRAM needs

Large enterprises

At scale, with ops teams
  • NVIDIA-first, multi-vendor
  • Clusters on NVLink + InfiniBand
  • AMD / Gaudi to spread cost and supply risk
  • Dedicated TCO and porting teams
Three risks of consumer cards in production① Usually no ECC: silent errors under long runs; ② driver license limits: the GeForce driver EULA prohibits data-center deployment; ③ no NVLink (from 40 series): poor multi-GPU scaling. Fine for experiments and internal tools; not recommended as the backbone of a public 24/7 service.

13API vs. rent vs. buy

The difference isn't only price, but also who carries the risk and the operations burden.

Model API
No hardware, no ops, pay per token
Fastest start · no idle waste · data leaves your premises
Hourly GPU rental
Switch models anytime, cheap to experiment
Validation · burst demand · you run the ops
Buy / long-term lease
High fixed cost, lowest unit price at high utilization
Steady heavy load · data stays in-house · needs an ops team
Unit cost = hourly cost ÷ hourly output (tokens or tasks)
Owned hourly cost ≈ (hardware price ÷ depreciation hours + power + hosting & ops) ÷ actual utilization
Core principleOwned compute only beats pay-as-you-go when utilization stays high; at 20% utilization your effective hourly cost is 5×. Prove the workflow on an API or rentals, measure real usage, then decide whether to own hardware.
StageWhat to doGoal
① TryCall an official API or use free creditsConfirm the model meets your needs
② ValidateRent the target card hourly, run real tasks, log time and throughputGet unit-cost data
③ LaunchPick API or rented instances based on volumeStable service
④ Self-hostWhen compliance demands it, load is steady and you have ops capacityLower long-term unit cost

14Deployment quick start

Using the open-source vLLM engine to serve an OpenAI-compatible API on an NVIDIA GPU server.

  1. Check the environment: nvidia-smi for driver, GPU model and VRAM; nvidia-smi topo -m for multi-GPU links.
  2. Prepare Python: use an isolated environment (venv / conda) or the official Docker image.
  3. Download the model: from Hugging Face or ModelScope; keep at least 1.5× the model size in free disk.
  4. Start the server: set max context, quantization and parallelism to fit your VRAM.
  5. Test and load-test: send requests to the OpenAI-compatible endpoint; watch time to first token, throughput and VRAM.
bash · vLLM example
# 1 Install
python -m venv vllm-env && source vllm-env/bin/activate
pip install vllm

# 2 Single GPU (cap context to bound KV cache memory)
vllm serve Qwen/Qwen2.5-7B-Instruct \
  --max-model-len 16384 \
  --gpu-memory-utilization 0.90 \
  --host 127.0.0.1 --port 8000

# 3 Multi-GPU tensor parallel (best with NVLink)
vllm serve meta-llama/Llama-3.3-70B-Instruct --tensor-parallel-size 4

# 4 Test
curl http://127.0.0.1:8000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model":"Qwen/Qwen2.5-7B-Instruct","messages":[{"role":"user","content":"Hello"}]}'
vLLM / SGLang

High-throughput production serving with continuous batching, PagedAttention and tensor parallelism.

llama.cpp / Ollama

Easiest to start; GGUF quantized format; runs on CPU, Mac and consumer GPUs — ideal for personal use.

TensorRT-LLM

NVIDIA's official optimized engine; top performance, more complex setup.

SecurityDon't expose inference servers directly to the internet (0.0.0.0 + open port). Access them through SSH tunnels, security-group allowlists or an authenticated gateway, and set an API key.

15Troubleshooting

Look up the cause by symptom.

SymptomCommon causeFix
CUDA out of memory at startupNot enough VRAM, often an overly long max contextLower max context / concurrency, quantize or use FP8 KV cache, or use a larger card
Process Killed with no errorSystem RAM exhausted while loading weights (OS OOM killer)Add RAM or swap; confirm with dmesg — don't chase VRAM
"no kernel image" / unsupported architectureFramework or CUDA version doesn't support an old GPUUse CUDA 12.x and matching framework versions on old cards, or upgrade the GPU
BF16 errors or garbage outputV100 / T4 lack BF16; FP16 overflowUse FP16 + quantized builds, or an Ampere-or-newer GPU
Multiple GPUs barely faster than oneNo NVLink; tensor parallelism bottlenecked by PCIeSwitch to replicas, or use a machine with NVLink
Slow first token, normal generationLong-prompt prefill is compute-boundEnable prefix caching, shorten prompts, use a faster card
Slow model loadingSlow disk or networkKeep models on local NVMe, pre-download, avoid network drives
Suspiciously cheap used cardsPossibly run hard for years (e.g. mining)Burn-in test at full load, check memory errors, confirm warranty
Trust official specsThe mapping between cloud instance names and GPU models should be checked against the cloud provider's official instance documentation; third-party articles are often wrong.

16FAQ

What's the difference between VRAM and RAM? Can lots of RAM replace VRAM?
VRAM sits on the card for fast GPU access; RAM is on the motherboard and reached through PCIe, an order of magnitude slower. Some frameworks offload weights to RAM so models "run", but much slower. The exception is unified-memory designs like Apple Silicon, where CPU and GPU share one pool — large memory runs large models, though bandwidth is below high-end GPUs.
Are two 24 GB cards the same as one 48 GB card?
Capacity adds up (via tensor or pipeline parallelism), but there's communication overhead and each card also holds part of the KV cache and runtime overhead. Without NVLink, performance is usually below a single 48 GB card.
Does quantization make models dumber?
8-bit (INT8 / FP8) is usually imperceptible; 4-bit costs little on large models but can be noticeable on small models and on math or coding tasks. Test with samples from your own workload.
How much VRAM does an MoE model need?
VRAM follows total parameters (all experts must be loaded); speed mostly follows active parameters. Hence MoE models are "memory-hungry but fast".
Can a Mac run LLMs?
Yes. Apple M-series unified memory can be allocated to the GPU; 64–192 GB configurations run quantized 70B-class models, good for personal inference. No CUDA, though, so training and high-concurrency production serving lag NVIDIA.
How much VRAM to train a 7B model?
Full fine-tuning (mixed precision + Adam) needs about 16 bytes/param — ~112 GB plus activations for 7B, requiring multiple GPUs or ZeRO / FSDP sharding. LoRA needs roughly the weights plus a little extra (~16–20 GB in BF16); QLoRA (4-bit) fits in 8–12 GB.

17Glossary

Type a keyword to filter.

TermMeaning
All-reduceCollective that sums results across GPUs and returns the total to each; done every layer in tensor parallelism
Ampere2020 architecture (A100 / RTX 30); first with BF16
BF1616-bit float with FP32's range and lower precision; rarely overflows; the standard model release format
Batching / continuous batchingProcessing many requests together for throughput; continuous batching inserts new requests on the fly
CUDANVIDIA's GPU computing platform; CUDA 13 drops Maxwell / Pascal / Volta
ECCError-correcting memory that detects and fixes bit flips; more reliable for long runs
FlashAttentionAttention optimization that cuts memory traffic; v2 requires Ampere or newer
FP8 / FP48-bit / 4-bit float formats, needing Ada/Hopper and Blackwell hardware respectively
GGUFQuantized model file format used by llama.cpp; common for local deployment
HBM / GDDRTwo kinds of VRAM: HBM is stacked with very high bandwidth; GDDR is cheaper, used in consumer and some data-center cards
INT8 / INT4Integer quantization formats; big VRAM savings with some accuracy loss
InfiniBand / RoCEHigh-speed networks between servers for multi-node training and inference
KV cacheCached Key/Value tensors of past tokens; grows linearly with context length and concurrency
LoRA / QLoRAEfficient fine-tuning that trains small add-on weights; QLoRA also quantizes the base model to 4-bit
MoEMixture of Experts: each token activates only some parameters — VRAM follows total, speed follows active
NCCLNVIDIA's collective communication library that performs all-reduce and similar ops
NVLinkNVIDIA's point-to-point GPU interconnect; 900 GB/s bidirectional on H100
NVSwitchNVLink switch chip enabling full-speed any-to-any GPU communication
PagedAttentionvLLM's paged KV cache management; reduces fragmentation and raises concurrency
PCIeGeneral-purpose bus between card and motherboard; 5.0 ×16 ≈ 64 GB/s per direction
Prefill / DecodeTwo inference phases: prefill processes the whole prompt (compute-bound); decode generates token by token (bandwidth-bound)
ROCmAMD's GPU computing stack, the CUDA counterpart
RT CoreRay-tracing unit; irrelevant to AI
Tensor CoreMatrix-math unit; the core source of AI performance
TFLOPSTrillions of floating-point operations per second; check precision and dense vs. sparse
TTFT / TPOTTime to first token / time per output token — standard inference latency metrics
Tensor parallel (TP)Splits each layer's matrices across GPUs; very communication-heavy, needs NVLink
Pipeline parallel (PP)Splits the model by layers across GPUs; modest communication
Data parallel (DP)Full model per GPU processing different data; PCIe is enough
QuantizationRepresenting weights or KV cache with fewer bits to trade precision for memory and speed

Bandwidth, prices and software support change over time — check vendor documentation before buying or launching. NVLink is quoted bidirectional, PCIe often per direction; normalize units before comparing.