The evolution of Large Language Models (LLMs) like ChatGPT and GPT-4 has sparked discussions on the advent of Artificial General Intelligence (AGI). However, replicating such advancements in open-source models has been challenging. This paper introduces InternLM2, an open-source LLM that outperforms its predecessors in comprehensive evaluations across 6 dimensions and 30 benchmarks, long-context modeling, and open-ended subjective evaluations through innovative pre-training and optimization techniques. The pre-training process of InternLM2 is meticulously detailed, highlighting the preparation of diverse data types including text, code, and long-context data. InternLM2 efficiently captures long-term dependencies, initially trained on 4k tokens before advancing to 32k tokens in pre-training and fine-tuning stages, exhibiting remarkable performance on the 200k ``Needle-in-a-Haystack" test. InternLM2 is further aligned using Supervised Fine-Tuning (SFT) and a novel Conditional Online Reinforcement Learning from Human Feedback (COOL RLHF) strategy that addresses conflicting human preferences and reward hacking. By releasing InternLM2 models in different training stages and model sizes, we provide the community with insights into the model's evolution.

PDF Abstract
Task Dataset Model Metric Name Metric Value Global Rank Result Benchmark
Long-Context Understanding Ada-LEval (BestAnswer) InternLM2-7b 2k 49.5 # 3
4k 33.9 # 4
8k 13.4 # 5
16k 0.8 # 7
1k 58.6 # 5
6k 12.3 # 5
12k 2.0 # 5
32k 0.5 # 4
64k 0.5 # 1
128k 0.0 # 1
Long-Context Understanding Ada-LEval (TSort) InternLM2-7b 2k 5.1 # 6
4k 3.9 # 7
8k 5.1 # 3
16k 4.3 # 3

Methods