The Starting Point of Open-Source LLMs: A Technical Breakdown of the First-Generation General Language Model
This article examines the first-generation open-source general language model released in January 2024 in 7B and 67B sizes, with Base and Chat variants. It explains why the initial foundation model is worth studying on its own, covering its LLaMA 2-style dense architecture, the use of MHA in 7B versus GQA in 67B to reduce KV Cache, a roughly 2-trillion-token bilingual data pipeline built on deduplication, filtering, and shuffling, and two-stage post-training with SFT and DPO. It also reviews benchmark results against 70B-class baselines and offers practical guidance on open-source distribution, compute and storage planning, observability, and rollout. Readers will get a reusable minimal recipe for building and evaluating a controllable foundation model.
1. Why the First-Generation Base Model Deserves Separate Study
Open-source LLM releases iterate quickly, and many teams track only the benchmark scores of the latest version. The technical paradigm established by the first-generation base model often gets overlooked. The value of that initial general language model is not its parameter count. It proved out a specific path: reproduce a mature architecture, then trade better data for performance. It was also the first to deliver both a base and a chat form to the community as open source.
For engineering teams, this is a reusable minimal viable recipe: keep the architecture conservative, invest heavily in data, use post-training for alignment, and release openly.
2. Positioning and Release Format
The first-generation model was released in January 2024 in two parameter sizes, 7B and 67B, each offered as a Base and a Chat version:
- Base: pre-trained only, suitable for domain-specific continued pre-training, fine-tuning, or distillation.
- Chat: instruction-tuned and preference-aligned, suitable for direct use in interactive scenarios such as question answering, summarization, and code assistance.
The accompanying DeepSeek-67B (V1) paper was made public on January 5, 2024, which made the technical details reproducible and auditable externally. This is also why it became the starting point for five subsequent core version iterations, V1 through V5.
3. Architecture Choices: Dense First, Trim Attention as Needed
The first generation kept the industry-proven LLaMA 2 dense architecture. Compared with sparse mixture-of-experts designs, a dense structure makes compute and memory estimates for training and inference more linear and lowers communication complexity, which suits a team’s first controllable base model.
Attention was handled differently by size:
- 7B uses standard multi-head attention (MHA), which is simple to implement and keeps memory and implementation risk manageable.
- 67B replaces MHA with grouped-query attention (GQA), letting multiple query heads share a group of key-value heads and thereby compressing the KV Cache during inference.
The KV Cache memory footprint can be approximated as:
KV_bytes ≈ 2 × layers × kv_heads × head_dim × seq_len × batch × bytes_per_elem
Here kv_heads is num_heads divided by the number of groups. In long-context, high-concurrency online serving, this term is often the memory bottleneck, so GQA is a key way to lower the cost per request with almost no loss in quality.
4. Data Engineering: Two Trillion Tokens Across a Three-Stage Pipeline
The pre-training corpus was roughly 2 trillion tokens and covered both Chinese and English. Data construction was split into three connected stages:
- Deduplication: removed 89.8% of duplicate documents, substantially reducing memorization and overfitting risk and increasing the number of effective tokens per unit of compute.
- Filtering: removed low-quality and noisy content using quality, language identification, safety, and formatting rules.
- Shuffling: shuffled document and batch order to avoid stage-wise distribution bias affecting the optimization trajectory.
The pipeline can be expressed in pseudocode as follows:
raw = load_corpus()dedup = exact_and_near_dedup(raw) # document-level + paragraph-levelclean = quality_and_safety_filter(dedup) # rules + classifiersmixed = shuffle_and_pack(clean, seq_len) # shuffle + fixed-length packing
A nearly 90% deduplication rate indicates the raw corpus was highly redundant. Skipping this step means spending large amounts of compute re-learning the same samples.
5. Post-Training: Two-Stage Alignment with SFT and DPO
Post-training combined supervised fine-tuning (SFT) with direct preference optimization (DPO):
- SFT: builds the basic ability to follow instructions using high-quality instruction-response pairs; data quality matters more than quantity.
- DPO: optimizes the policy directly on paired preference data (chosen/rejected), removing the need to train a separate reward model and sample online, which makes the process shorter and more stable.
Illustrative flow:
# Stage 1: supervised fine-tuningsft(model, instruction_pairs, lr=2e-5, epochs=2)# Stage 2: preference alignment (no separate reward model)dpo(model, preference_pairs, beta=0.1)
In practice, the intent coverage of SFT data sets the ceiling on capability, while the consistency of DPO data determines whether the style stays stable. Mixing the same low-quality annotations into both stages often produces a model that answers but drifts.
6. Validation: Comparison Against 70B-Class Base Models
Public evaluations show that the 67B version had a clear advantage over 70B-class comparison base models on both Chinese and English benchmarks. This supports an important conclusion: with the same architectural lineage, gains from corpus quality and deduplication intensity can offset or even reverse a gap in parameter count. Evaluation should therefore cover at least four task types—bilingual Chinese-English understanding, reasoning, code, and long context—and report Base and Chat results separately, so that style advantages from alignment do not mask differences in base capability.
7. Open-Source Distribution and Deployment Advice
The first generation was released as open source and became the starting point for an open ecosystem and open platform. Open weights let external teams deploy privately, run domain continued pre-training, and distill. The dual Base and Chat formats cover both needs: building your own capability and putting it to use directly.
To reproduce similar results in your own environment, consider:
- Compute and storage: provision high-speed interconnect and sufficient memory on the training side, keep data and checkpoints in object storage, and let a container platform handle job orchestration.
- Observability: use logging services and monitoring alerts to track loss, throughput, memory, and data-loading bottlenecks.
- Rollout path: validate the data pipeline on a small sample first, then scale up; on the inference side, evaluate KV Cache optimizations such as GQA first, combined with batching and quantization to control cost.
Overall, the biggest lesson from the first-generation base model for developers is to make the data and evaluation pipelines solid before talking about scaling up. To carry the training and inference workloads described above, resource planning can draw on Baidu AI Cloud’s general capabilities in container platforms, object storage, and monitoring and alerting.
