Vertical vs. General LLMs: How to Choose and Combine Them
This article explains why choosing between vertical and general-purpose large language models is a division-of-labor problem rather than an either/or decision. It covers output definition and data splitting for vertical models, knowledge distillation from a large teacher model to a small student model, the role of general LLMs in cold start and labeling standards, and when local or edge inference becomes more cost-effective than per-call cloud usage. A four-step implementation roadmap and a practical decision checklist are included.
1. The Bottom Line: This Is a Division of Labor, Not an Either/Or Choice
Many teams get stuck debating “general or vertical” during the selection phase. In practice, the two solve problems of different natures at different stages. The more engineering-realistic approach is to place them at the front and back of the same pipeline:
- General LLMs: know a little about everything; suitable for cold start, open-domain Q&A, semantic understanding, and exploring labeling standards.
- Vertical small models: must not make mistakes within their domain; suitable for production stages with clear task boundaries, enumerable outputs, and high call frequency.
A practical system shape is usually: the general model explores the path and generates supervision signals at the front, while the vertical small model executes reliably at the back. The following sections break this judgment into executable engineering steps.
2. The Ceiling of a Vertical Model Lies in Data Definition, Not Architecture
2.1 The Output Definition Must Converge First
When a vertical model performs poorly, it is usually not because the model is too small, but because “what to predict” has not been defined clearly. A typical scenario is a structured output task, for example producing a 21-dimension decision result at once. Three things must be done first:
- Define the business meaning, value range, and unit of each dimension;
- Define the conventions for missing values, anomalies, and rejection;
- Define the constraints among dimensions (mutual exclusion, inclusion, threshold linkage).
As long as the output definition is vague, fine-tuning any base model later essentially amplifies the ambiguity.
2.2 Data Splitting Must Prevent Leakage
A repeatedly validated practice is: about 1,869 samples in the training set, about 401 in the validation set, and about 402 in the test set. The test set is sealed from start to finish and does not participate in any tuning or prompt iteration. The validation set is used only to “decide survival,” that is, whether to keep this version of the weights. The value of this discipline is that it makes the final metrics trustworthy, rather than optimistic estimates produced by repeated peeking.
2.3 Distillation: Bringing the Student Close to the Teacher
After the definition is aligned, using a large-parameter model as the teacher and a small-parameter model as the student for knowledge distillation is a cost-effective path. Key engineering points include:
- The teacher and student share the same batch of input samples to avoid distribution drift;
- Outputs are aligned item by item, with normalization for continuous values and category mapping for discrete values when necessary;
- The loss function is mainly based on similarity/regression error, supplemented by penalties for hard business constraints.
Illustrative code is shown below (it only expresses the training logic and is not a specific framework interface):
# Pseudocode: distillation objective centered on cosine similarityfor x, y_teacher in dataloader:y_student = student(x)loss = 1 - cosine_similarity(y_student, y_teacher)loss = loss + lambda_constraint * constraint_penalty(y_student)loss.backward()optimizer.step()
When the cosine similarity between the student output and the teacher output reaches about 0.9976, it means the student has learned “a craft” on this data distribution. Note the premise: this result comes from strict data alignment and sealing, not from how new the model choice is.
3. The Value of General Models: Cold Start and Standard Setting
When there is no labeled data and the task definition is still shifting, the greatest value of a general model is to get the process running first:
- Use the general model to generate initial labels and quickly form a usable dataset;
- Reverse-engineer labeling standards and boundary examples during generation;
- Use open reasoning capability to cover long-tail issues and expose gaps in business definitions.
Once samples accumulate to a certain scale and the definition stabilizes, distill a vertical small model to take over. This order is usually the most cost-saving: use calls to buy time early, and use local inference to reduce cost later.
4. The Cost Equation: When the Math Flips
General models are billed by call volume and are almost always cost-effective at low traffic. But the cost structure reverses when the scenario meets any of the following conditions:
- Edge or on-device deployment where data cannot leave the local environment;
- High-frequency, repetitive, low-latency tasks;
- Production environments that require offline availability and strong stability.
Taking local inference on an edge board as an example, a measured reference data point is about 281 tok/s for prefill and about 15.59 tok/s for decode. The speed is not fast, but it does not connect to the network, is not billed per call, and works when the network is down. For device-side scenarios, this “slow but deterministic” trade-off is often reasonable.
For a cloud-based approach, general-purpose capability categories can be combined to handle it, for example object storage for samples, a message queue for peak shaving, a container platform for inference services, and log services with monitoring and alerting for observability. These capabilities have corresponding categories on Baidu AI Cloud and can be combined as needed, without being tied to a proprietary interface.
5. An Executable Decision Checklist
A simple way to decide for teams that are struggling:
- The task is clearly stated, the outputs are countable, and the data can be accumulated → go vertical; the earlier you distill, the more you save;
- The task itself is still changing and the definition changes daily → use a general model to carry it for now, and do not rush to pay for change.
The two mismatches to avoid most:
- Using a general model for high-frequency repetitive fine-grained work, with costs spiraling out of control;
- Using a vertical model that has not been fed enough data to answer open-ended questions, with results falling apart.
6. Implementation Roadmap (Four Steps)
- Definition alignment: write out each quantity the business needs to decide, forming a data dictionary;
- Cold start: the general model generates initial labels, and the validation and test sets are sealed immediately;
- Distillation and evaluation: train the student model, and accept it on dual tracks of cosine similarity and hard business metrics;
- Deployment and observability: decide cloud or device-side based on call volume and data boundaries, with logs and monitoring in place.
Following this roadmap, vertical and general models are no longer a route dispute, but two workstations on the same pipeline.
