The Starting Point of Open-Source LLMs: A Technical Breakdown of First-Generation General Language Models
This article examines the first generation of open-source general-purpose language models, available in 7B and 67B parameter sizes and in both base and chat variants. It explains why these early models still matter as engineering baselines, then walks through their core technical choices: a dense decoder backbone, MHA for the 7B model versus GQA for the 67B model, a three-stage data pipeline of deduplication, filtering, and shuffling, and post-training that combines SFT with DPO. It also covers bilingual evaluation methodology, practical guidance for reproduction and continued pre-training, and common pitfalls, offering a transferable methodology rather than a product review.
1. Introduction: Why First-Generation Models Are Worth Revisiting
In an era of rapidly iterating open-source large models, first-generation general language models are often treated as transitional artifacts. From an engineering perspective, however, the first generation serves a dual purpose: establishing a baseline and validating a technical roadmap. It has to prove that a reproducible training path works, while also providing a reference point against which later versions can be compared. This article takes the first generation of open-source general language models (available in 7B and 67B parameter sizes, each in both base and chat forms) as its subject, abstracts the key technical decisions, and lays out a transferable engineering methodology.
It is worth stressing that this article does not evaluate or recommend any specific vendor’s product. The subject of discussion is a “common open-source dense model technical approach” as seen across the industry, and all conclusions are based on widely accepted general practices.
2. Positioning and Overall Technical Roadmap
The development logic of the first generation can be summarized in two steps:
- Reproduce first: Use a mature open-source dense decoder architecture as the blueprint, get the full pipeline from data to training to inference working end to end, and ensure the process is controllable and the results predictable.
- Then surpass: Without changing the backbone architecture, shift the source of gains to data quality, trading stricter corpus governance for stronger performance at the same parameter count.
The value of this roadmap is that it keeps risk under control. Architecture changes affect parallelism strategy, memory footprint, and inference implementation all at once, whereas data-side optimization leaves the engineering stack almost untouched — a “high return, low risk” entry point. The related technical report was released in early January 2024, and the model was subsequently published as open source, marking the starting point of its open-source ecosystem and open platform strategy.
3. Architecture Choices: A Dense Backbone with Two Attention Schemes
The model keeps the mainstream dense decoder structure and does not introduce sparse expert routing. The benefit is a simple training and deployment path, few operator dependencies, and a mature toolchain for quantization and distillation.
The two sizes take different approaches to attention:
- 7B uses multi-head attention (MHA): At small scale, KV cache pressure is limited, so MHA’s strong representational capacity and most direct implementation are a good fit.
- 67B uses grouped-query attention (GQA): The number of key/value heads is compressed into a number of groups, with multiple query heads sharing the same KV group, which significantly reduces KV cache size and bandwidth pressure during autoregressive decoding.
The relationship between the head counts can be expressed with a simple illustrative function:
def build_attention(n_heads: int, n_kv_heads: int):assert n_heads % n_kv_heads == 0group_size = n_heads // n_kv_heads# n_kv_heads == n_heads -> MHA# n_kv_heads == 1 -> multi-query attention (MQA)# 1 < n_kv_heads < n_heads -> GQAreturn {"n_heads": n_heads, "n_kv_heads": n_kv_heads, "group_size": group_size}print(build_attention(32, 32)) # MHAprint(build_attention(32, 8)) # GQA, KV cache reduced to roughly 1/4
The engineering implication is straightforward: the KV cache is the main cost item in long-context serving, and GQA trades a small amount of quality for gains in both throughput and memory. That is why it has become the de facto standard at larger parameter scales.
4. Data Engineering: A Three-Stage Pipeline Is the Main Driver of Performance
The most reusable lesson from the first generation is splitting pre-training corpus construction into three explicit stages rather than “washing it once”:
- Deduplication: Apply exact and approximate matching at both document and paragraph level (for example, MinHash/SimHash-based near-duplicate detection) to remove templated web pages, mirror sites, and reposted content. The source material shows this stage filtered out about 89.8% of duplicate documents — a ratio that indicates how redundant unwashed public corpora are.
- Filtering: Combine rules (length, symbol ratio, language-identification confidence) with lightweight classifier scoring to remove ads, garbled text, and low-quality text with obvious machine-translation traces.
- Shuffling: Break up source and topic distribution at a global level, avoiding consecutive data from the same site that would bias optimizer state, while also improving reproducibility of the training run.
From an engineering standpoint, it is advisable to persist each stage’s output as a versioned dataset snapshot and record the corresponding statistics (document count, token count, language mix, duplication rate). Otherwise, when quality fluctuates later, there is no way to tell whether the cause is data or training hyperparameters. A corpus of roughly 2 trillion tokens with a controllable Chinese-English mix is the foundation of this generation’s bilingual capability.
5. Post-Training: Combining SFT with Preference Alignment
Pre-training yields a base model that can “continue text”; the chat form requires post-training. This generation uses a two-stage scheme of supervised fine-tuning (SFT) followed by direct preference optimization (DPO):
- SFT: High-quality instruction-response pairs, constructed manually or semi-automatically, teach the model to follow instructions and maintain format and tone.
- DPO: Preference is optimized directly from paired “better response / worse response” samples, with no separate reward model to train. The pipeline is shorter and the memory overhead smaller, which suits teams with limited resources.
Practical points:
- SFT data should be small and high-quality, covering multi-turn dialogue, refusals, code, and structured output, to avoid a one-note style.
- DPO preference pairs need controlled “distinguishability”; samples that are too close produce almost no gradient signal.
- Watch how hyperparameters such as
betaaffect the KL constraint: too large makes outputs overly conservative, too small drifts away from the base distribution.
Base pre-training → instruction tuning (SFT) → preference alignment (DPO) → evaluation and red teaming → release (base and chat forms)
6. Evaluation: Cross-Model Comparison Under Chinese and English
Evaluation results show that the 67B version has a clear advantage over comparable ~70B open-source models on both Chinese and English benchmarks, which supports the “data quality first” roadmap. A reusable evaluation framework should have four layers:
- Knowledge and academic questions: A mix of multiple-choice and short answer, testing factuality.
- Language and reasoning: Reading comprehension, math, and logic, focusing on the stability of multi-step reasoning.
- Code and structured output: Function completion and adherence to format constraints.
- Safety and refusal: Boundary behavior under leading questions.
Evaluation details must also be recorded: prompt templates, number of few-shot examples, decoding temperature, and maximum length. These settings often affect scores more than the real gap between models, so without fixing them, cross-model comparison is impossible.
7. Practical Advice for Reproduction and Continued Pre-Training
To reproduce or continue training a model of the same scale on your own data, the following order is a useful reference:
- Compute estimation: Roughly estimate training FLOPs as 6 × parameters × tokens, then convert to wall-clock time based on actual inter-GPU interconnect bandwidth.
- Parallelism strategy: Dense models commonly combine data, tensor, and pipeline parallelism. The 7B level usually fits on a single node, while the 67B level needs multiple nodes plus activation recomputation.
- Precision and stability: Mixed-precision training with gradient clipping; when loss spikes occur, roll back to the most recent data snapshot and checkpoint first.
- Continued pre-training: Start with a small proportion of domain corpus and increase it gradually, while retaining replay of general corpus to prevent catastrophic forgetting.
- Inference deployment: Models using GQA can significantly reduce KV cache usage; combined with continuous batching and paged-cache strategies such as PagedAttention, throughput improves. Hosting weights on object storage through a cloud container platform, with log services and monitoring alerts tracking latency and error rates, can shorten the time to launch.
8. Common Pitfalls
- Treating architecture as a master key: At the same parameter count, corpus governance usually pays off more than structural tweaks.
- Ignoring real deduplication: With only exact matching and no approximate deduplication, the duplication rate can still stay high.
- Letting post-training mask base-model flaws: Gaps in the base model’s knowledge cannot be filled by preference alignment.
- Not fixing evaluation configuration: This makes conclusions irreproducible and rules out comparison across versions.
9. Conclusion
The significance of the first generation of open-source general language models lies not in parameter count but in establishing a reproducible, comparable, and continuously evolvable technical baseline: a dense backbone keeps engineering controllable, GQA solves inference cost, the three-stage data pipeline delivers the main gains, and SFT plus DPO closes the usability loop. For developers and enterprise users, migrating this methodology to their own scenarios holds more long-term value than chasing a single model’s benchmark numbers.
