The Foundation of Open-Source LLMs: A Technical Breakdown of First-Generation General Language Models

    This article examines first-generation open-source general language models and why they still matter for engineering decisions. It covers their role in validating architecture, data pipelines, and cost, the shift from reproduction to improvement, the 7B and 67B base and chat variants, the trade-offs between MHA and GQA, the three-stage data pipeline built on roughly 2 trillion bilingual tokens, two-step post-training with SFT and DPO, bilingual evaluation practices, and practical guidance for enterprise deployment and cost optimization.

    1. Introduction: Why First-Generation Models Are Worth Revisiting

    In an era of rapidly iterating open-source LLMs, first-generation models are often treated as transitional products. From an engineering perspective, however, they play the role of laying the foundation: validating whether a technical route is viable, whether the data pipeline is reusable, and whether training and inference costs are controllable. Most capability leaps in later versions are built on the architecture and data engineering experience validated by the first generation.

    First-generation open-source general language models typically share a few traits: a mainstream dense decoder architecture; a primarily Chinese-English bilingual corpus; two forms, a Base and a Chat variant; and open weights that mark the starting point for the open-source ecosystem and open platforms. Using this generation as a sample, this article breaks down its technical composition and engineering trade-offs.

    2. Development Background: A Gradual Path from Reproduction to Surpassing

    First-generation development commonly started by reproducing a mature industry technical route rather than betting directly on an unproven new structure. The rationale rests on three points:

    • Controllable risk: Mature architectures come with extensive public engineering experience. Hyperparameter ranges, memory usage, and parallelism strategies all have references, which significantly lowers the probability of failure in a first large-scale training run.
    • A single variable: When the architecture stays fixed, differences in model quality can be attributed more clearly to data and training strategy, making it easier to form an iterable improvement loop.
    • Measurable cost: Dense structures scale more linearly in compute estimation, making it easier to plan training rounds and the number of experiments within a limited budget.

    As a result, “building a higher-quality training set” became the main lever for first-generation models to pull ahead. In terms of team composition, early language model series were usually driven by a small core group, while a project lead role for the multimodal direction was incubated in parallel, forming an organizational structure that explored language and vision-language tracks simultaneously.

    3. Model Specifications and Form Division

    This generation generally offered two parameter sizes (roughly 7B and 67B), each with a Base and a Chat form:

    Form Training Objective Typical Use
    Base Predict the next token; learn language and world knowledge Fine-tuning, domain adaptation, teacher for distillation
    Chat Follow instructions, hold multi-turn dialogue, refuse and align for safety Direct end-user interaction

    The engineering value of this “1x2” matrix is that the Base form is the capability foundation and the Chat form is a usability wrapper. For enterprise adoption, if high-quality business data already exists, domain fine-tuning on the Base form is usually more stable than continued training on the Chat form; if the goal is a fast launch, the Chat form is simpler.

    4. Architecture Choices: Cost Trade-offs Between Dense Structure, MHA, and GQA

    First-generation models kept the mainstream dense decoder structure but made a differentiated design choice for attention:

    • The smaller model used multi-head attention (MHA), which is simple to implement, stable to train, and keeps memory and bandwidth pressure within an acceptable range.
    • The larger model replaced MHA with grouped-query attention (GQA), letting multiple query heads share one set of key-value heads. This compresses KV Cache size and reduces memory bandwidth overhead during long-context and concurrent inference.

    A schematic snippet helps illustrate the difference between GQA and MHA (structure only, not a specific implementation):

    1. # Schematic: in MHA each query head has its own KV; in GQA multiple query heads share one KV group
    2. num_q_heads = 32
    3. num_kv_heads_mha = num_q_heads # MHA
    4. num_kv_heads_gqa = 8 # GQA: 4 query heads share 1 KV group
    5. # KV Cache size is proportional to num_kv_heads
    6. kv_cache_ratio = num_kv_heads_gqa / num_kv_heads_mha # about 1/4

    It is worth stressing that GQA is not a “free lunch”: sharing KV slightly weakens representational capacity, so it only pays off when the model is large enough and inference cost takes a larger share. This is exactly why the first generation adopted different attention schemes by size tier — architecture choice should be driven by the structure of inference cost, not by chasing novelty.

    5. Data Engineering: A Three-Stage Pipeline and the Decisive Role of Deduplication

    First-generation models used roughly 2 trillion tokens of Chinese-English bilingual pre-training data, built in three stages:

    1. Deduplication: Exact and approximate matching at the document and paragraph levels (for example, fingerprint comparison based on MinHash/SimHash) to remove templates, reposts, and duplicate crawls. Public information indicates this stage filtered out about 89.8% of duplicate documents, a ratio that shows how redundant the raw crawled corpus was.
    2. Filtering: Rule-based cleaning (length, symbol ratio, garbled-text rate) combined with classifier scoring (quality, educational value, safety) to remove low-quality and harmful content.
    3. Shuffling: Globally dispersing data sources and language distribution so that the same site or topic is not over-concentrated early in training, mitigating catastrophic forgetting and data-order bias.

    The most transferable engineering lesson is that deduplication does more than save compute; it is a key means of reducing memorization and copyright risk. Repeated template text is reinforced over and over during training, wasting effective token budget and raising the probability of verbatim reproduction.

    Data mixing also needs care: in a Chinese-English bilingual setting, if one language takes too large a share, the other language’s capability gets squeezed. In practice, the ratio is usually set according to the target market, with high-quality subsets such as code, math, and encyclopedic content upsampled.

    6. Post-Training: A Two-Stage Flow of SFT and Preference Alignment

    Pre-training solves “can it speak”; post-training solves “is what it says correct and usable.” Post-training for this generation had two steps:

    • Supervised fine-tuning (SFT): Instruction-response pairs written or curated by humans teach the model to follow instructions, maintain multi-turn context, and output in the required format. Coverage matters more than volume, and the data needs to span question answering, rewriting, summarization, code, reasoning, and refusal.
    • Direct Preference Optimization (DPO): Compared with reinforcement learning schemes that require training an extra reward model, DPO optimizes the policy directly with “better response / worse response” preference pairs, giving a shorter engineering path and more stable training. Its core is to raise the relative probability of preferred responses while keeping the model close to the reference policy.

    A simplified illustration of preference data organization:

    1. {
    2. "prompt": "Rewrite the sentence below in a more formal tone: This plan has some problems.",
    3. "chosen": "This plan raises several issues that need clarification, and further review is recommended.",
    4. "rejected": "This plan is not great."
    5. }

    Practical point: preference pairs must be generated from the same prompt, with differences concentrated on a single dimension such as helpfulness, correctness, or tone. Otherwise the model learns shortcut features unrelated to the intent.

    7. Evaluation: Bilingual Tracks and Reproducible Engineering Practices

    Against mature open-source baselines of the same size, first-generation models showed advantages on both Chinese and English public benchmarks, mainly attributable to corpus quality and bilingual ratio rather than architectural novelty. When building an evaluation system, the following is recommended:

    • Two parallel tracks: the Chinese side focuses on knowledge, idioms, and local context; the English side focuses on commonsense reasoning and code.
    • Contamination checks: run n-gram overlap detection between evaluation sets and training data, and remove suspected leaked samples.
    • Look at the lower bound, not the upper bound: report mean and variance over multiple samples to avoid being misled by a single run when choosing a model.
    • Stay close to the business: add internal scenario sets (such as ticket classification and document extraction); public leaderboards are only for coarse screening.

    8. Engineering Recommendations: From Model Selection to Cost Optimization

    For enterprises adopting these open weights, the following path is advisable:

    1. Define the form: with unlabeled data, fine-tune the Base form; for a fast launch, use the Chat form with prompt engineering.
    2. Plan compute: on the training side, watch memory and parallelism strategy; on the inference side, evaluate KV Cache and concurrent throughput first, and prefer models with GQA-style designs for long-context scenarios.
    3. Set up supporting infrastructure: use object storage for corpora and weights, a container platform for elastic training and inference orchestration, and logging plus monitoring and alerting to track throughput, latency, and abnormal outputs.
    4. Security and compliance: filter both input and output, mask sensitive information, and keep auditable traces of generated content.
    5. Iterate continuously: build a loop of “evaluation set - bad cases - data reflow - retraining” so model capability grows with the business.

    In a cloud environment, general-purpose container scheduling, distributed storage, and observability capabilities can carry training and inference workloads, letting teams focus on data and evaluation — the two areas that truly determine results.

    9. Conclusion

    The historical significance of first-generation open-source general language models lies not in leading on any single metric, but in validating a replicable path: “mature architecture + high-quality data + two-stage post-training.” For developers, the truly transferable lessons are: architecture serves cost, data sets the ceiling, alignment determines usability, and evaluation determines direction. Understanding these four points makes it possible to make more rational technical choices amid the fast iteration of later versions.