Building the First Generation of Open-Source LLMs: Dense Architecture and Data Engineering Practices
This article examines the engineering foundations of first-generation open-source general-purpose large language models, focusing on their dual Base and Chat delivery model, dense architecture choices, attention mechanisms, and a three-stage data pipeline for building bilingual training corpora. It also covers post-training with SFT and DPO, bilingual evaluation practices, and the engineering value of an open-source release strategy. Readers will find reusable technical experience rather than version-specific specifications.
1. Introduction: Why the First Generation Still Matters
Open-source large language models iterate quickly, so revisiting the technical roadmap of the first generation of general-purpose LLMs is not nostalgia. Almost every later version builds on the engineering paradigm established by that generation. Its core contributions can be summarized in three points: establishing the dense architecture as a reliable general-purpose foundation, validating a method for building large-scale bilingual corpora, and creating the starting point of a developer ecosystem through open-source release. For developers and enterprise users, understanding the trade-offs behind this generation is more valuable than memorizing the parameter count of a specific release.
This article does not focus on any particular vendor’s product. Instead, it abstracts the source material into the general technical problem of “a first-generation open-source general-purpose language model” and discusses the reusable engineering experience within it.
2. Positioning and Form: Dual Delivery of Base and Chat Models
The first generation typically shipped two forms at the same time: a Base version and a Chat version. This distinction is not marketing packaging but a clear division of engineering labor.
- The Base version completes only self-supervised pre-training. It outputs a probability distribution over the next token, excels at continuation and knowledge recall, and serves as a starting point for downstream fine-tuning and domain-specific continued pre-training.
- The Chat version adds supervised fine-tuning and preference alignment on top of the Base version. It follows instructions, supports multi-turn conversation, and is suitable for direct use by end users.
Two parameter tiers were common in the first generation: 7B and 67B. The 7B tier targets single-GPU or consumer-grade GPU inference, edge deployment, and rapid validation. The 67B tier targets server-side scenarios that require stronger reasoning and higher knowledge density. Both tiers share the same data recipe and training pipeline, differing only in architectural details. This “one recipe, multiple outputs” approach significantly reduced R&D and maintenance costs.
3. Architectural Choices: The Certainty of Dense Structures and Cheaper Attention
The first generation retained the industry-proven dense feed-forward structure, in which every token activates all parameters at every layer. The benefits of a dense architecture are stable training, a mature operator ecosystem, and broad support in quantization and inference frameworks. The cost is that inference compute and memory usage grow linearly with parameter count. For a first-generation foundation model, prioritizing determinism over the theoretical compute savings of sparsification was the more rational choice.
The two tiers diverged in their attention mechanisms:
- The smaller tier uses standard multi-head attention (MHA), which is simple to implement and keeps memory pressure manageable during training.
- The larger tier uses grouped-query attention (GQA), letting multiple query heads share a group of key-value heads. This compresses the key-value cache (KV Cache) during inference with almost no loss in quality.
Shrinking the KV Cache directly determines throughput and memory limits in long-context, high-concurrency scenarios. An illustrative configuration comparison follows (it expresses structural differences only, not parameters from a specific implementation):
# Multi-head attention: every query head has its own key-value headmha_config = {"num_heads": 32,"num_kv_heads": 32, # number of key-value heads equals number of query heads}# Grouped-query attention: multiple query heads share one group of key-value headsgqa_config = {"num_heads": 32,"num_kv_heads": 8, # far fewer key-value heads, KV Cache shrinks proportionally}
The engineering takeaway is direct: once model scale crosses a certain threshold, the main constraint on inference cost shifts from compute to memory bandwidth and cache capacity. At that point, reworking the attention structure is often more cost-effective than continuing to stack parameters.
4. Data Engineering: Three Stages for Two Trillion Tokens of Bilingual Corpus
The most reusable experience from the first generation is that it treated “data quality” as a measurable, optimizable engineering object. The pre-training corpus was roughly two trillion tokens covering both Chinese and English, and the build process was divided into three stages: deduplication, filtering, and shuffling.
- Deduplication. Duplicate documents amplify memorization, increase the risk of data leakage, and cause the model to overfit high-frequency templates. This stage removed about 89.8% of duplicate documents, showing how redundant raw web corpora can be. In practice, document-level exact deduplication is usually combined with near-duplicate detection (for example, similarity bucketing based on MinHash) to balance recall and compute cost.
- Filtering. Quality and safety filtering runs on the deduplicated corpus: language identification and language-ratio control, length and symbol-ratio thresholds, removal of templated text and garbled content, and cleaning of harmful content and private information. Filtering rules should be version-controlled so it is possible to trace which version of the data a given training run used.
- Shuffling. Shuffling breaks up document order to avoid batch bias caused by consecutive same-source data, while mixing Chinese and English content and different domains by ratio so that training becomes insensitive to data order.
A practical pipeline skeleton looks like this:
Raw crawl/collection-> Language identification and language-ratio statistics-> Document-level dedup + near-duplicate clustering-> Quality/safety/privacy filtering (versioned rules)-> Tokenization and packing (fixed-length sequences)-> Global shuffling and ratio-based sampling-> Training set snapshot (with checksum and data card)
The key practice is treating the “data snapshot” as a first-class citizen: recording the data version, mixing ratios, filtering rules, and checksums is what makes it possible to quickly determine whether a regression comes from data or from training.
5. Post-Training: Supervised Fine-Tuning and Direct Preference Optimization
Pre-training solves “can it speak”; post-training solves “does it obey.” Post-training for the first generation had two stages:
- Supervised fine-tuning (SFT): instruction-response pairs, written by humans or carefully selected, teach the model to follow instruction formats, stay consistent in role, and output under constraints.
- Direct Preference Optimization (DPO): paired “better response/worse response” data directly optimizes the policy without separately training a reward model, resulting in a shorter pipeline, fewer hyperparameters, and lower reproduction cost.
Practical points include: instruction data should cover edge cases such as multi-turn dialogue, refusals, formatted output, and long text; preference data requires controlled annotation consistency so noise does not skew the alignment direction; learning rates for SFT and preference optimization are usually far lower than for pre-training, and training steps should not be too long, or general capability will degrade.
6. Evaluation: Bilingual Tracks and Comparison Baselines
Evaluating the first generation used a bilingual, multi-dimensional comparison: knowledge Q&A, reasoning, code, math, long-text understanding, and safety compliance each formed a track, compared against open-source baselines of similar parameter scale. The source material shows that the 67B version had clear advantages over same-scale baselines on both Chinese and English evaluations. This supports a judgment: when architecture and scale are similar, corpus quality and mixing ratios often contribute more at the margin to final results than simply stacking parameters.
For evaluation engineering, three things should be fixed: the evaluation set version, the prompt template, and the decoding parameters. Drift in any one of them makes comparisons meaningless.
7. Ecosystem and Adoption: The Engineering Value of an Open-Source Strategy
Releasing base and chat models as open source essentially converts “model capability” into “ecosystem assets”: developers can validate locally, and enterprises can do domain continued pre-training and private deployment in a controlled environment. From a cloud platform perspective, general-purpose capabilities are enough to support a complete loop: object storage holds data snapshots and model artifacts, a container platform runs training and inference workloads, a message queue decouples the data pipeline, and logging plus monitoring and alerting track training metrics and online latency.
For readers who want to build their own model team, the reusable roadmap is: first define the dual-form delivery goal of base and chat models, then settle the parameter tiers and attention structure, then put most of the effort into the three-stage data pipeline and snapshot management, and finally close the loop with dual-track evaluation and preference alignment.
8. Conclusion
The historical significance of the first generation of open-source general-purpose LLMs lies not in a leaderboard score but in proving three things: a mature dense architecture is sufficient to support general capability, systematic data engineering is a quantifiable performance lever, and open-source delivery can quickly form a developer ecosystem. Once these three points are fully understood, the iteration logic of later versions and the adoption path for your own team become much clearer.
