Private LLM Deployment and Domain Fine-Tuning for Public Health Agencies: A Practical Guide

    This article explains how public health agencies—such as disease control and prevention centers—can build private, on-premises large language model (LLM) systems. It covers task decomposition (RAG vs. domain fine-tuning vs. deterministic programs), GPU and storage capacity planning, heterogeneous computing and tiered storage trade-offs, data governance, fine-tuning methodology, security architecture, and acceptance testing and operations, with an emphasis on compliance boundaries and verifiable outputs.

    1. Goals: Building Usable Professional Capability Within Security Boundaries

    When a public health agency builds LLM capabilities, the core objective is not to make the model answer more questions. It is to improve the efficiency of public health information processing within clearly defined data-use permissions and business responsibility boundaries. Typical scenarios include assisting with technical regulation retrieval, organizing surveillance reports, extracting key elements from investigation records, drafting document first versions, and checking terminology and formatting consistency across materials.

    These tasks share three characteristics: the input may contain sensitive information, the answers must follow professional standards, and the outputs usually require traceable supporting evidence. Therefore, system design must simultaneously address how data enters the system, how the model processes it, how answers are verified, and how responsibility is assigned.

    On-premises private deployment provides more direct control over data processing, but it does not automatically equal compliance. Whether data may enter the model, whether it can be used for training, how long it must be retained, and which personnel may view the results must still be determined item by item based on data classification, processing purpose, and applicable regulations. Important data, sensitive personal information, and materials subject to confidentiality requirements demand additional dedicated management measures.

    Project acceptance should also look beyond whether the model starts successfully. It should evaluate business value, runtime performance, security controls, and sustainable operations capability.

    2. Decompose Tasks First, Then Choose the Technical Approach

    Handing every public health requirement to a single round of domain fine-tuning usually leads to high costs and unstable results. A more reasonable approach is to select different capability combinations based on task characteristics.

    2.1 Use Retrieval-Augmented Generation for Regulation Queries

    Technical guidelines, operating procedures, and emergency response plans have authoritative sources and may be revised over time. This kind of knowledge belongs in a controlled knowledge base: relevant content is retrieved when a user asks a question, and the model then generates an answer grounded in that evidence.

    The knowledge base should record document source, applicable scope, version, effective date, and deprecation status. Answers should present not only conclusions but also the supporting basis, and should prompt manual verification when evidence is insufficient or documents conflict.

    2.2 Use Domain Fine-Tuning for Stable Tasks

    If a task follows relatively stable input-output conventions over the long term—for example, classifying investigation records, normalizing professional terminology, organizing report paragraphs, or extracting fixed fields—domain fine-tuning can improve output consistency.

    Fine-tuning should primarily teach task rules, expression style, and professional context, rather than writing frequently changing business facts into model parameters. Once such knowledge becomes outdated, the cost of updating and the difficulty of correcting errors both increase.

    2.3 Delegate Precise Computation to Controlled Programs

    Computing surveillance indicators, performing trend statistics, and validating rules should preferentially be handled by verified programs. The model can help interpret requirements, organize results, and explain calculation definitions, but it should not replace deterministic computation.

    For anomaly assessment, risk-level adjustment, or response recommendations, a human review step must be retained. Language generation ability should not be mistaken for independent decision-making ability.

    3. Capacity Planning: Do Not Select Hardware by Parameter Count Alone

    Compute planning must at least distinguish between inference and training workloads. The two differ substantially in memory, compute, storage throughput, and concurrency scheduling requirements.

    3.1 What Inference Resources Consist Of

    During inference, device memory typically holds model weights, intermediate data produced during computation, and the attention key-value (KV) cache. Weight footprint can be roughly estimated as:

    Weight size ≈ number of parameters × bytes per parameter.

    This estimate is only a starting point, not an actual deployment capacity figure. Longer context windows and more concurrent sessions both increase cache and runtime memory demand. The inference engine’s implementation, quantization format, and memory fragmentation also affect final usage.

    Therefore, before hardware selection, prepare representative business samples covering long-document Q&A, multi-turn interaction, batch processing, and peak-hour access, and measure actual resource consumption.

    3.2 Training Resources Differ from Inference Resources

    Beyond weights, training must store gradients, optimizer states, and some intermediate activations. Full-parameter fine-tuning typically consumes far more memory than inference, but there is no universal answer to how many devices are needed without considering model scale, numeric precision, sequence length, and training strategy.

    For budget-constrained organizations, parameter-efficient fine-tuning (PEFT) is worth evaluating first. It trains only a small set of newly added or selected parameters and usually reduces training-state overhead, but it still requires loading the base model and performing the associated computation—there is still a memory floor.

    Before procurement, also verify that the base model meets requirements for language comprehension, professional terminology handling, structured output, and licensing. A larger model does not necessarily yield better project returns.

    4. Heterogeneous Resources and Tiered Storage: Lowering the Barrier While Acknowledging Limits

    One resource organization approach worth studying is combining a small number of GPUs with dedicated accelerator devices, coordinated by an intermediate layer for compute and data scheduling. Its value lies in redistributing resource responsibilities, not simply adding more devices.

    Some solutions also use host memory and local flash storage to hold parameters or training states not currently involved in computation, migrating them to compute devices when needed. This can relieve device memory pressure, but the following boundaries must be clear.

    4.1 Flash Storage Is Not Equivalent to Device Memory

    Even if software provides an extended-memory-style access abstraction to upper layers, the underlying pipeline still involves storage reads, data movement, and device computation. Flash, host memory, and device memory differ in access latency and bandwidth. “Being able to load the model” must not be read as “being able to run the model efficiently.”

    When data migration is too frequent, compute devices may wait on data, causing throughput to drop and tail latency to rise.

    4.2 Heterogeneous Devices Do Not Scale Linearly

    Coordinating multiple device types depends on operator support, driver compatibility, data formats, and task partitioning. If critical computation cannot execute on the target device, or inter-device transfer overhead is high, additional hardware may not deliver the expected benefit.

    Therefore, a deployment approach combining a small number of GPUs with accelerator cards can serve as a direction for validation, but it cannot be generalized into a configuration reusable for any model or any concurrency level.

    4.3 Cost Evaluation Must Use Unified Conditions

    Hardware purchase price is only part of total cost. Software adaptation, device maintenance, storage wear, energy consumption, and personnel investment must also be counted.

    When comparing solutions, fix the model, precision, input length, concurrency level, and quality requirements, then observe time to first token, overall completion time, throughput, and long-term stability. Without unified test conditions, “fewer devices” does not equal “lower total cost.”

    5. Data Governance: The Foundation of Fine-Tuning Success

    Raw public health materials often come from different eras and systems, with common problems including missing fields, inconsistent abbreviations, OCR errors from scanned documents, and inconsistent statistical definitions. Training directly on ungoverned data may cause the model to learn incorrect associations or non-standard expressions.

    5.1 Maintain a Data Usage Inventory

    Every data batch should have a clearly documented source, business ownership, sensitivity level, permitted use, authorization scope, and retention period. Data usable for business queries is not automatically usable for model training.

    Before training, confirm the processing purpose and necessity, establish approval and audit-trail mechanisms, and manage data copies across their full lifecycle.

    5.2 Apply the Minimum-Necessary Principle

    Learning domain capabilities usually does not require real names, ID numbers, phone numbers, or precise addresses. Depending on the task, apply deletion, generalization, or placeholder substitution while preserving necessary professional relationships.

    Note that removing direct identifiers does not necessarily achieve anonymization. Rare events combined with specific locations and times can still create re-identification risk, so evaluation must consider context.

    5.3 Prevent Train/Test Data Leakage

    A single event may produce multiple highly similar records. If the dataset is split randomly by text alone, related materials may land in both the training and test sets, inflating evaluation results.

    A more reliable approach is to split by event, time period, or source according to the actual task, and to remove near-duplicate samples. The test set should also include cases with insufficient evidence, conflicting information, and requests outside the system’s scope, to check whether the model declines appropriately.

    6. Fine-Tuning Implementation: Use Baselines to Decide Whether the Investment Is Worthwhile

    Domain fine-tuning should proceed in the order: establish a baseline — small-scale validation — independent evaluation — controlled rollout.

    First, test how the base model performs with prompt constraints and knowledge retrieval, and record the main error types. If problems stem mainly from missing knowledge, improve the knowledge base first. If problems concentrate on task formatting, terminology habits, or adherence to stable rules, then consider fine-tuning.

    Second, run experiments with small, reviewed, high-quality samples. During training, watch validation-set performance rather than pursuing training-loss reduction alone. For versions showing distorted professional facts, degraded general comprehension, or rigid output patterns, analyze data distribution and training settings instead of simply adding more epochs.

    Finally, compare the base model, prompt-only approach, retrieval approach, and fine-tuned approach under identical conditions. Only when fine-tuning gains outweigh the added data maintenance and operational costs should its scope be expanded.

    Versions of the model, training data, configuration, evaluation results, and approval records should be linked so that problems can be traced and rolled back.

    7. Security Architecture: Covering Input, Retrieval, Model, and Output

    Intranet deployment reduces external transmission, but it does not eliminate risks such as unauthorized access, internal misuse, malicious documents, or sensitive information leakage.

    7.1 Identity and Access Control

    User access, knowledge retrieval, and result export should enforce unified authentication and least-privilege principles. Knowledge-base permissions must be enforced before or during retrieval—do not hand inaccessible content to the model and then expect the model to keep it secret on its own.

    7.2 Isolating Input and Document Content

    Uploaded materials may contain text designed to induce the model to ignore its rules (prompt injection). The system should distinguish business documents from system instructions, treating retrieved content as evidence to be analyzed, not as executable commands.

    If the model can invoke internal functions, restrict the callable scope and add confirmation steps for high-risk operations.

    7.3 Log and Temporary File Governance

    Auditing should record the operator, time, model version, knowledge-base version, and key operation results, but should not indiscriminately store all sensitive content in full. Logs, caches, temporary files, and backups all need access permissions, retention periods, and cleanup rules.

    7.4 Supply Chain and Update Management

    Model files, runtime dependencies, and update packages should undergo source verification, security scanning, and compatibility testing before entering the internal network. Training and production environments should be appropriately isolated so experimental tasks do not affect business services.

    8. Acceptance and Operations: From One-Time Deployment to Long-Term Usability

    Project acceptance should cover four dimensions:

    • Business quality: factual accuracy, terminology correctness, field-extraction quality, correct source citation, and appropriateness of refusals.
    • Performance: response time, throughput, failure rate, and resource usage under varying input lengths and concurrency levels.
    • Security capability: protection against unauthorized access, sensitive-information leakage testing, malicious input handling, and audit completeness.
    • Operations capability: service monitoring, fault recovery, version rollback, backup restoration, and the effectiveness of update procedures.

    Rollout can begin with low-risk, highly repetitive, easily verifiable tasks—such as policy retrieval and document format checking—before gradually extending to complex material organization. Tasks involving risk judgment should continuously retain professional human review.

    Public health knowledge and business rules change over time, so knowledge-base update mechanisms and model update mechanisms must be maintained separately. Updating knowledge content does not necessarily require retraining; fine-tuning needs should be re-evaluated only when task capability shows persistent deficiencies.

    Conclusion

    Private LLM deployment for a public health agency is fundamentally a coordinated engineering effort across data governance, computing resources, professional knowledge, and security accountability. Tiered storage and heterogeneous computing offer room for resource optimization, and retrieval-augmented generation and domain fine-tuning address knowledge access and task adaptation respectively—but none of these can substitute for validation in real business scenarios.

    A sustainable path is to first define tasks and compliance boundaries, then establish performance and quality baselines through small-scale pilots, and finally expand based on reproducible evaluation results. Only when every capability has a defined scope, every output has a verifiable basis, and every version has a traceable record can the model become a reliable assistant for public health work.