Local Deployment of an AI Research Platform for Universities: Compute Selection and Security Design
This article explains how universities and research institutions can build a locally deployed LLM platform covering data cleaning, model inference, agent orchestration, and security evaluation. It walks through the four-layer architecture, VRAM estimation and parallelism strategies for hundred-billion-parameter models, inference engine selection and stress testing, agent and RAG design, and a multi-tenant security checklist.
In universities and research institutions, local deployment of large models is becoming a primary way to work with research data. Calling cloud APIs incurs ongoing network and per-call costs, and has inherent weaknesses in data privacy, access control, and compliance auditing. As a result, more and more research groups want to deploy foundation models in campus data centers and build an experimental platform covering data cleaning, model inference, agent orchestration, and security evaluation. This article reviews the engineering approach and key parameters for building such a platform.
1. Requirements and Overall Architecture
Research tasks—including literature analysis, data processing, experiment plan generation, semantic retrieval, and code writing—are far more complex than single-turn Q&A. The platform therefore needs three capabilities: sufficient concurrent inference capacity, flexible invocation orchestration, and strict multi-tenant isolation. When multiple research groups share the platform, it must also support joint inference without exposing raw sensitive data.
The platform can be divided into four layers:
- Infrastructure layer: A cluster of servers with domestic AI accelerator cards, interconnected via high-speed networking for intra-node and multi-node collaboration.
- Model inference and optimization layer: Handles weight quantization, distributed inference scheduling, and model parallelism configuration.
- Agent orchestration layer: Integrates knowledge bases, tool calling, and task planning.
- Security and operations layer: Data encryption, model evaluation, content moderation, operation auditing, and monitoring/alerting.
2. Serving Hundred-Billion-Parameter Models on a Domestic Compute Stack
2.1 VRAM Estimation and Parallelism Strategies
Take a sparsely activated model with 671B parameters as an example. Storing weights in FP8 requires roughly 671 GB of VRAM; in BF16, about 1.3 TB—far beyond a single card. Use the following formulas for estimation:
- Weight VRAM ≈ parameter count × bytes per parameter (2 for BF16, 1 for INT8 or FP8)
- KV Cache VRAM ≈ 2 × number of layers × number of KV heads × head dimension × bytes per element × sequence length per request × concurrent requests
Two commonly used parallelism strategies:
- Tensor Parallelism (TP): Splits the weight matrices of each layer across multiple cards. After intra-layer computation, the cards merge results through collective communication primitives such as All-Reduce, All-Gather, or Reduce-Scatter.
- Expert Parallelism (EP): For MoE models, different experts are placed on different cards. When tokens are routed to their corresponding experts, All-to-All communication handles dispatch and collection.
The two strategies rely on different communication primitives, so communication volume and bandwidth requirements must be evaluated separately during selection.
The instruction sets and operator libraries of domestic accelerator cards differ from general-purpose GPUs, so high-frequency operators such as Attention, RMSNorm, and RowParallelLinear need adaptation and tuning. Fused operators combine multiple consecutive operations into a single kernel, reducing memory accesses—a common technique for improving throughput.
2.2 Inference Engine Selection and Configuration
The inference framework should support continuous batching and prefix caching; common choices include vLLM and SGLang. The versions of the framework, drivers, and operator libraries must align with the vendor’s compatibility list. Lock version numbers before going live, and complete regression testing in a staging environment before any upgrade.
Key parameters:
- Maximum sequence length: Long research documents require a large context window, and the KV Cache increment must be calculated using the formula above.
- Concurrency limit: When multiple tenants share an instance, set per-tenant concurrency quotas based on average input and output lengths, so that individual oversized requests don’t degrade overall responsiveness.
- Quantization strategy: INT8 or FP8 significantly reduces VRAM usage but introduces some accuracy loss.
Quantization rollout process:
- Sample a calibration set from real research corpora, covering all disciplines and varying document lengths.
- On an evaluation set consistent with the production environment, compare the BF16 baseline against the quantized model, recording accuracy, factual consistency, and output format compliance.
- Define tolerance thresholds in advance. For example, accuracy on critical tasks must not drop by more than 1 percentage point below the baseline. Tasks exceeding the threshold keep the high-precision model.
Stress testing procedure:
- Build a request set that reflects the actual workload distribution, including input length, output length, and request arrival intervals.
- Ramp up pressure step by step from low concurrency, running each concurrency level for a sufficiently long duration.
- Record throughput, time to first token (TTFT), P95 latency, and peak VRAM, and identify the inflection point where latency rises sharply.
- Use roughly 70% of the concurrency at that inflection point as the starting production concurrency limit, leaving headroom for traffic bursts.
3. Agents and Knowledge Base
3.1 Tool Registry
Each tool must register the following fields: tool name, input/output schema (JSON Schema), permission level, timeout, maximum retry count, and audit fields (caller, research group, timestamp, parameter summary, return status).
Consider a typical request: a researcher asks to analyze the conserved regions of a gene sequence and generate an alignment chart. The agent first calls the sequence alignment tool, then a plotting script, and finally composes a textual summary. Every step is written to the audit log. Tool failures are handled according to the timeout and retry configuration; after consecutive failures, the workflow aborts and returns the error reason, rather than letting the model fabricate results.
3.2 Private RAG Checklist
- Text chunking: Split by section or paragraph, about 500–800 characters per chunk, with roughly 10% overlap between adjacent chunks. Tune the exact values on a validation set.
- Embedding model: Prefer a locally deployed embedding model that has been evaluated on Chinese scientific literature, and deploy it separately from the generation model.
- Retrieval and reranking: First run vector retrieval to get the top 20 results, then use a reranking model to select the top 5 for injection into the context.
- Citation tracing: Every conclusion in the answer is annotated with the source document and paragraph number for manual verification.
4. Security System
4.1 Encryption and Isolation
The storage layer uses volume-level encryption, the transport layer uses TLS or Chinese cryptographic (GM) protocols, and the compute layer isolates tenants within trusted execution environments. This satisfies data classification and grading requirements while reducing the risk of single-point leakage.
Multi-tenant isolation checklist:
- Tenant quotas: Set compute, VRAM, and storage quotas per research group.
- Network policy: Tenants cannot communicate with each other by default; only the platform gateway ports are exposed.
- Storage mounts: Each research group mounts only its own data directory.
- Audit fields: Record the user and timestamp for each operation.
