Open-Source LLMs: Capability Boundaries, Evaluation, and Deployment Checklist

    Open-source LLMs can already handle many real tasks, but teams need verifiable methods to determine what they can and cannot do. This article gives developers and enterprise technical leaders a practical checklist covering license review, hardware requirements, reproducibility, structured instruction-following evaluation, long-context handling, tool-use safety for agents, layered deployment, cost analysis, and operational risks.

    Open-source LLMs can already take on many real tasks, but what they can and cannot do must be judged with verifiable methods. This article provides concrete check items for developers and enterprise technical leads on model selection, evaluation, long-text processing, agent security, and deployment.

    1. Check Three Things Before Model Selection

    1. License. Open weights usually come with usage terms. The terms may restrict commercial use, limit user scale, or require attribution. Before launch, legal should confirm the terms, and the team should record the model version and a hash of the license text for audit purposes.
    2. Hardware threshold. Parameter count determines GPU memory usage. When loading in FP16, each billion parameters requires about 2 GB of GPU memory, so weights alone can require tens of GB. Quantization to INT4 can reduce weight footprint to about one quarter of FP16, but some accuracy is lost. Inference also needs space reserved for KV Cache; the longer the context, the larger the footprint.
    3. Reproducibility. Record the model version, tokenizer version, inference framework version, and sampling parameters (temperature, top_p). The same model on a different inference framework may produce different outputs, so evaluation results cannot be compared directly.

    2. Use Structured Evaluations to Test Instruction Following

    Instruction-following ability should not be judged only by subjective trials. Prepare a test set with reference answers that covers three types of constraints: format constraints (for example, output JSON only), field constraints (field names, types, enum values), and multi-step constraints (classify first, then summarize, then output according to a template).

    For data extraction, the prompt can require the model to output the following structure:

    1. {"company": string, "amount_cny": number, "risk_level": "low" | "medium" | "high"}

    The application layer needs to do three things: validate the output with JSON Schema and log failed samples when invalid; retry at most twice when parsing fails, appending the validation error to the prompt each time; and track format compliance rate, field accuracy, average retry count, and per-call latency.

    Below is a validation snippet with retries, using Python’s jsonschema library:

    1. import json
    2. from jsonschema import validate, ValidationError
    3. def extract_with_retry(call_model, prompt, schema, max_retries=2):
    4. last_error = None
    5. for _ in range(max_retries + 1):
    6. full_prompt = prompt if last_error is None else (
    7. f"{prompt}\nThe previous output failed validation: {last_error}. Output only valid JSON."
    8. )
    9. text = call_model(full_prompt)
    10. try:
    11. data = json.loads(text)
    12. validate(instance=data, schema=schema)
    13. return data
    14. except (json.JSONDecodeError, ValidationError) as e:
    15. last_error = str(e)
    16. raise RuntimeError(f"Validation failed: {last_error}")

    3. Long Text: A Context Limit Is Not the Same as Effective Understanding

    The context window a model advertises is the maximum number of tokens it can receive. That number does not mean every segment will be used reliably. Two problems are common. The first is positional extrapolation degradation: when input length exceeds the range seen during training, the extrapolation of positional encodings such as RoPE can degrade, and recall of distant information gets worse. The second is lost information in the middle: when key content is in the middle of a long input, answer accuracy is usually lower than when it is at the beginning or end.

    The applicable boundaries of several approaches are as follows:

    Approach Suitable for Main risk
    Direct long-context input Global understanding and summarization of a single document GPU memory and latency grow with length; middle content may be lost
    Chunking, per-chunk summarization, then aggregation Overview of very long reports Cross-chunk reasoning loses detail; aggregation may amplify errors
    Retrieval-augmented generation (RAG) Enterprise knowledge bases and frequently updated material Missing answers when retrieval recall is insufficient; evaluate recall separately
    Built-in long-context optimization Capabilities already published and evaluated by the provider Follow official evaluations; revalidate after self-hosting

    To evaluate long-text ability, use a needle-in-a-haystack test: place facts at different positions in a long document and check whether the model can retrieve them. Before launch, also set the token limit per call, timeout, and cost budget.

    4. Tool Calling and Safety Boundaries in Long-Running Tasks

    Long-running tasks mean the model plans steps, calls tools, and adjusts the plan based on returned results, for example in ReAct or Plan-and-Solve patterns. The model itself does not keep state across sessions; task progress must be recorded in external storage, such as a task table in a database or a vector store holding session summaries.

    Tool calling must meet the following constraints:

    1. Least privilege. Each tool should expose only the interfaces needed for the task. For example, a retrieval tool should be read-only, and a database tool should allow queries only against whitelisted tables.
    2. Parameter validation. Parameters generated by the model must be validated at the application layer and must not be concatenated directly into SQL or shell commands.
    3. Human confirmation. Operations such as deletion, sending, payment, and permission changes must require user confirmation before execution.
    4. Step and budget limits. Set maximum steps, maximum tool calls, and total time to prevent the model from getting stuck in loops.
    5. Auditing and rollback. Record the input, model output, and tool return value at each step. Write operations should be designed to be reversible.

    When evaluating long-running tasks, focus on task completion rate, average steps, error recovery rate, and unauthorized calls. The target for unauthorized calls is zero.

    5. Layered Enterprise Deployment and Cost

    Enterprise deployment can be divided into four layers.

    1. Infrastructure layer. Use a container orchestration platform to manage inference services and autoscale based on request queue length or GPU utilization. Loading large model weights may take several minutes, so design warm-up and cold-start plans.
    2. Model service layer. Common inference frameworks include vLLM and TensorRT-LLM. Throughput depends on how KV Cache is managed, so benchmark on your own hardware rather than relying directly on numbers from others. Store model weights in object storage and manage them by version.
    3. Application orchestration layer. Connect retrieval modules and vector databases outside the model. Keep source and page numbers when chunking documents, and attach citations to generated answers for manual verification.
    4. Observability and governance layer. Record latency, error rate, token usage, and cost, and set quotas by project. After every model or prompt change, rerun evaluations with a fixed test set.

    The core cost metric is cost per request: GPU hourly price multiplied by GPU time per request, plus storage, network, and operations labor. At low request volumes, the total cost of calling a managed API may be lower than self-hosting; compare the two options using actual traffic data.

    6. Risk Notes

    Model outputs may contain factual errors, so professional scenarios require human review. Open-weight licenses may restrict usage, and terms must be confirmed before launch. Input data may contain personal information or trade secrets; redact it first, and clarify whether data is used for model training and whether it is saved in logs. Local deployment does not automatically mean security; logs also need redaction. Prompt injection is another common threat. Content returned by web pages, documents, or tools may contain instructions that induce the model to perform other operations. The system should treat such content as data, not as instructions to execute.