Deploying Private LLM Inference Services with Multi-GPU Accelerators: A Practical Guide
This article provides a technical guide for building private large language model (LLM) inference services using multi-GPU accelerator cards. It covers hardware and PCIe topology planning, firmware and BIOS configuration for multi-card support, system installation and baseline validation, model selection for 32B-class models with hundred-thousand-level context windows, service deployment with token quota management, and operational considerations including cost, reliability, and security. The guide is vendor-neutral and focuses on reusable engineering practices rather than specific hardware brands.
Introduction: Understanding “Unlimited Tokens” in Private Deployment
In team-internal or small-scale collaboration scenarios, LLM invocation volumes often show significant fluctuation: interactive requests such as daily Q&A, document summarization, code assistance, and knowledge-base retrieval may concentrate during working hours, while batch processing may run at night. Relying entirely on pay-per-token public cloud APIs causes costs to scale linearly with usage; relying entirely on single-machine small models may sacrifice context length, response quality, and concurrency. As a result, more teams are considering building private inference services with multiple GPU accelerator cards.
It is important to clarify that “unlimited tokens” in private deployment does not mean physically unlimited capacity. It refers to operational flexibility: no per-request billing, with usage governed by resource pool quotas. The marginal cost consists primarily of hardware depreciation, electricity, cooling, and maintenance labor. As long as the resource pool capacity meets business peaks, the team can manage internal quotas without settling charges for each request. Understanding this distinction is essential for designing capacity, rate limits, and prioritization policies.
This article uses multi-GPU accelerator cards as the hardware foundation and discusses a general-purpose approach covering single-machine multi-card deployment, private inference, and internal quota management. It is not tied to any specific brand or model. The focus is on reusable technical paths: planning PCIe topology and power delivery, configuring firmware for multi-card passthrough and large address space mapping, validating devices and links, selecting 32B-class models with hundred-thousand-level context windows, and handling service deployment and capacity estimation.
Hardware and Topology Planning: Count VRAM First, Then Bandwidth
The primary constraint for multi-card inference is not the CPU but VRAM capacity, memory bandwidth, and inter-card communication efficiency. For a 32B-class dense model, with low-bit quantization, a single card or two cards can hold the base weights—but context length, batch size, and KV cache significantly increase VRAM usage. To support a hundred-thousand-token context window with some concurrency, a memory pool on the order of two dual-die cards or four single-die cards is typically required.
On a single-socket platform, verify the PCIe link topology of the accelerator cards first. If the cards use PCIe x8 interfaces, a typical PC platform can accommodate two cards; more cards require a workstation, a multi-socket platform, or a chassis with sufficient PCIe lanes and power delivery capacity. Do not rely solely on the number of physical slots—check CPU-direct lanes, PCIe bifurcation support, inter-card spacing, airflow, and power headroom. Multi-card operation at full load draws significant power and has high transient current demands. Provide independent power wiring for each card and avoid using splitter cables to drive high-power loads in series.
Three principles for topology planning:
- Prefer placing accelerator cards on CPU-direct lanes to minimize chipset forwarding.
- Confirm that PCIe bifurcation modes match the card count, such as x8/x8 or finer splits.
- Preserve conditions for inter-card P2P communication. If firmware or virtualization passthrough policies restrict P2P, multi-card cooperative efficiency may degrade.
For dual-die cards, additionally confirm that the platform supports multi-function devices and large address space mapping; otherwise, the system may fail to enumerate all devices or may run the link at reduced speed.
Firmware and BIOS Configuration: Making the System Recognize All Cards
Firmware configuration often determines whether a multi-card deployment runs stably. Perform the following checks and settings before installing the operating system:
Enable Large Address Space Mapping: Multi-card and high-VRAM devices require a sufficiently large address window. Insufficient mapping can cause device initialization failures, incomplete VRAM recognition, or driver loading errors. Enable this capability in the firmware advanced options and confirm operating system support.
Configure PCIe Bifurcation Modes: Based on card placement and count, configure the corresponding slots to x8/x8 or other matching modes. Incorrect bifurcation can make some slots unusable or reduce link width.
Handle IOMMU and Passthrough Policies: IOMMU is important for virtualization and isolation, but certain passthrough restrictions can affect inter-card P2P communication. If the workload depends on multi-card point-to-point transfers, confirm that the relevant restriction policies have been adjusted. If the workload primarily runs independent single-card inference, stricter isolation configurations can be retained. The key is to run a baseline test and record recognition results and throughput under different configurations.
Check Power and Cooling Policies: Multi-card operation at full load consumes significant power. Disable aggressive power-saving features that may cause frequency throttling, and ensure the fan curve and chassis airflow can sustain continuous load.
After configuration, the system should enumerate all display controllers. Validation should check not only device presence but also link width, link speed, VRAM capacity, and driver status. The following pseudocode describes the self-check logic:
# Pseudocode: Multi-card device and link self-checkdevices = enumerate_display_controllers()assert len(devices) == expected_countfor dev in devices:assert dev.memory_capacity >= planned_capacityassert dev.link_width >= expected_widthassert dev.link_speed >= expected_speedprint(dev.address, dev.memory_capacity, dev.link_width, dev.link_speed)
If the device count is correct but links are running at reduced speed, investigate firmware bifurcation settings, slot placement, and riser card quality. If the device count is insufficient, check power delivery, bifurcation modes, and large address space mapping.
System Installation and Operating Modes: Separating Desktop Debugging from Server Operation
Choose a mainstream server-grade Linux distribution with long-term support and mature driver ecosystems. During the debugging phase, a desktop environment with a graphical interface is helpful for viewing device status and running local tests. For production, use server mode to reduce the VRAM and RAM footprint of graphical services. If a desktop system is installed, confirm that the default boot target is the graphical session; if running in server mode, keep the multi-user command-line target.
After system installation, install the driver, runtime, and inference service dependencies in order. Do not skip multi-card recognition validation before loading models; otherwise, issues may be misdiagnosed as model or framework problems. Establish a baseline record covering: card count, per-card VRAM, PCIe links, driver version, runtime version, single-card idle VRAM usage, and dual-card/quad-card communication test results. Compare against this baseline after every firmware or driver upgrade.
Model Selection and Inference Parameters: 32B-Class Models and Hundred-Thousand-Level Context
For private team services, 32B-class models are typically a good balance between quality and cost. They offer better instruction following and long-document understanding than smaller models while being more practical to deploy on multi-card single machines than larger ones. Quantized weights can significantly reduce VRAM usage, but the impact of quantization on long-context and complex reasoning tasks should be evaluated. Start with a small-scale evaluation on target business samples before deciding on quantization bit width and batch size.
Context window is a key factor in capacity planning. A hundred-thousand-token window does not mean every request should use the maximum length. Long contexts linearly increase KV cache usage and reduce concurrency. A practical deployment can adopt a “default context length + on-demand expansion” strategy: short windows for regular Q&A, higher limits for document analysis requests. The server should estimate input length and either queue or reject requests that exceed limits, preventing a single request from overwhelming the entire card.
Regarding throughput, multi-card configurations with appropriate batching can achieve generation speeds on the order of tens of tokens per second, but the actual figure depends on model size, quantization, context length, batch size, driver and runtime optimizations. Do not directly apply benchmarks from other environments—run load tests on your own hardware: fix input/output lengths, incrementally increase concurrency, and record first-token latency, generation throughput, peak VRAM usage, and error rate. Capacity estimation can use the following formulas:
Daily token volume ≈ active users × requests per user × (avg input tokens + avg output tokens)Peak concurrency ≈ peak-hour requests × avg processing time / 3600Required instances ≈ peak concurrency × avg output tokens per request / stable throughput per instance
The “stable throughput” value should be obtained from load testing at an acceptable error rate and stable latency, not the absolute peak.
Service Deployment and Quota Management: Turning Inference Capability into an Internal Service
A model that runs does not mean the service is production-ready. A lightweight gateway layer is needed for authentication, rate limiting, queuing, logging, auditing, model routing, and quota management. Internal users access the system through a unified API endpoint, and the gateway allocates daily token quotas or concurrency limits per user group. High-priority tasks can be assigned dedicated queues to prevent batch jobs from crowding out interactive requests.
A general inference API can be abstracted as:
POST /v1/inferAuthorization: Bearer <internal-token>{"model": "local-32b","messages": [...],"max_tokens": 1024,"priority": "interactive"}
The server should record request ID, user group, input/output token counts, latency, status code, and error reason. Avoid writing full sensitive content to logs—store hashes, lengths, and desensitized summaries where appropriate. For long-context requests, the gateway should perform length checking and quota deduction before entering the inference queue. If cross-region backup, unified logging, or alerting is needed, audit logs and metrics can be integrated with general-purpose cloud services such as object storage, log services, and monitoring/alerting from providers like Baidu AI Cloud. The inference main path remains in the local private environment, forming a hybrid operations model of “local inference + cloud-based observation and backup.”
Cost, Reliability, and Security Operations
The cost of private inference services includes more than accelerator card procurement. Factor in electricity, cooling, rack space, networking, backups, and labor over a three-year horizon. For small teams, a shared-quota model across several users can spread costs. If business peaks are pronounced, keep one backup card or a backup node to avoid service interruption from a single card failure.
For reliability, monitor at least four categories of metrics: accelerator card temperature and power draw, VRAM usage and error counters, request latency and error rates, and queue length and quota remaining. Set alert thresholds and periodically perform single-card isolation tests and restart/recovery drills. For security: network isolation, API authentication, log desensitization, and audit trails for model and data access. For any external network exposure, use a reverse proxy with access controls; do not expose inference ports directly.
Troubleshooting Checklist and Summary
Common issues can be diagnosed in the following order: insufficient device count—check power delivery and PCIe bifurcation; devices present but links degraded—check slot placement and riser quality; driver loading failures—check large address space mapping and OS version; poor multi-card efficiency—check P2P and NUMA binding; OOM with long contexts—check KV cache and concurrency limits; throughput below expectations—check batching, quantization, and runtime parameters.
In summary, building a private token service with multi-GPU accelerators is not about stacking hardware. It requires systematic planning around VRAM, links, context length, and concurrency. Establish a hardware and firmware baseline first, then run model evaluation and load testing, and finally implement a gateway to close the loop on quota management and operations. This approach delivers stable, auditable, and scalable private LLM inference capabilities at a controlled cost.
