Analyzing the Technical Architecture of First-Generation Open-Source Bilingual Large Language Models

    This article explores the technical roadmap of a first-generation open-source bilingual large language model series released in early 2024. By treating it as a reusable engineering solution, the analysis covers model specifications, architecture choices, pre-training data engineering, post-training alignment, and open-source practices, providing valuable insights for building general-purpose language models.

    In the evolution of open-source large language models (LLMs), first-generation bilingual general models often serve a dual role: acting as a “capability foundation” and validating engineering processes. In January 2024, a first-generation open-source bilingual LLM series was officially released, featuring 7B and 67B parameter versions, and offering both base and chat models. The technical report was published on January 5, 2024. Released under an open-source license, this series marked the starting point for subsequent open-source ecosystems and open platform strategies. Rather than viewing it from a single product perspective, this article dissects it as a reusable technical solution, covering model specifications, architecture choices, pre-training data engineering, post-training alignment, and open-source engineering practices.

    1. Positioning and Release Form: A Dual-Scale, Dual-Form Open-Source Starting Point

    The core positioning of this first-generation model is a general language model capability foundation. The 7B and 67B parameter scales are not simply “large and small” options but a tiered design tailored for different compute budgets and deployment scenarios. The smaller version facilitates verification, fine-tuning, and inference in single-machine or resource-constrained environments, while the larger version explores stronger general capabilities and performance ceilings. Simultaneously, releasing both base and chat models means the same technical foundation serves both secondary developers—for continued pre-training, domain fine-tuning, and task adaptation—and direct interaction scenarios requiring instruction following and conversational capabilities.

    Open-source distribution makes the training pipeline, data construction methodology, and post-training processes reproducible and open to discussion. For developers, the value lies not just in usable weights, but in breaking down “how to build a general language model from scratch” into observable engineering stages: how to tier parameter scales, how to choose attention mechanisms, how to clean pre-training corpora, and how to align during post-training. The simultaneous publication of the technical report enhances the verifiability of the technical roadmap discussions. Overall, the focus at this stage was not on chasing benchmark scores but on establishing a complete closed-loop system from data and pre-training to post-training and open-source distribution.

    2. Dense Decoder Architecture and Attention Mechanism Trade-offs

    This first-generation model adopted the mainstream dense decoder architecture. In a dense architecture, every token activates all parameters during forward computation. The structure is relatively straightforward, with clear training and inference paths, facilitating engineering implementation and ecosystem adaptation. For a first-generation general model, choosing a mature route reduces architectural uncertainty, allowing more effort to be invested in data quality and training recipes.

    Regarding attention mechanisms, the 7B version uses Multi-Head Attention (MHA), while the 67B version uses Grouped-Query Attention (GQA) instead of MHA to reduce inference costs. In MHA, each query head typically corresponds to an independent key-value head, providing strong expressive power but requiring more key-value data to cache and read during inference. GQA groups query heads, allowing a group to share fewer key-value heads, thereby reducing KV Cache usage and memory bandwidth pressure. For larger parameter models, inference costs stem not only from matrix multiplication but also from the memory access overhead of repeatedly reading the key-value cache during autoregressive decoding. Thus, introducing GQA has a clear engineering motivation.

    It should be emphasized that choosing an attention mechanism is a trade-off between training capability, inference cost, and implementation complexity. GQA does not necessarily outperform MHA across all tasks; its effectiveness depends on grouping methods, training adequacy, and task distribution. However, in LLM inference services, reducing KV Cache and bandwidth pressure usually yields more controllable deployment costs. The pseudocode below only expresses the mapping between scale and attention type and does not represent specific interfaces or parameters:

    1. function select_attention(model_scale):
    2. if model_scale == "7B":
    3. return "MHA" # Each query head corresponds to an independent key-value head
    4. else if model_scale == "67B":
    5. return "GQA" # Grouped query heads share key-value heads
    6. else:
    7. return "unsupported"

    From an engineering perspective, the combination of “MHA for smaller scale, GQA for larger scale” indicates that architectural design began shifting from “trainable” to “serviceable.” The implication for future models is that architectural selection should not only consider training loss but also incorporate inference latency, memory footprint, concurrent throughput, and deployment costs into the same trade-off table.

    3. 2 Trillion Token Pre-training Data Engineering: Deduplication, Filtering, and Shuffling

    The pre-training phase utilized 2 trillion tokens of Chinese-English bilingual data. This scale implies that data engineering is not an auxiliary step but a critical variable determining the model’s ceiling. Raw corpora typically suffer from duplicate documents, templated content, low-quality text, noisy characters, and imbalanced language ratios. The data construction for this model adopted a three-stage process: deduplication, filtering, and shuffling. The deduplication stage eliminated 89.8% of duplicate documents, indicating a high proportion of redundant data in the raw corpus. If left untreated, this would significantly waste training compute and amplify memorization and bias risks.

    Deduplication can be divided into exact and near deduplication. Exact deduplication identifies completely identical content via document fingerprints or hashing; near deduplication identifies highly similar but not verbatim documents, such as reposts, concatenations, or template rewrites. Eliminating 89.8% of duplicates means the data pipeline underwent massive “slimming” before training, directing the limited token budget more toward information gain. The filtering stage applies rule-based or model-assisted screening across dimensions like quality, language, length, template ratio, anomalous symbols, and safety compliance. The shuffling stage breaks source order, chronological order, and topic clustering, reducing the risk of the model overfitting data arrangement and improving the uniformity of mixed corpora.

    The data pipeline can be abstracted into the following pseudocode:

    1. function build_pretraining_corpus(raw_docs, cfg):
    2. docs = exact_dedup(raw_docs)
    3. docs = near_dedup(docs)
    4. docs = quality_filter(docs, cfg.quality_rules)
    5. docs = language_filter(docs, cfg.language_ratio)
    6. docs = safety_filter(docs, cfg.safety_rules)
    7. docs = shuffle(docs, seed=cfg.seed)
    8. return pack_sequences(docs, max_length=cfg.max_length)

    The key to this process lies not in the function names, but in the sequence and goals: deduplicate first to reduce redundancy, then filter to improve the signal-to-noise ratio, and finally shuffle to ensure uniform distribution. For bilingual models, attention must also be paid to language and domain ratios to prevent over-sampling of a specific language or text type. Data governance experience can be summarized as: remove duplicate data early, filter low-quality data explainably, complete shuffling before packing sequences, and validate any ratio adjustments through small-scale ablation studies rather than intuition.

    4. Post-training: Aligning Base to Chat Models via SFT and DPO

    Pre-training solves the “language modeling” problem, while post-training solves “how to use capabilities according to instructions.” This model utilized SFT (Supervised Fine-Tuning) and DPO (Direct Preference Optimization) algorithms during post-training. SFT uses instruction-response pairs to teach the base model task formats, response styles, and basic instruction following. DPO uses preference pair data to make the model favor preferred outputs among candidate responses. Together, they form a typical alignment path from a base model to a chat model.

    The workflow can be abstracted as: first complete pre-training with massive bilingual corpora to obtain a base model; then perform supervised fine-tuning with high-quality instruction data to give the model an interactive response format; finally, apply direct preference optimization with preference data to improve helpfulness, safety, and style consistency. DPO’s engineering value lies in its independence from explicit reward models in online reinforcement learning pipelines, resulting in a relatively concise training chain suitable for quickly validating alignment effects in early model stages. However, DPO is not a shortcut that ignores data quality; the annotation consistency, coverage, and difficulty distribution of preference data directly impact the alignment ceiling.

    1. base_model = pretrain(pretraining_corpus)
    2. sft_model = supervised_finetune(base_model, instruction_data)
    3. chat_model = dpo_optimize(sft_model, preference_pairs)

    For developers, the insight from this path is that base and chat models should share the same pre-training foundation, and post-training data should be constructed around target scenarios. SFT handles “knowing how to respond,” while DPO handles “responding more in line with preferences.” If post-training data coverage is insufficient, simply increasing training steps cannot substitute for data governance.

    5. Open-Source Strategy and Engineering Insights: From Reproduction to Data Quality Driven

    The first-generation research began by reproducing the mainstream dense decoder technical route, then improved performance by building higher-quality training sets. This strategy demonstrates clear engineering rationality: first reduce architectural uncertainty to establish a trainable, inferable, and evaluable baseline; then shift optimization focus to data deduplication, filtering, shuffling, and post-training recipes. For teams with limited resources, this is more reliable than pursuing entirely new architectures from the start.

    Open-sourcing both base and chat models allows different roles to use them as needed: research-oriented users focus on base models and training recipes, application-oriented users focus on the chat model’s instruction following and deployment costs, and platform-oriented users focus on tiered scheduling of dual-scale versions in inference services. Releasing this series as open source marked the starting point for subsequent open-source ecosystems and open platform strategies, indicating that the first-generation model was not just a technical validation but an ecosystem entry point. Engineering-wise, three points can be extracted: First, data quality is the primary lever for improving first-generation model performance, with deduplication eliminating 89.8% of duplicate documents as direct evidence. Second, introducing GQA in the larger model reflects proactively designing for inference costs. Third, the dual-form release of base and chat models reduces migration costs between secondary development and direct application.

    6. Limitations and Future Directions

    As a first-generation model, its roadmap primarily focuses on reproducing mature architectures and optimizing data quality, rather than architectural innovation. Future iterations will typically continue in directions such as data ratioing, long-context capabilities, alignment data scaling, inference efficiency, and safety compliance. During evaluation, one should avoid substituting task-level validation with a single benchmark, and instead combine target scenarios to examine instruction following, bilingual capabilities, inference stability, and deployment costs. Overall, the technical value of this first-generation open-source bilingual LLM lies in stringing together “tiered parameter scales, attention trade-offs, three-stage data governance, SFT and DPO post-training, and open-source distribution” into a complete engineering pipeline, providing a reusable methodology for future general language model research and development.