Local Deployment of Large Language Model Platforms: Selection and Upgrade Practices
This article explains how to select and upgrade a self-hosted large language model (LLM) platform. It covers why teams run inference locally, a five-layer technical stack, a sample three-node reference environment, pre-upgrade checks, a step-by-step rolling upgrade procedure, storage and model distribution details, and common troubleshooting scenarios. Readers will learn how to keep environment baselines, backups, and rollback plans under control during upgrades.
1. Why Deploy LLMs Locally
Running large model inference in your own environment is usually driven by three considerations. First, data residency: sensitive data stays within the internal network across collection, labeling, and inference. Second, stable service is still required in network-isolated or low-bandwidth environments. Third, for long-term, high-frequency calls, the marginal cost of self-built compute is more controllable.
One thing to clarify upfront: local deployment does not mean “install it and it works.” It is a systems engineering effort involving compute, drivers, runtimes, model weights, service orchestration, and operations monitoring.
During selection, it helps to answer four questions first: What are your concurrency and latency targets? What is the upper limit on model size and context length? Do you need multimodal and vector retrieval capabilities? Do you require multi-node elasticity and fault isolation? These four answers directly determine GPU memory, node count, and network topology.
2. Layered Technical Stack for Local Deployment
A maintainable local inference platform is typically divided into five layers:
- Hardware layer: GPUs and their memory, host memory, local or shared storage, and inter-node networking.
- Driver and runtime layer: GPU drivers, general-purpose compute runtimes, and container runtimes.
- Model serving layer: model weight management, inference backends, and batching and quantization strategies.
- Orchestration layer: node registration, scheduling, replicas and fault recovery, and model distribution.
- Operations layer: logging, metrics, alerting, upgrades, and rollbacks.
The benefit of layering is that upgrades can limit risk to a single layer. For example, when upgrading only the orchestration layer, model weights and the way business systems call the service can remain unchanged, and rollback only requires switching back to the old data directory.
3. Reference Environment (Example)
An internal environment runs a three-node cluster to serve inference for small and medium-sized models, configured as follows:
| Node | Example address | OS | GPU | GPU memory | Driver version | General-purpose compute runtime |
|---|---|---|---|---|---|---|
| Control node | Internal 172.16.1.113 | Mainstream LTS distribution | Single 32G-class consumer/professional card | 32G | 5xx series | 12.x |
| Worker node A | Internal 172.16.1.111 | Mainstream LTS distribution | Single 32G-class card | 32G | 5xx series | 12.x |
| Worker node B | Internal 172.16.1.115 | Mainstream LTS distribution | Single 32G-class card | 32G | 5xx series | 12.x |
All three nodes mount different directories of the same backend through shared storage: the control node uses a dedicated data directory, and each worker node uses a subdirectory. The intent is to separate control-plane data from node-local caches, making full backup and migration easier.
4. Pre-Upgrade Checks
The most common cause of upgrade failures is not the new version itself, but an inconsistent environment baseline. Work through the following checklist:
- Version differences: Record the current and target versions, and review the official release notes for breaking changes, renamed configuration items, and data directory structure changes.
- Driver and runtime compatibility: Confirm the target version’s minimum requirements for the driver and general-purpose compute runtime to avoid startup failures caused by the new version requiring a higher runtime.
- Data backup: Perform a full backup of the control node data directory, and snapshot or archive the worker node directories. Keep backup files on a different storage backend than the cluster.
- Ports and permissions: Verify that service ports, console ports, and node communication ports are allowed by firewall policies.
- Resource headroom: The first pull of new models after an upgrade consumes disk and bandwidth, so reserve at least one to two times the model size.
- Rollback plan: Keep the old version installer, old data directory, and old configuration files, and define rollback criteria (for example, the console is unreachable for more than ten minutes, or inference success rate falls below a threshold).
Example backup and verification commands (replace placeholders with actual paths):
# Back up the control node data directory and generate a checksumtar -czf /backup/control-plane-$(date +%F).tgz /data/control-planesha256sum /backup/control-plane-$(date +%F).tgz > /backup/control-plane.sha256# Verify that the driver and runtime are visiblenvidia-smi --query-gpu=name,memory.total,driver_version --format=csv
5. Step-by-Step Upgrade Procedure
- Freeze changes: Stop new model releases and configuration changes, and notify callers of the maintenance window.
- Upgrade the control node first: After backing up the control node, upgrade it. Do not connect worker nodes yet; verify that the console, authentication, and model repository work.
- Rolling upgrade of worker nodes: Upgrade one worker node at a time, observe its registration status and resource reporting, then move to the next, ensuring the cluster always has available compute.
- Align data directories: If the new version changes the directory structure, migrate according to the release notes. Do not manually move files whose purpose is unknown.
- Redistribute models: Confirm that replica policies take effect under the new version, and load a small model first for pipeline verification if necessary.
- Observe and ramp up traffic: Watch startup logs, error rates, time to first token, and GPU memory usage. Once stable, gradually restore call traffic.
Upgrade sequence overview:Control node (backup -> upgrade -> self-check)-> Worker node A (upgrade -> registration -> self-check)-> Worker node B (upgrade -> registration -> self-check)-> Canary model loading -> traffic restoration
6. Key Details on Storage and Model Distribution
Shared storage simplifies backups but introduces a single point of risk: instability in the backend storage affects all nodes at once. In practice, store control-plane data and model caches in separate tiers, with model weights loaded from node-local cache first and shared storage as fallback. In multi-node scenarios, model distribution should be parallelized and support resumable transfers; otherwise, loading tens of gigabytes of weights at once can stretch the upgrade window beyond what is acceptable.
7. Common Pitfalls and Troubleshooting
- Node registration failure: First check network connectivity and port policies from the node to the control node, then look for authentication errors in the logs.
- Insufficient GPU memory: Reduce context length, enable quantization, reduce the number of replicas per node, or split the model across multiple nodes.
- Performance below expectations after upgrade: Confirm whether acceleration and batching options are enabled, and check whether renamed configuration items caused the old configuration to be ignored.
- Issues persist after rollback: This is usually because the new version rewrote the data directory, so restore from backup rather than only reverting to the old program.
8. Conclusion
The core of local LLM deployment is not chasing the latest version, but keeping the environment baseline, data backups, and rollback capability under control. Breaking upgrades into three steps—control node first, rolling worker node upgrades, and canary traffic ramp-up—along with a clear checklist, allows most upgrade risks to be absorbed within the maintenance window. If you want to reduce the burden of self-managed operations, you can also evaluate general capabilities such as container platforms, object storage, and monitoring and alerting offered by providers like Baidu AI Cloud as a supplement.
