Deploying a 27B LLM Inference Service on an Enterprise Intranet: Architecture, Environment Checks, and Startup Parameters
This article explains how to deploy a 27B large language model inference service on an enterprise intranet using a multi-GPU server. It covers the three-layer architecture, pre-deployment checks for GPU drivers, container GPU access, and model files, GPU memory estimation, deployment through a visual management panel, and key startup parameters including model path, service name, quantization, data type, GPU memory utilization, batching, KV cache block size, and context length.
1. Background and Objectives
As intelligent coding assistance becomes more common in R&D workflows, more teams want to keep source code and business data within the enterprise intranet. Deploying large models on self-owned servers not only helps control data flow but also allows the inference service to be adjusted according to the team’s concurrency and response latency requirements.
This article uses a server equipped with multiple GPUs as an example to describe the entire process from environment checks to service launch. It does not only provide operational steps but also explains the role of each key startup parameter, helping readers make decisions based on their own hardware conditions.
2. Solution Architecture
The overall solution can be divided into three layers:
- Hardware and driver layer: GPUs, GPU memory, GPU drivers, and the container runtime’s ability to access GPUs.
- Inference service layer: The open-source inference engine loads model weights, schedules batched requests, manages KV cache, and exposes a standardized HTTP chat interface.
- Management layer: The visual operations panel creates services, fills in parameters, and views running status and logs.
The benefit of layering is that issues at each layer can be troubleshooted independently. For example, if the container cannot see the GPU, it is a hardware and driver layer issue and is unrelated to model parameters. If the service responds slowly after startup, it is more likely related to batching or cache configuration in the inference service layer.
3. Environment Checks Before Deployment
Before formal deployment, three things need to be confirmed: the GPU driver works properly, the container can access the GPU, and the model files are complete. If any of these is missing, the service will either fail to start or encounter errors during operation.
3.1 Check the GPU Driver
Run the GPU status query command. Under normal circumstances, it should output the following information:
- GPU model and count
- GPU driver version
- Compute runtime version
- Total and currently used GPU memory for each GPU
Pay special attention to whether the driver version meets the inference engine’s requirements. When versions do not match, a common symptom is failure to load low-level libraries during service startup. In this case, upgrade or replace the driver first before continuing.
3.2 Check Container GPU Capability
Inference services created by the panel usually run in containers, so it is necessary to confirm that the container runtime has been correctly connected to the GPU. Start a temporary container with GPU access permissions and run the same GPU status query command inside it. If the output matches that of the host, the container can directly use all GPUs.
If the GPUs are not visible inside the container, common causes include the container runtime not having the GPU extension component installed, the configuration file not being reloaded, or incompatibility between the host driver and the runtime version.
3.3 Prepare Model Files
The model can be downloaded in advance from a public model repository, or obtained from an intranet artifact repository or appliance preinstalled storage. It is recommended to place the model in a dedicated data disk directory, for example:
/data/models/<model directory>/├── config.json # Model structure and hyperparameters├── tokenizer.json # Tokenizer vocabulary and rules├── tokenizer_config.json # Tokenizer configuration├── model-00001-of-000NN.safetensors # Sharded weight file├── model-00002-of-000NN.safetensors└── *.py # Custom model code (if any)
The model contains multiple weight shards. If any shard is corrupted or missing, an error will occur during the loading stage. After downloading, it is recommended to verify the file hash values and set the directory to read-only to avoid accidental modification while the service is running.
3.4 Estimate GPU Memory Requirements
GPU memory requirements can be estimated using the following rough formula:
Weight memory ≈ number of parameters × bytes occupied per parameter
Taking 27B parameters as an example:
- FP8 quantization (1 byte per parameter): about 27 GB
- FP16 precision (2 bytes per parameter): about 54 GB
Beyond weights, it is also necessary to reserve memory for activations, KV cache, and system overhead. The size of the KV cache is proportional to the number of concurrent requests and the context length, and it is often the most underestimated part of GPU memory planning. Estimation results can only be used as a reference for selection. Before formal launch, actual loading and stress test results should be used as the basis.
4. Deploy the Inference Service Through the Visual Panel
4.1 Open the Model Service Page
In the visual operations panel, open the model page under the AI module, switch to the tab whose inference engine type is “open-source inference engine,” and then click New. Menu names may differ slightly across panel versions; the key is to find the creation entry for the model inference service.
4.2 Fill in Deployment Parameters
The form parameters can be roughly divided into four categories. The following table lists the meaning and configuration considerations for each item.
| Parameter category | Configuration item | Description |
|---|---|---|
| Basic information | Service name | Service identifier in the panel and also the model name used in client requests |
| Model path | Model directory | Directory readable inside the container; must match the mounted path |
| Resource allocation | GPU count | Must match the tensor parallel size and must not exceed the actual number of available GPUs |
| Network | Service port | Port listened to by the inference interface; ensure intranet reachability and no conflict with other services |
The following example shows the correspondence between these parameters. Field names are only used to explain the meaning; actual fields are subject to the panel form:
# Parameter example; field names are subject to the panel formmodel_path: /data/models/<model directory>served_name: <external service name>port: 8000quantization: fp8dtype: float16gpu_memory_utilization: 0.9max_num_batched_tokens: 8192max_model_len: <set according to business requirements>tensor_parallel_size: <actual GPU count>
4.3 Startup Parameter Details
The panel ultimately combines the form contents into inference engine startup parameters. Understanding the role of each item is more important than copying a set of values.
4.3.1 Model Path and Service Identifier
The model path must point to a directory accessible inside the container. The service name appears in the model field of every API request. It is recommended to use a name that is semantically clear and does not contain version-sensitive information, making it easier to maintain client compatibility during subsequent model upgrades.
The service port needs to be set together with the network policy. The service should bind only to intranet addresses and restrict access sources through a gateway or firewall.
4.3.2 Quantization and Data Type
Quantization determines the storage precision of model weights. Storing weights in FP8 can reduce weight memory to about half of FP16, allowing a single GPU or a small number of GPUs to host a larger model or more concurrency.
The data type parameter (such as FP16) usually refers to the precision of activations during computation. The two can be combined: weights are stored in FP8, and computation uses FP16. Quantization introduces some accuracy loss. It should be compared and verified using business-relevant test sets (such as code completion accuracy and function generation pass rate), rather than looking only at the memory savings ratio.
4.3.3 GPU Memory Utilization Cap
The GPU memory utilization cap indicates the maximum proportion of GPU memory that the inference engine can occupy. When the value is 0.9, about 10% of GPU memory is left for the system, fragmentation, and burst overhead.
If the value is too high, the service may crash due to insufficient GPU memory during peak periods; if it is too low, GPU memory is wasted and the available KV cache space is reduced. Usually, it can start from 0.85 or 0.9 and be fine-tuned based on stress test results.
4.3.4 Batching and Scheduling Parameters
The maximum batched token count determines the maximum total number of tokens processed by the inference engine in one scheduling step. A larger value usually means higher throughput per unit time, but the peak GPU memory per step and the first-token latency also increase.
The KV cache block size determines the basic unit of paged cache. A larger block reduces management overhead but may increase memory fragmentation; a smaller block makes cache utilization more flexible but increases metadata overhead. Inference engines that use paged KV cache generally provide similar parameters, and adjustments should be based on stress test data.
4.3.5 Context Length
The maximum model length limits the maximum number of tokens that a single request can contain, including input and output. It directly determines the reserved size of the KV cache.
Models usually support very long contexts, but setting too large a limit on the server side will significantly reduce concurrency space. It is recommended to set it according to actual business needs, for example, in code completion scenarios.
