Running Full-Parameter LLMs on a Single GPU: Coordinating VRAM and System Memory
This article explains why running full-precision, large sparse models on a single GPU is primarily a systems engineering problem rather than a compute problem. It covers how to define a reproducible test environment, how driver-level memory registration quotas limit shared VRAM, and why context length and expert layers compete for the same memory pool. It also outlines the time cost of repeated model reloads and practical optimization directions, including tiered caching, dual-mode orchestration, server-side deployment, observability, and cloud elasticity. Readers will learn how to choose rationally between speed-first and context-first configurations instead of relying on trial and error.
1. Background: Why “Running Full Models on a Single GPU” Became a Hot Topic
Over the past year or two, sparse models with very large parameter counts have become a mainstream form in the open-source community. “Full” typically refers to versions that retain the original weight precision without aggressive quantization or pruning. The weights of these models often reach hundreds of gigabytes, far exceeding the physical VRAM capacity of a single consumer-grade GPU. As a result, “Can it run on one GPU?” has become a typical systems engineering problem rather than a pure compute problem.
One common misconception needs to be cleared up first: a model that can be loaded is not the same as a model that can run efficiently. Loading only requires enough address space, while running efficiently requires hot data to stay on low-latency media as much as possible. Many attempts fail not because the model does not fit, but because the scheduling path is too long and page faults are frequent, driving effective throughput down to an unusable range.
2. Defining the Hardware and Software Boundaries
A reproducible evaluation should start by fixing the environment. A typical configuration includes a single consumer-grade GPU with 32 GB of VRAM, a desktop processor with 16 or more cores, more than 190 GB of system memory, high-speed solid-state storage, and a desktop operating system with virtualization extensions running a Unix-like environment on top.
The most easily overlooked factor is the OS-level VRAM extension mechanism. Most desktop graphics driver models impose a fixed quota on “host memory registration,” meaning that even with sufficient physical memory, the portion that can be mapped as shared VRAM has an upper limit. When the sum of physical VRAM and available shared VRAM is still smaller than the weight size, the excess can only go through the general memory path, and access latency rises by an order of magnitude.
A simplified capacity calculation can be expressed as follows:
Available pool ≈ physical VRAM + min(physical memory, driver-allowed registration quota)If available pool < weight size + KV cache + runtime overhead → paging is inevitable
3. The Structural Conflict Between Context Length and Throughput
During sparse model inference, the attention key-value cache must remain resident in VRAM, and the activated expert layers also need to stay in VRAM. The two share the same space in a zero-sum relationship: the longer the context, the less space remains for expert layers, the more experts must fall back to memory, and the slower the inference. Conversely, pursuing speed requires compressing the context.
A clear pattern of staged degradation can be observed in practice. At a context length of around 64K, stable output of more than ten tokens/s can be maintained. When the context is expanded to around 128K, throughput typically halves to single digits. This shows that the bottleneck does not grow linearly; instead, after crossing a certain residency threshold, the system enters a paging-dominated range.
4. The Time Cost of Repeated Loading
Most current local inference solutions lack hot-swapping of expert layers, so any configuration change requires a complete release and reload. Reading hundreds of gigabytes of weights from solid-state storage into memory and VRAM takes more than ten minutes even over high-speed channels. This directly determines the tuning rhythm: a full day of debugging may consist only of cycles between loading and unloading.
Fortunately, this process is read-only and does not significantly wear out storage or memory. The engineering approach is to reduce the number of trials: complete the capacity calculation on paper first, determine two or three candidate configurations, and then validate them in batches rather than changing and testing repeatedly.
5. Actionable Optimization Directions
- Tiered caching strategy: Keep frequently accessed expert layers permanently resident in VRAM, leave cold data in memory, and use prefetching to reduce page faults.
- Dual-mode agent orchestration: A long-context mode handles planning, while a short-context high-speed mode handles execution. Use task-level routing instead of in-process hot switching to avoid reloads.
- Server-first deployment: A headless server environment has no registration quota limit, allowing memory and VRAM to form a more complete shared pool. This is the fundamental reason the original practice ultimately recommended server deployment.
- Observability: Use general-purpose monitoring, alerting, and logging services to collect page fault rates, VRAM usage, and throughput curves, and locate bottlenecks with data rather than intuition.
- Cloud elasticity: If local hardware reaches its limit, use a container platform with object storage to distribute weights and scale elastically per task, avoiding a one-time hardware investment.
