What the card is, precisely
The RTX 4090 has 24 GB of GDDR6X on a 384-bit bus, about 1,008 GB/s of memory bandwidth, 128 streaming multiprocessors and 16,384 CUDA cores. Its fourth-generation tensor cores deliver roughly 165 TFLOPS of dense FP16 and 330 TFLOPS of sparse FP16, plus FP8 at twice those figures, and the board draws up to 450 watts. Those are serious numbers: the FP16 throughput is in the same order as an A100 for dense matrix work, and 1,008 GB/s is the highest bandwidth of any consumer card of its generation, though well short of the 1,555 to 2,039 GB/s that an A100's HBM provides. What the 4090 lacks is everything that makes a data-centre card a data-centre card.
There is no NVLink on the 4090, and NVIDIA disabled peer-to-peer transfers over PCIe on consumer GeForce parts, so two cards communicate through the host and NCCL falls back to shared memory or PCIe transactions with much higher latency. There is no ECC on the GDDR6X, no MIG partitioning, no secure-boot attestation and no formal support for running inside a datacenter, which the GeForce driver licence explicitly prohibits. The card also has a 12VHPWR connector that demands a fully seated cable, and a triple-slot cooler that dumps heat into the case rather than exhausting it out the back. None of that stops you from doing useful work; it defines the work you should attempt.
Inference: comfortable, with one eye on the cache
A four-bit 7B checkpoint occupies about 4.2 to 4.5 GB, leaving the great majority of the card free for context and batching. At batch one, decode is bandwidth-bound, so the theoretical ceiling is roughly 240 tokens per second and real runtimes deliver about 90 to 150 with AWQ or GPTQ kernels, or a bit less with llama.cpp. A BF16 model at 15 GB still fits, with about 7 GB left for cache and overhead, and runs at roughly 40 to 60 tokens per second. For a single developer, a small internal tool, or a batch job that processes documents overnight, that is plenty.
The constraint arrives with context. A multi-head 7B model at half a megabyte of cache per token cannot do 32K on this card once you account for weights and overhead, while a grouped-query model at 128 KB per token can. vLLM on a 4090 works well for one or two concurrent users, but the default memory utilisation of 0.9 reserves 21.6 GB and can leave the desktop compositor or a Jupyter kernel fighting for the remainder. Setting it to 0.85 and capping max-model-len at the context you actually need is the difference between a stable server and a process that dies on the fourth request.
LoRA fine-tuning: the realistic sweet spot
Low-rank adaptation freezes the base model and trains small matrices injected into the linear layers. With rank 16 applied to the attention and feed-forward projections of a 7B model, trainable parameters land around 20 to 40 million, well under one percent of the model. The optimiser state for that is a few hundred megabytes, so the memory budget is dominated by the frozen base at 15 GB in BF16, activations, and the temporary buffers that the framework allocates.
With gradient checkpointing, a sequence length of 2,048, a micro-batch of one or two and bf16 mixed precision, a 7B LoRA run fits in roughly 18 to 21 GB. Without checkpointing, activations for 32 layers at that sequence length add five or six gigabytes and the run will not fit. Throughput is in the range of 2,000 to 4,000 tokens per second for forward and backward combined, which means a dataset of five million tokens takes roughly 20 to 40 minutes per epoch. Three epochs on a 5,000-example set is an afternoon, not a week.
LoRA is the right tool when you want to change style, teach a response format, improve performance on a narrow domain, or attach a classifier head to a frozen backbone. It is not a way to add knowledge the base model never saw, and it will not fix reasoning failures. Teams routinely expect a LoRA to teach a model a new programming language or a product catalogue, then conclude that fine-tuning does not work. Retrieval and better prompting usually beat a small adapter for factual recall.
QLoRA when you need longer sequences
QLoRA keeps the base model frozen in four-bit NF4, adds the same low-rank adapters in BF16, and uses paged optimiser states to survive memory spikes. The base drops to about 4.5 GB, which leaves 15 to 17 GB for activations and gives room for sequence lengths of 4,096 to 8,192 at a micro-batch of two to four. That is the configuration most people should start with on a single 4090, because long training examples are the common reason a run that worked on a toy dataset fails on real data.
The quality cost is small but not zero. QLoRA typically lands within a point or two of full-precision LoRA on generation benchmarks, and the gap widens for tasks that need precise copying, arithmetic or strict formatting. The adapter still trains in BF16, so the learned update is not quantised; only the frozen base is. If you plan to serve the merged model, merge into a BF16 base rather than the NF4 one, otherwise you bake the quantization error into the weights and then quantise again for deployment, which stacks two rounds of rounding.
What genuinely does not fit
Full-parameter fine-tuning of a 7B model needs the BF16 weights at 15 GB, gradients at another 15 GB, and Adam's first and second moments in FP32 at 60 GB, plus FP32 master weights if you use mixed precision. That is over 100 GB before a single activation is stored, which is why the standard recipe is eight 80 GB GPUs with ZeRO-3 sharding. A single 4090 cannot hold it, and no amount of gradient accumulation changes the state that must persist. Offloading optimiser state to CPU makes it technically possible at a speed that turns a two-hour job into a two-day one.
Long-context training is the other wall. Attention activations grow with sequence length, and a 32K-token example can require more memory for activations than the weights themselves even with FlashAttention and checkpointing. Pretraining from scratch is further out still: it needs trillions of tokens, weeks of uninterrupted compute, and a data pipeline that costs more than the hardware. A 4090 is an excellent fine-tuning and inference card and a poor pretraining card, and no configuration trick changes that.
Two 4090s: what improves and what does not
Two cards double memory to 48 GB but do not double speed for a single model. Tensor parallelism splits every layer across both GPUs and exchanges activations at each boundary; over PCIe without peer-to-peer support, that exchange dominates, and a 7B model served with tensor parallelism across two 4090s often delivers only 1.2 to 1.6 times the throughput of one card. Data parallelism is different: run two independent replicas behind a load balancer and throughput scales close to linearly, because the replicas never talk to each other. For inference, replicas are almost always the better use of a second card.
For LoRA training, distributed data parallel works acceptably because the gradient all-reduce covers only the 20 to 40 million adapter parameters, a few hundred megabytes per step. For full fine-tuning, the all-reduce covers 7B parameters of gradients every step and PCIe becomes the bottleneck. If you specifically want multi-GPU training with fast interconnect, two used 3090s with an NVLink bridge are a better purchase than two 4090s, even though each card is slower, because the 112.5 GB/s bridge changes what is feasible.
A configuration that works
- Load the base in bf16, not fp16: Ada handles both, but bf16 avoids loss spikes from overflow in the attention softmax.
- Enable gradient checkpointing and pass use_reentrant=False so the newer autograd path is used and warnings stay quiet.
- Use FlashAttention 2 or PyTorch's scaled_dot_product_attention; the memory saving is what makes 2K sequences comfortable.
- Prefer paged_adamw_8bit for the optimiser, which cuts state memory with no measurable quality cost in most adapter runs.
- Pack short examples into full sequences so padding does not waste a third of your compute.
- Start with a learning rate near 1e-4 to 2e-4 for LoRA, cosine decay, and a warmup of three to five percent of steps.
- Evaluate on a held-out set every few hundred steps and keep the best adapter rather than the last one.
- Save only the adapter during training, a few tens to hundreds of megabytes, and merge once at the end.
Cost: buy or rent
A new 4090 costs roughly $1,600 to $2,200 depending on model and region, and a host system with enough PSU, cooling and RAM adds $700 to $1,200. At 450 watts under load plus system overhead, 300 hours of training a month consumes around 165 kWh, which is about $20 at $0.12 per kWh. The card depreciates and is obsolete in three to four years, so the true cost is perhaps $50 to $70 a month in capital plus power, before you value your own time assembling and maintaining it.
Renting the same card on a marketplace runs about $0.35 to $0.60 per hour, so 300 hours costs $105 to $180, and an A100 80 GB at $1.50 to $2.50 per hour costs three to five times more. For a single fine-tuning project of 20 to 40 GPU-hours, renting is cheaper and avoids a depreciating asset. For daily experimentation over a year, owning wins on both cost and iteration speed, because there is no upload, no cold start and no per-hour clock running while you debug a data loader. Many teams do both: own one card for development, rent a multi-GPU node for the occasional large run.
Reliability caveats people learn the hard way
Without ECC, a long training run can in principle absorb a silent memory error, and while the rate is low, it rises with memory temperature and with run length. Keep the card cool, avoid overclocking the memory, and checkpoint often enough that a corrupted run costs hours rather than days. The 12VHPWR connector should be fully inserted with no sharp bend within 35 mm of the plug; a partial seat is a fire risk, not a performance issue. A 450-watt card in a small case will thermal-throttle within minutes, and the clock drop looks exactly like a mysterious slowdown in training throughput.
Then there is the licence. GeForce drivers are licensed for workstation and personal use, not for datacenter deployment, and NVIDIA has enforced that distinction in its terms for years. If you are building a commercial inference service, the compliant path is L40S, A6000, or cloud instances with those parts, even though a rack of 4090s would be cheaper per token. For internal development, prototyping and research, the 4090 is the best value in the market and the licence question does not arise.
From a training script to a served endpoint
Once the adapter is trained, the 4090 is a capable small server. vLLM can host the merged BF16 model at 15 GB with 8K of context and a couple of concurrent sequences, and it can instead keep one base model and load several LoRA adapters, switching per request by name. That multi-adapter mode is the efficient pattern for a product with per-customer tuning, because it avoids loading a separate 15 GB copy for each customer. llama.cpp's server is simpler and lighter, with prompt caching and grammar-constrained output, but its throughput at concurrency above four is well below vLLM's.
A single stream at BF16 will typically produce about 40 to 60 tokens per second, with aggregate throughput of perhaps 150 to 250 tokens per second at eight concurrent requests before cache pressure and scheduling overhead bite. Model load from disk takes 30 to 90 seconds for 15 GB, so a restart is a visible outage in a way that a stateless web service is not. Keep the weights on an NVMe drive, run the server under a supervisor, and put a health check on a separate port so a stuck CUDA context is detected rather than silently holding traffic.
Common mistakes
- Setting max_seq_length to 8,192 because the model supports it, then running out of memory on examples that average 900 tokens.
- Skipping example packing and losing 30 to 50 percent of throughput to padding.
- Using a learning rate of 1e-3 for LoRA, which destroys the adapter within a few hundred steps.
- Forgetting that the tokenizer's padding token and the model's pad token must match, which silently corrupts batches.
- Merging the adapter into a four-bit base, then quantising again for serving and wondering why quality fell.
- Running two 4090s with tensor parallelism for a 7B model and expecting twice the tokens per second.
- Benchmarking with an empty prompt cache, then deploying with unique prompts and seeing latency double.
- Leaving the desktop session running a game or a browser on the same card that is supposed to serve the model.