Aquila2 Technical Report

Bo-Wen Zhang, Liangdong Wang, Jijie Li, Shuhao Gu, Xinya Wu, Zhengduo Zhang, Boyan Gao, Yulong Ao, Guang LiuarXiv 2024 · DOI

The Beijing Academy of Artificial Intelligence (BAAI) has released the technical report for Aquila2, a series of bilingual (Chinese-English) Large Language Models (7B, 34B, and 70B). Aquila2 distinguishes itself through the HeuriMentor framework, which enables real-time monitoring and dynamic adjustment of data mixtures during training. Notably, the Aquila2-34B model frequently outperforms larger models like Llama2-70B, demonstrating the power of efficient, data-centric training.

Addressing Training Efficiency and Data Management

Traditional LLM training often relies on static datasets over long periods, making it difficult to adapt to mid-stream data variations or model plateaus. The Aquila2 team addresses this by moving away from "black box" training. They propose a system that provides real-time insights into model convergence, allowing for dynamic pivots in data strategy to maximize performance per compute hour.

The HeuriMentor (HM) Framework

The core innovation of Aquila2 is the HeuriMentor (HM) Framework, designed to provide a "heuristic mentor" for the training process. It consists of three primary components:

  1. Adaptive Training Engine (ATE): Facilitates a dynamic "data recipe" by updating data source mixtures on the fly. It also supports training across heterogeneous hardware (e.g., NVIDIA A100 and A800), overcoming significant logistical hurdles.
  2. Training State Monitor (TSM): Acts as the observational hub, tracking loss, downstream task performance, and weight trajectories. Monitoring weight changes across layers helps identify stable states or problematic data batches.
  3. Data Management Unit (DMU): Manages web-scale data through deduplication and quality filtering, while overseeing the "phased" training approach.
The HeuriMentor framework architecture, featuring the ATE, TSM, and DMU components.

Phased Training and Datasets

Aquila2 was trained on a massive bilingual corpus, with Chinese data primarily from the WuDaoCorpus and English data from The Pile. The team employed a "K-stage" strategy (K6 through K65), transitioning from general language modeling to intensive knowledge acquisition and target-oriented tasks (QA and academic datasets).

Experiments with 1.3B "pilot" models revealed that a 1:2 or 1:3 ratio of Chinese to English tokens optimized training loss. The researchers also observed that Chinese corpora are generally more challenging for models to learn than English ones.

Key Insights and Results

A significant technical insight involved using weight trajectories (measured via Fréchet distance) to visualize convergence. The team found that self-attention layers stabilize quickly, whereas MLP layers require more iterations to settle.

Training progress of Aquila2-34B showing loss and accuracy across different K-stages.

The efficacy of this phased strategy is evident in the results:

  • Aquila2-34B Performance: Achieved a mean score of 72.20 across base model benchmarks, surpassing Llama2-70B (67.98) despite having half the parameters and using fewer training tokens (~1.8T vs 2T).
  • Bilingual and Coding Prowess: Scored 81.18 on the BUSTM bilingual task and 39.02% on HumanEval, leading its size class in coding.
  • Quantization Resilience: The 34B model maintained high performance even when quantized to Int4, facilitating deployment on consumer hardware.

Limitations and Future Directions

The authors noted inadvertent data contamination regarding the GSM8K benchmark and recommend focusing on alternative evaluations like WMT22. Future work will explore Mixture-of-Experts (MoE) architectures and further refine of data quality filters to continue pushing the limits of model efficiency.

Summary updated

BibTeX
@misc{zhang2024aquila,
  author = {Bo-Wen Zhang and Liangdong Wang and Jijie Li and Shuhao Gu and Xinya Wu and Zhengduo Zhang and Boyan Gao and Yulong Ao and Guang Liu},
  title = {{Aquila2 Technical Report}},
  year = {2024},
  eprint = {2408.07410},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2408.07410},
}
Figure