MAmmoTH2: Scaling Instructions from the Web

Xiang Yue, T. Zheng, Ge Zhang, Wenhu Chen

arXiv:2405.03548 · 2026-07-27 공개 · arXiv · PDF

llm instruction-tuning gsm8k reasoning-benchmarks mistral open-source-llm large-scale-data math

Abstract

Instruction tuning improves the reasoning abilities of large language models (LLMs), with data quality and scalability being the crucial factors. Most instruction tuning data come from human crowd-sourcing or GPT-4 distillation. We propose a paradigm to efficiently harvest 10 million naturally existing instruction data from the pre-training web corpus to enhance LLM reasoning. Our approach involves (1) recalling relevant documents, (2) extracting instruction-response pairs, and (3) refining the extracted pairs using open-source LLMs. Fine-tuning base LLMs on this dataset, we build MAmmoTH2 models, which significantly boost performance on reasoning benchmarks. Notably, MAmmoTH2-7B's (Mistral) performance increases from 11% to 36.7% on MATH and from 36% to 68.4% on GSM8K without training on any in-domain data. Further training MAmmoTH2 on public instruction tuning datasets yields MAmmoTH2-Plus, achieving state-of-the-art performance on several reasoning and chatbot benchmarks. Our work demonstrates how to harvest large-scale, high-quality instruction data without costly human annotation or GPT-4 distillation, providing a new paradigm for building better instruction tuning data.

한국어 요약

한 줄 요약

MAmmoTH2는 웹에서 1000만 개의 자연 발생 지시 데이터를 추출해 LLM의 추론 능력을 향상시킨 모델로, MATH와 GSM8K에서 각각 36.7%와 68.4%의 성능을 달성했다.

핵심 기여도

핵심 아이디어

기존 지시 훈련 데이터는 주로 인간 라벨링 또는 GPT-4 교육에 의존하며, 이는 비용이 높고 다양성이 부족하다. 본 연구는 웹 크롤링 데이터에서 자연 발생 지시-응답 쌍을 추출하는 새로운 패러다임을 제안한다. 구체적으로, (1) seed 데이터로 fastText 모델을 훈련해 Common Crawl에서 관련 문서를 추출하고, (2) Mixtral과 같은 오픈소스 LLM을 사용해 Q-A 쌍을 추출한 후, (3) Mixtral-8×7B와 Qwen-72B로 정제하여 품질을 유지한다. 이 방식은 인공 라벨링 없이도 대규모, 고질량 데이터를 확보할 수 있다는 점에서 혁신적이다.

기술적 접근법

주요 결과

의의 및 한계

MAmmoTH2는 GPT-4 라벨링이나 인간 라벨링 없이도 대규모, 고질량 지시 데이터를 확보할 수 있는 새로운 패러다임을 제시한다. 특히, MATH와 GSM8K에서의 성능 향상은 모델의 일반화 능력을 입증하며, 추론 능력 향상에 있어 웹 데이터 활용의 잠재력을 보여준다. 그러나, 추출된 데이터의 도메인 분포나 편향성에 대한 구체적 분석은 제공되지 않았으며, 일부 벤치마크에서 최고 성능을 달성하지 못한 점은 한계로 작용할 수 있다.

실용적 활용

MAmmoTH2는 교육, 과학 연구, 엔지니어링 등 다양한 도메인에서 복잡한 추론이 필요한 태스크에 적용 가능하다. 특히, 인공 라벨링 없이도 고성능 모델을 훈련할 수 있어, 저비용으로 LLM을 개선하고자 하는 산업 및 연구 기관에 유용할 수 있다.