Ultra-Large Open-Source Model Evaluation, Cost, and Deployment Guide
This guide covers how to verify leaderboard claims with your own business test set, evaluate front-end code that models generate, calculate API token costs, and deploy, autoscale, and monitor large model inference on Kubernetes. It ends with a pre-launch checklist.
1. Capability Verification and Model Selection
Benchmark scores only mean something when you know the evaluation conditions. When you see a claim like “ranks near the top,” first confirm four things: who ran the evaluation, the leaderboard version and release date, which models were compared, and how the scores were calculated.
Beyond public leaderboards, test with your own business data. Collect 100 to 300 real tasks and group them into four categories: common requests, edge cases (vague requirements or missing information), long inputs (close to the context limit), and format constraints (required JSON output or a fixed template). Each category should be representative. Do not select only the tasks that are easy to pass.
Fix the inference parameters during testing, including temperature, top_p, and maximum output length. Run each task at least three times, and record the mean pass rate and its variation. Also record P50 and P90 latency. Archive each failed case with a label for its cause so you can compare results during later retests.
For selection, use the checklist below. The thresholds in the table are examples only. Set them according to your business requirements.
| Check item | What to confirm | Example pass threshold | Retest cycle |
|---|---|---|---|
| Model version | Exact version number and release date | Matches the procurement document | Every upgrade |
| License | Commercial terms and usage restrictions | Legal team confirms commercial use is allowed | Quarterly |
| Context length | Stated limit and actual performance on long-input samples | Pass rate on long-input samples is at least 85% | Every upgrade |
| Quantization | Precision and quantization format | Pass rate drops by no more than 3 percentage points compared with the unquantized version | Every deployment |
| Evaluation set contamination | Whether the training data may include evaluation questions | Gap between private sample scores and public leaderboard scores is within an acceptable range | Every six months |
| Business sample pass rate | Mean and variation across three runs | Mean meets business requirements, and variation is below 5 percentage points | Monthly |
| Cost | Token cost per task | Below the budget ceiling | Monthly |
| Latency | P50 and P90 | P90 is below product requirements | Weekly |
2. Front-End Code Generation Evaluation
Evaluating front-end code generation means checking whether the model writes a page that runs and meets the requirements. Confirming that the code runs does not show that its quality is good. Review each item below:
- Rendering: The page opens normally, and the console shows no uncaught errors.
- Interaction: Clicks, form submissions, state changes, and other behavior match the requirements. Verify each requirement one by one.
- Accessibility: The page uses semantic HTML, supports keyboard operation, and meets text-to-background contrast standards.
- Responsive layout: Check for layout breakage in at least desktop and mobile viewports.
- Dependency installation: A lock file exists, and
npm cisucceeds in a clean environment. - Build: The build command returns exit code 0.
- Verification method: Keep screenshots of key pages and compare them with baseline images, or cover the core logic with unit tests.
You can score the output by dimension. Example:
| Dimension | Scoring criteria | Maximum score |
|---|---|---|
| Runnable | Rendering, interaction, and build all pass | 40 |
| Visual consistency | Deviation from the design spec or screenshot baseline | 20 |
| Maintainability | Clear component structure, with no hardcoded repeated styles | 20 |
| Security boundary | No hardcoded secrets, and no unsafe HTML injection | 20 |
Common mistakes include: running the code without verifying interactions, ignoring dependency versions, skipping responsive and accessibility checks, not recording the prompt and model version used for generation, and not checking whether the generated code contains secrets.
3. API Pricing and Token Costs
Calculate the cost of a single request with this formula:
Cost per request = (input tokens × input price + output tokens × output price + cached tokens × cache price) ÷ pricing unit × exchange rate × (1 + tax rate)
Keep these points in mind:
- Cache hits and misses are billed separately. Cache prices are usually lower than standard input prices, but the exact ratio depends on the vendor’s documentation.
- Output token prices are usually higher than input prices, so long-output tasks have a greater impact on cost.
- Batch APIs often offer discounts but have higher latency, so they suit offline tasks.
- Include tokens from failed retries, tool calls, and system prompts.
- Set the exchange rate and tax rate based on the purchasing entity’s location and payment method.
Here is a demonstration example. Assume an input price of 2 CNY per million tokens and an output price of 8 CNY per million tokens. A single request uses 2,000 input tokens and produces 500 output tokens:
Cost per request = 2000 × 2 ÷ 1000000 + 500 × 8 ÷ 1000000 = 0.004 + 0.004 = 0.008 CNY
At 100,000 requests per day, the daily cost is 800 CNY. With a 10% retry rate, the daily cost rises to about 880 CNY. Over 30 days, that totals about 26,400 CNY. These figures only illustrate the calculation method. Do not use them as a basis for purchasing decisions. Use the vendor’s quote and your actual bills for real costs.
4. Kubernetes Deployment, Autoscaling, and Monitoring
Before deployment, confirm the following: the cluster version supports the API requirements of the GPU device plugin and HPA; the inference service runs in a dedicated namespace with a least-privilege ServiceAccount; images come from a trusted registry and are pinned by digest; and the location and license of the model weights have been verified.
The Deployment configuration below shows the key settings. GPU requests and limits must be equal, and the probe paths must match the health check endpoints of your inference framework.
apiVersion: apps/v1kind: Deploymentmetadata:name: llm-infernamespace: llm-servingspec:replicas: 2selector:matchLabels:app: llm-inferstrategy:type: RollingUpdaterollingUpdate:maxSurge: 1maxUnavailable: 0template:metadata:labels:app: llm-inferspec:serviceAccountName: llm-infer-sanodeSelector:accelerator: gpusecurityContext:runAsNonRoot: truecontainers:- name: serverimage: registry.example.com/llm/infer@sha256:REPLACE_DIGESTports:- containerPort: 8000resources:requests:cpu: "4"memory: 32Ginvidia.com/gpu: 1limits:cpu: "8"memory: 32Ginvidia.com/gpu: 1readinessProbe:httpGet:path: /health/readyport: 8000initialDelaySeconds: 60periodSeconds: 10livenessProbe:httpGet:path: /health/liveport: 8000initialDelaySeconds: 180periodSeconds: 20env:- name: API_KEYvalueFrom:secretKeyRef:name: llm-infer-secretkey: api-key
Use a Service to expose the inference API within the cluster:
apiVersion: v1kind: Servicemetadata:name: llm-infernamespace: llm-servingspec:selector:app: llm-inferports:- port: 80targetPort: 8000
GPU utilization is not a default HPA metric, so scaling based on queue length is recommended. First, expose inference_queue_length as a custom metric through Prometheus Adapter.
```yaml
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: llm-infer-hpa
namespace: llm-serving
spec:
scaleTargetRef:
