Running Full-Precision LLMs on a Single GPU: Tuning Practice for VRAM and System Memory Coordination
This article explains why running full-precision large language models on a single consumer GPU is constrained by memory capacity and scheduling rather than compute. It breaks down the three storage tiers involved, the platform-specific limits on registered host memory, the zero-sum tradeoff between context length and resident expert layers in MoE models, and the long weight-loading times that make tuning expensive. It closes with a pre-launch decision checklist and a layered architecture for production serving.
1. The Problem: Why “Full-Precision” Is Hard on One GPU
Over the past year, the focus of LLM inference has shifted from “can it run at all” to “can it run stably and predictably on limited hardware.” “Full-precision” typically means keeping model weights at their original precision (for example, 8-bit floating-point quantization) rather than compressing them more aggressively. These models are large, with weight files usually in the hundreds of gigabytes. On a single consumer GPU, the core conflict is not compute but the coupling of capacity and scheduling.
Three tiers of memory need to be distinguished:
- VRAM: the smallest capacity and highest bandwidth, holding the active compute path and the context cache;
- Host memory: large capacity and moderate bandwidth, serving as the resident pool for weights and cold data;
- Disk: the largest capacity and lowest bandwidth, suitable only for cold storage and read-only loading.
When the model does not fit entirely in VRAM, inference becomes a process of moving data between the three tiers. The metrics that determine performance are no longer floating-point throughput but effective bandwidth and scheduling hit rate.
2. Hidden Constraints from Platform Differences
The same inference setup can perform very differently across operating systems. The root cause is that the graphics driver layer manages “host register” and the pinned-memory quota differently.
On Unix-like systems, host memory can be brought into the unified addressing range fairly fully, and the virtual VRAM pool approaches the physical memory limit. On some desktop operating systems, the graphics subsystem imposes a quota on how much memory can be pinned, so a machine with a large amount of RAM can only dedicate part of it to VRAM expansion. A machine with a large memory capacity may end up with a usable shared pool of roughly half its physical memory.
This produces a typical capacity inequality:
usable pool = VRAM capacity + registered host memory quotademand = weight size + context cache + active expert layers + runtime overheadconstraint: usable pool >= demand, otherwise paging and page locking kick in
Once the constraint is violated, the system repeatedly swaps data between disk and memory, and throughput drops off a cliff. In testing, a configuration that could sustain twenty-plus tokens/s often falls back into the low-teens tokens/s range after page locking is triggered.
Practical advice: prefer a server-form system environment for deployment. If a desktop system is unavoidable, isolating the graphics subsystem quota through a virtualization layer is a relatively controllable compromise.
3. The Zero-Sum Relationship Between Context Length and Expert Residency
For mixture-of-experts models, VRAM during inference is consumed mainly by two things: the context cache (which grows roughly linearly with length) and the weights of the expert layers that currently need to stay resident. Both share the same VRAM, forming a clear zero-sum relationship:
| Goal | Context length | Resident expert layers | Typical throughput |
|---|---|---|---|
| Speed first | Short | More | Twenty-plus tokens/s |
| Balanced | Medium | Medium | Low-teens tokens/s |
| Long context first | Very long | Fewer | Single-digit tokens/s |
On the same hardware, a longer-context configuration can deliver more than thirty percent lower throughput than the balanced one. This is not an implementation defect but a physical constraint of bandwidth and capacity.
4. The Underrated Cost: Weight Loading Time
Loading hundreds of gigabytes of weights from disk into memory and VRAM takes on average more than ten minutes, even with high-speed solid-state media and a relatively new transfer bus. More importantly, most setups do not support hot-swapping expert layers or context configurations: after changing the configuration, you must fully release the loaded model and load it again.
Tuning cost is therefore not “edit one line of configuration” but “one loading cycle of ten-plus minutes.” In a three-day test, the time actually spent on inference validation may be less than a third of the total.
The pragmatic approach is to move decisions ahead of loading:
Pre-launch decision checklist1. Does the task require long-document understanding? -> Context first2. Is the task mainly short, high-frequency instructions? -> Speed first3. Is multi-role collaboration needed? -> Prepare two configurations, launch per session4. Does the usable pool cover the target configuration? -> Estimate before loading
5. Architecture Recommendations for Production
If the goal is to serve traffic reliably, a single-GPU setup is better positioned as “validation and lightweight trial.” For production, consider the following layered approach:
- Inference layer: use accelerators with more VRAM or multi-GPU tensor parallelism to avoid cross-tier paging;
- Scheduling layer: split long-context planning and short-context execution into separate instances, and have a gateway route by request characteristics instead of relying on hot-switching within a single instance;
- Storage layer: keep weights in object storage or high-speed shared storage, with local caching on the node side to shorten cold starts;
- Observability layer: collect throughput, VRAM usage, page-swap counts, and time-to-first-token through monitoring, alerting, and logging services, and judge configurations with data rather than intuition;
- Elasticity layer: use container platforms and auto-scaling to allocate instances of different sizes by session type.
In related practice at Baidu AI Cloud, these capabilities are typically delivered by combining general product categories: object storage for weights, a container platform for inference instances, and monitoring, alerting, and logging services for runtime observability. This turns “tuning by repeated loading” into “configuration as deployment.”
6. Conclusion
Whether a full-precision LLM can run on a single GPU depends on three variables holding at the same time: whether the usable memory pool covers both weights and context, whether the operating system lifts the pinned-memory quota, and whether the team accepts a long loading cycle. For most developers, the more rational path is to complete functional validation and quality assessment in a single-GPU environment, fix the context-versus-expert-residency tradeoff as a pre-launch decision, and then use a layered architecture and observability system in production to handle real traffic.
