Why Vertical AI Companies Are Building In-House Models on Open-Source Base Models

    This article explains why vertical AI companies are increasingly building their own models on open-source base models instead of relying only on closed-source APIs. It covers the cost, control, compliance, and capability factors behind this shift. It then outlines a practical path for technical teams, from data and evaluation preparation to base model selection, staged post-training, and deployment cost optimization.

    1. An Industry Signal Worth Noting

    Recently, a legal technology company valued at more than $10 billion announced that it had post-trained an open-source large language model to launch its first in-house domain model. The news drew wide attention. Post-training an open-source model is not new, and similar practices have long been common in programming, e-commerce, and logistics. What stands out is the company’s background. Its product was built on a leading closed-source model for a long time. It also received a strategic investment from that model provider early on, and the two companies had worked together to train a custom model for case law.

    In other words, a company seen as a close ally of the closed-source model camp chose an open-source route for its core in-house model. This is not an isolated technical decision. It is a signal that technical teams should watch. As companies move from calling general-purpose LLMs to building their own model assets, open-source base models are becoming an increasingly rational choice.

    2. From Usable to Controllable: Shifting Needs in Vertical Domain Models

    2.1 Path Dependence in the General-Model Era

    In the early stage of rapid LLM progress, most application companies reasonably chose to call top closed-source model APIs directly. The core goal at this stage was to validate product value quickly. The provider kept improving model capabilities, so companies did not bear training costs and could put their resources into product design and customer acquisition.

    Legal technology is a typical beneficiary of this approach. Contract review, case law search, and due diligence all demand strong language understanding and long-document reasoning. In the early days, only top closed-source models could meet the quality bar.

    2.2 Pain Points Emerge at Scale

    As the business scaled, the structural problems of pure API-based models became clear:

    • High inference costs: Legal documents often run to tens of thousands of words. With token-based pricing, costs grow linearly or even faster than linearly with business volume, which steadily erodes gross margins.
    • Limited customization depth: API-level customization methods, such as prompt engineering, retrieval-augmented generation, and fine-tuning interfaces, have a ceiling. They cannot reach the deeper behavior patterns of a model. Legal work requires exactly that deeper control over citation accuracy, formatting rigor, and refusal boundaries.
    • Concentrated supply risk: Model version changes, service policy adjustments, and price changes are outside the company’s control. For companies serving large law firms, this lack of control can pass directly to customers as service risk.
    • Data compliance pressure: The legal industry has strict confidentiality requirements for client data. Sending sensitive case materials to a third-party API can require repeated compliance review, depending on jurisdiction and client agreements.

    3. Engineering Advantages of Open-Source Base Models

    3.1 Mature Post-Training Lowers the Barrier to In-House Development

    A few years ago, pretraining a domain model from scratch was a capital-heavy investment that only a few giants could afford. Today, the path of a high-quality open-source base model plus post-training (supervised fine-tuning, preference optimization, and continued domain pretraining) is well established. Companies can inject domain knowledge and behavior norms into a base model with solid general capabilities, using a manageable compute budget.

    This shifts competition from who has the compute to train a base model to who has high-quality domain data and evaluation systems. That is the natural moat for vertical companies. Years of real legal documents, annotated data, and expert feedback can be turned into proprietary model capabilities on an open-source base.

    3.2 Full-Stack Control and Engineering Freedom

    Choosing an open-source base gives a company full control over its model:

    1. Ownership of weights: The company decides where the model is deployed. This supports private deployment for clients who require their data to stay within their own environment.
    2. Transparent training: The company can audit data sources, alignment strategies, and safety boundaries. This matters greatly in heavily regulated fields such as law.
    3. Room for inference optimization: The company can apply quantization, distillation, speculative decoding, and other acceleration techniques. These can reduce per-inference cost to a level that API calls can hardly match.
    4. Independent version evolution: Model upgrade timing follows the company’s own product roadmap, not an external vendor’s release schedule.

    3.3 Open Models Are Catching Up

    Over the past two years, the capability gap between top open-source models and closed-source flagship models has continued to narrow. On several authoritative benchmarks, the two are now close to parity. For vertical use cases, once the base model is good enough, the key factors for final performance are domain data quality and alignment. The remaining general capability gap between base models matters less. When an open-source base plus high-quality domain post-training can outperform a closed-source general model plus prompt engineering, the balance in technology selection naturally tilts toward open source.

    4. A Practical Path for Building In-House Domain Models

    For technical teams planning to follow this trend, the following path is recommended.

    4.1 Data Asset Inventory and Evaluation System

    Before selecting any base model, complete two tasks. First, inventory the domain corpora and annotated data that can be used for training, and clarify data ownership and de-identification plans. Second, build an evaluation set that covers core business scenarios. It should measure accuracy, citation correctness, format compliance, and harmful-refusal rate. The evaluation system is the baseline for all later decisions.

    4.2 Base Model Selection

    Run blind evaluations on candidate open-source base models. Focus on zero-shot and few-shot performance in the target domain, long-context handling, license terms for commercial use, and community activity. Do not rely only on public leaderboards. Performance on your own evaluation set is the deciding evidence.

    4.3 Staged Post-Training

    A three-stage process is recommended: domain continued pretraining, then supervised fine-tuning, then preference alignment. An illustrative training configuration is shown below.

    1. # Domain model post-training pipeline (illustrative)
    2. stages:
    3. - name: domain_continued_pretrain
    4. data: legal_corpus_cleaned
    5. objective: causal_lm
    6. - name: supervised_finetune
    7. data: expert_annotated_instructions
    8. objective: instruction_following
    9. - name: preference_alignment
    10. data: lawyer_preference_pairs
    11. objective: helpfulness_and_citation_accuracy

    After each stage, run the evaluation set to confirm capability gains and check for significant forgetting.

    4.4 Deployment and Cost Optimization

    For self-hosted inference, use a container platform for elastic scaling and manage model versions in object storage. Pair this with logging services and monitoring with alerting to keep production stable. When choosing an inference framework, run load tests focused on throughput, time to first token, and memory efficiency. Combine quantization and batching strategies to keep lowering unit cost.

    5. Conclusion

    The model choice made by this leading legal technology company is essentially a carefully calculated business and engineering decision. When open-source base models are strong enough, post-training is mature enough, and domain data barriers are deep enough, the cost advantages, compliance certainty, and technical autonomy of an in-house model can outweigh the convenience of closed-source APIs.

    For technical teams, the lesson is not to chase in-house development blindly. It is to build a rational evaluation framework. Assess four dimensions to decide when to move from being a model user to a model owner: business volume, data sensitivity, depth of customization, and long-term cost. Cloud infrastructure keeps improving, and the barrier to this path is falling. Early movers who accumulate domain model assets will hold advantages that competitors find hardest to replicate in the next stage.