The Starting Point of Open-Source LLMs: A Technical Breakdown of the First-Generation General Language Model

    This article examines the first-generation general language model released by an open-source series in January 2024, available in 7B and 67B parameter sizes with both Base and Chat variants. It explains why the initial generation deserves a second look, covering the choice of a dense Transformer decoder, the use of MHA in the 7B model and GQA in the 67B model to reduce KV Cache pressure, a three-stage data pipeline over roughly 2 trillion bilingual tokens, post-training with SFT and DPO, bilingual evaluation methodology, and practical guidance for open-source deployment and cloud-based serving.

    1. Introduction: Why the First Generation Deserves a Second Look

    In an era of rapidly iterating open-source large models, first-generation models are often treated as transitional artifacts. From an engineering perspective, however, the first generation does the foundation work: it establishes the consistent architecture, data pipeline conventions, and training paradigm that later versions inherit. Understanding the design trade-offs of a first-generation model is more valuable than memorizing a version number.

    The first general language model from one open-source series was officially released in January 2024, in two parameter sizes, 7B and 67B, and in two forms, Base and Chat, both published as open source. Its accompanying technical paper was made public in early January of the same year. The core approach of this generation can be summarized in two points: first, reproduce and fully master the mature dense decoder architecture used across the industry; second, place its differentiating competitiveness on the quality of the training corpus.

    2. Architecture Choices: Dense Decoder and Two Attention Mechanisms

    The first-generation model retained the widely validated dense Transformer decoder structure. Choosing dense over a sparse mixture-of-experts route was driven mainly by three considerations:

    • High engineering certainty: the dense structure uses simple operators, has predictable inference memory usage, and is easy to quantize, distill, and apply operator fusion to.
    • Controllable reproduction cost: the goal of the first generation was to get the full pipeline working, and a mature structure significantly lowers debugging risk.
    • Good ecosystem compatibility: dense weights are more easily supported directly by mainstream inference frameworks and fine-tuning toolchains.

    The two sizes took different approaches to attention. The 7B version uses standard multi-head attention (MHA); the 67B version replaces MHA with grouped-query attention (GQA), with the core purpose of reducing the memory footprint and bandwidth pressure of the KV Cache during inference.

    The principle of GQA can be understood as follows: in MHA, every query head is bound to its own key-value head; multi-query attention (MQA) lets all query heads share a single set of key-values; GQA sits in between, splitting query heads into several groups that share key-value heads within each group. A sketch is shown below:

    1. # Conceptual sketch: grouping key-value heads in GQA
    2. num_q_heads = 64 # number of query heads
    3. num_kv_heads = 8 # number of key-value heads (number of groups)
    4. group_size = num_q_heads // num_kv_heads # query heads sharing one group
    5. def kv_head_of(q_head_idx: int) -> int:
    6. return q_head_idx // group_size

    For long-context, high-concurrency online serving, the KV Cache is often the memory bottleneck. GQA trades a very small cost in model quality for larger batch sizes and lower per-request cost, which is an almost inevitable step as large models move toward being served as a service.

    3. Data Engineering: Three Stages over Two Trillion Bilingual Tokens

    The first-generation model used roughly 2 trillion tokens of bilingual Chinese-English pre-training data. The construction pipeline had three stages: deduplication, filtering, and shuffling, with the deduplication stage removing about 89.8% of duplicate documents. That ratio shows how common duplicated content is in raw crawled corpora: deduplication is not a nice-to-have but a key process that determines training efficiency and the model’s ability to generalize rather than memorize.

    The engineering meaning of the three stages is as follows:

    1. Deduplication: includes paragraph-level deduplication within documents and approximate deduplication across documents (for example, fingerprint comparison based on MinHash/SimHash). Duplicate data causes the model to overfit high-frequency templates, wastes compute, and inflates scores when the evaluation set is contaminated.
    2. Filtering: combines rule-based filtering (length, symbol ratio, garbled text) with model-based scoring (a quality classifier), along with cleaning of sensitive and harmful content.
    3. Shuffling: global shuffling to prevent same-source data from appearing concentrated in the early stages of training, keeping the gradient distribution stable across stages.

    The bilingual ratio is another key point. Mixed Chinese-English training requires consistency across vocabulary coverage, corpus proportions, and evaluation set design; otherwise the model tends to become lopsided, strong in English and weak in Chinese.

    4. Post-Training: The Alignment Path of SFT and DPO

    Pre-training produces a model that can continue text; post-training is what makes it able to answer. The first-generation model combined supervised fine-tuning (SFT) with direct preference optimization (DPO) in post-training:

    • SFT stage: trained on high-quality instruction-response pairs to establish dialogue format, instruction following, and basic safety boundaries.
    • DPO stage: uses preference pairs of “preferred response vs. dispreferred response” to optimize the policy directly, without training a separate reward model, making the process lighter and more stable.

    A minimal example of how preference data is organized:

    1. {
    2. "prompt": "Explain what KV Cache is in three sentences",
    3. "chosen": "KV Cache caches the key and value tensors of historical tokens... (accurate, clearly structured)",
    4. "rejected": "KV Cache is just caching... (vague, factually incorrect)"
    5. }

    Practical advice: SFT data should be “small but high-quality,” covering task types and safety scenarios; preference data should focus on factual accuracy, instruction following, and refusal boundaries, rather than optimizing only writing style.

    5. Evaluation: Bilingual Tracks and Same-Scale Comparisons

    One clear conclusion about the first-generation model is that in comparisons with similar parameter counts, the 67B version had an advantage over same-scale 70B models on public Chinese and English evaluations. The methodological significance behind this matters more than the scores themselves: it validated the judgment that data quality can partially substitute for parameter scale.

    Four points are worth attention when building a credible evaluation system:

    • Bilingual coverage: rank Chinese and English separately so a single language does not mask weaknesses.
    • Capability tiers: report knowledge Q&A, reasoning, code, math, long context, and safety separately.
    • Contamination protection: deduplicate the training corpus against evaluation sets and run n-gram overlap detection.
    • Reproducibility: fix decoding parameters (such as temperature and top_p) and prompt templates, and record the full configuration.

    6. Open-Source Strategy and Cloud Deployment Practice

    The first-generation model was released as open source, becoming the starting point of the series’ open-source ecosystem and open platform strategy. The direct benefit of open source is that enterprises can fine-tune and run inference in their own environments, keeping data within their domain and lowering compliance costs.

    For cloud deployment, general-purpose capability categories can be combined: object storage for weights and datasets, a container platform to host inference services and elastic scaling, logging and monitoring with alerting to track latency, throughput, and error rates, and message queues to decouple asynchronous tasks. For quick validation, intelligent coding tools can also help generate scaffold code for the inference service, shortening the time from zero to one.

    A pseudocode skeleton for an inference service:

    1. # Conceptual sketch: batched inference with KV Cache reuse
    2. for batch in dataloader(tokenized_prompts, batch_size=32):
    3. outputs = model.generate(
    4. batch,
    5. max_new_tokens=512,
    6. temperature=0.7,
    7. top_p=0.9,
    8. use_cache=True, # enable KV Cache
    9. )
    10. log_service.write(batch, outputs) # write logs for traceability and evaluation

    7. Conclusion

    The value of the first-generation general language model lies not in its parameters or leaderboard position but in the reusable architecture baseline, data governance conventions, and alignment process it established. For developers, mastering this “data-architecture-alignment-evaluation” loop brings longer-term returns than chasing version numbers; for enterprises, fine-tuning open weights for a domain and then serving them with general-purpose cloud infrastructure is currently a cost-effective path to deployment.