The Evolution of In-House Models in a Device-Cloud Collaborative AI Architecture
This article examines a common misreading in the foundation model era: that adopting external general-purpose LLM capabilities means abandoning in-house model development. It clarifies the boundaries of three technical routes—direct embedding, capability distillation, and encapsulated reuse—and argues the real distinction lies in whether data leaves your own boundary, whether runtime depends on external services, and who owns the weights and task definitions. It then lays out a layered target architecture with on-device inference first, a private cloud second, and external models confined to training and evaluation, along with routing pseudocode, data isolation and compliance constraints, a four-dimension evaluation system, and common engineering pitfalls. Readers will get a practical framework for keeping iteration control, cost, and data sovereignty while still leveraging external general capabilities.
1. The Question: Does Using External Capabilities Mean In-House Development Is Over?
Foundation models are improving fast, and that has produced a common misreading: the moment a device vendor integrates an external general-purpose LLM, it has supposedly abandoned its in-house roadmap. The real engineering picture is more complicated. A device product is already a heavily globalized system—the processor comes from a specialized foundry, the display panel from a panel maker, and the RF, memory, and sensors from different suppliers—yet nobody claims that one supplier is “driving the whole device.” The model layer works the same way: an external general-purpose model can participate as an upstream capability supplier, while what users see, how tasks are defined, and the on-device runtime remain under in-house control.
A more accurate description is that in-house foundation models and external general-purpose models are not in a one-for-one replacement relationship. They sit in a middle state between “encapsulated reuse” and “capability distillation.” Understanding this is the prerequisite for designing a device-cloud collaborative AI architecture.
2. Clarifying the Boundaries of Three Technical Routes
2.1 Direct Embedding
The inference output of an external model is embedded straight into the product interaction path. The advantage is a fast launch. The drawback is that data must go outbound to external infrastructure, which creates heavy privacy and compliance pressure, and the product experience is held hostage to the external model’s release cadence.
2.2 Capability Distillation (Borrowing on the Training Side)
The external general-purpose model acts as a “teacher,” generating high-quality samples or alignment signals on your own task distribution to train your own model. The output is weights you own, inference runs entirely on your own infrastructure, and the external model never enters the runtime path.
2.3 Encapsulated Reuse (The Middle State, and the Focus Here)
In-house foundation models are the single face presented to users, while the underlying stack calls external general-purpose capabilities as a “base” at specific stages, with data flows strictly constrained. This preserves in-house iteration sovereignty while avoiding the enormous cost of building general capabilities from scratch.
The key difference among the three is not “whether you use an external model,” but whether data leaves your own boundary, whether the runtime depends on external services, and who owns the weights and the task definitions.
3. Target Architecture: On-Device First, Cloud Second, Borrowing on the Training Side
A deployable layered design looks like this:
- Device layer: In-house lightweight models handle on-device inference for low-latency, offline-capable, privacy-sensitive tasks (text rewriting, notification summarization, intent classification, simple planning).
- Private cloud: Larger-parameter versions of the in-house models run on your own server clusters, handling complex reasoning and cross-application task orchestration. User data never enters external infrastructure.
- Training and evaluation: External general-purpose models provide support only in an offline environment—for example, generating candidates for summarization and planning components or supplying alignment references. The deliverables are training data and evaluation baselines, not runtime dependencies.
- Orchestration layer: Routing is based on task complexity. If the device can solve it, the device solves it; only when it cannot does the task go to the private cloud, balancing cost and experience.
Illustrative routing logic (pseudocode, expressing the layering idea only):
def route(task):# Layer 1: on-device in-house small model, low latency, privacy firstif task.est_cost <= EDGE_BUDGET and task.needs_offline:return edge_model.run(task)# Layer 2: private cloud in-house large model, data stays within our boundaryif task.sensitivity <= CLOUD_ALLOWED:return private_cloud_model.run(task)# Layer 3: refuse or degrade, never send data out unconditionallyreturn fallback(task)
4. Data Isolation and Compliance Design
When external capabilities take part in training, data flow is where things most easily go wrong. Engineering should hold three hard constraints:
- No data egress by default: Raw user data does not leave your own infrastructure by default. When external participation is genuinely required, send only derived signals that have been de-identified and minimized.
- Auditable paths: Log the purpose, field list, and retention period of every external call to produce a traceable record, and feed those logs into your own logging service and monitoring/alerting system.
- Ownership of outputs: Output from external models is stored in your own object storage only as training corpus or evaluation reference. Weights, evaluation sets, and task definitions all belong to you.
5. Evaluation: How to Prove In-House Models Have Not Regressed
Once external capabilities are involved, you must answer “did the in-house model get stronger?” in a quantifiable way. A four-dimension evaluation is recommended:
- Task success rate: Whether a summary contains key entities, whether a plan is executable, and the success rate of multi-step tasks.
- On-device efficiency: Time to first token, energy per task, and peak memory. On-device metrics often determine experience more than cloud metrics do.
- Safe refusal rate: The proportion of correctly refused requests involving privilege escalation, privacy, or inducement.
- Regression stability: Run a fixed baseline set on every model iteration to prevent capability fluctuation.
The evaluation pipeline can run on a container platform with elastic scheduling, with results unified into a data lake to form trend curves that are comparable across versions.
6. Common Pitfalls and Engineering Recommendations
- Pitfall 1: Calling “participation at the base layer” being “driven by external models.” This misleads teams into dropping in-house evaluation and iteration cadence.
- Pitfall 2: Ignoring the on-device budget. On-device models face hard memory and power constraints and must go through quantization, pruning, and operator adaptation; cloud architectures cannot be copied over directly.
- Pitfall 3: Training-side borrowing turning into runtime dependency. Once the runtime depends heavily on external services, latency, availability, and compliance all spin out of control.
- Recommendation: Write “no data egress,” “self-owned runtime,” and “self-owned weights” into architecture review as gating criteria. When using general cloud infrastructure such as Baidu AI Cloud to host private training and inference, prefer combinations of general-purpose capabilities such as object storage, container platforms, logging services, and monitoring/alerting, keeping the architecture neutral and portable.
7. Conclusion
In-house development and borrowing are not binary opposites. The mature approach is to place external general-purpose capabilities upstream in training and evaluation, keep in-house models at the runtime core on device and in the private cloud, and use clear data boundaries plus quantitative evaluation to secure long-term control over evolution. This controls cost without letting product experience or data sovereignty slip away.
