2024년 6월 19일
DataComp-LM: In search of the next generation of training sets for language models
(Jeffrey Li, Alex Fang, Georgios Smyrnis, Maor Ivgi, Matt Jordan, Samir Gadre, Hritik Bansal, Etash Guha, Sedrick Keh, Kushal Arora, Saurabh Garg, Rui Xin, Niklas Muenninghoff, Reinhard Heckel, Jean Mercat, Mayee Chen, Suchin Gururangan, Mitchell Wortsman, Alon Albalak, Yonatan Bitton, Marianna Nezhurina, Amro Abbas, Cheng-Yu Hsieh, Dhruba Ghosh, Josh Gardner, Maciej Kilian, Hanlin Zhang, Rulin Shao, Sarah Pratt, Sunny Sanyal, Gabriel Ilharco, Giannis Daras, Kalyani Marathe, Aaron Gokaslan, Jieyu Zhang, Khyathi Chandu, Thao Nguyen, Igor Vasiljevic, Sham Kakade, Shuran Song, Sujay Sanghavi, Fartash Faghri, Sewoong Oh, Luke Zettlemoyer, Kyle Lo, Alaaeldin El-Nouby, Hadi Pouransari, Alexander Toshev, Stephanie Wang, Dirk Groeneveld, Luca Soldani, Pang Wei Koh, Jenia Jitsev, Thomas Kollar, Alexandros G. Dimakis, Yair Carmon, Achal Dave, Ludwig Schmidt, Vaishaal Shankar)
DataComp-LM. 데이터셋 구축 과정이 공개된 모델 중에서 Mistral 7B, Gemma 7B, Llama 3 8B와 동등한 벤치마크 스코어를 달성한 첫 모델입니다. 그런 점에서 중요한 결과라고 생각하는데 그렇게 화제가 되는 것 같지 않아서 리포트에 나온 디테일들에 대한 생각을 써봤습니다.
Text Extraction. CCNet 때문에 WET 기반으로 Paragraph Deduplication 등을 사용한 접근이 많았는데 FineWeb에서도 그렇고 여기서도 Extractor를 사용한 쪽이 결과가 좋다는 것을 재확인했습니다. 다만 Trafilatura가 아니라 Resiliparse 같은 훨씬 빠른 도구를 사용해도 좋다는 결과. Resiliparse는 OpenWebMath에서도 사용됐었고 벤치마크에서도 스코어가 괜찮은 도구이긴 합니다. 혹은 Readability도 후보가 될 수 있을지도 모르겠네요. OpenWebMath에서 그랬던 것처럼 필요한 태그들을 남겨서 활용하면 더 개선할 수 있을 듯 합니다.
RefinedWeb의 휴리스틱 기반 필터. RefinedWeb은 Gopher의 휴리스틱을 따온 것이라는 것을 고려하면 Gopher의 가장 중요한 발견은 이 휴리스틱 필터들이지 않을까 싶네요.
블룸 필터를 사용한 Deduplication. 블룸 필터는 Dolma 쪽에서 사용했었는데 여기서는 문서와 문단 단위 Deduplication을 위해 채택했습니다. MinHash를 써도 결과는 비슷한데 블룸 필터 쪽이 빨라서 썼다는 흐름.
DeepSeek LLM과 FineWeb 쪽에서 나온 Global Deduplication 문제를 다루고 있다. 여기서는 데이터셋을 얼마나 샤딩한 다음 Deduplication을 할 것인가라는 형태로 논하고 있다. 다만 명확한 결과는 없다. 최종적으로는 100개 샤드를 사용했기에 덤프별 Deduplication을 사용했다고 할 수 있을 듯.
모델 기반 퀄리티 필터링. LM을 사용한 Perplexity 기반 필터링이나 fastText 기반 필터링 등을 모두 실험했습니다다. fastText도 Positive 데이터를 어떻게 선택할 것인가로 실험을 했다. 여기서 선택한 것은 OpenHermes-2.5와 ELI5 서브레딧을 Positive로 잡는 것. FineWeb-Edu와 좀 비슷하게 느껴지기도 합니다.
솔직히 이런 문제에 대해서까지 GPT-4 생성 데이터를 사용하는 것은 내키지 않긴 하네요. 그리고 이런 샘플들을 Positive로 잡고 Top 10%만 사용하는 것은 다양성을 지나치게 줄이는 것이 아닐까 싶은 생각도 있긴 합니다. (보다 전통적인 퀄리티 스코어에 따른 샘플링은 어떨까 하는 생각도 있습니다.) 다만 문제가 있다는 증거는 벤치마크로는 딱히 드러나지 않습니다.
Llama에서 추가적으로 사용한 위키피디아, 서적, Stack Exchange, arXiv, Github 데이터 첨가. 안 섞는 쪽이 낫다는 이야기를 합니다. 최근의 더 다양하게 섞는 흐름과는 상반된 결과이긴 한데 학습량이 더 많아지면 문제가 달라질 수도 있지 않을까 싶네요. Llama의 고품질 데이터들이 지금 기준으로는 제한적이긴 합니다.
이렇게 나온 3.8T 데이터셋에 StarCoder와 ProofPile2를 섞어 4.1T 데이터를 구성했습니다. 여기서 2.5T 학습하되 200B는 퀄리티 필터링 기준을 더 높이고 ProofPile2 비중을 더 높여서 학습. 그리고 100B는 2k -> 8K로 Context Length를 늘려 학습.
결과적으로 Mistral, Llama 3, Gemma 7B와 비슷한 벤치마크 스코어를 2.6T 학습으로 달성했습니다. Mistral이 아마도 6T 학습, Llama 3가 15T, Gemma 7B가 6T라는 것을 고려하면 굉장한 데이터 효율성이긴 합니다. 수학하고 코딩 능력이 밀린다고 하긴 합니다만.
위에서 썼듯 데이터 레시피가 공개된 모델 중에서 Mistral이나 Gemma 수준의 스코어를 달성한 모델이 없었다는 것을 생각하면 중요한 결과가 아닌가 싶습니다.
퀄리티 필터링을 거친 결과 남은 데이터가 많지는 않습니다. 3.8T. Exact Global Deduplication을 거치면 2T, Near Deduplication을 거치면 1T 정도. Deduplication의 엄격함을 줄인다거나 퀄리티 필터링의 역치를 낮추는 등 토큰의 양을 늘릴 방법은 있긴 하겠죠.
높은 퀄리티의 문서가 그리 많지 않다는 것을 고려했을 때 다국어 문서들을 고려하는 것과, (일단 논문에서는 일차적으로 부정적이지만) 다양한 데이터 소스들을 확보하는 것은 어쨌든 해야 할 작업이 아닐까 하는 생각을 합니다.
6T 이상 학습한 모델들이 비교 대상이라는 것을 고려했을 때 2.6T는 지나치게 높은 데이터 효율성이 아닐까 하는 생각이 있다. 벤치마크에서 포착되지 않는 무언가가 있을 수 있지 않을까 싶습니다. 다만 벤치마크에서 포착되지 않는다고 한 것처럼 딱히 증거는 없네요.
FineWeb에서 Global Deduplication 문제에 대해 우려한 것처럼 학습 사용 데이터가 늘어나면 패턴이 달라질 수도 있지 않을까 싶습니다.
어쨌든 FineWeb과 이 논문 덕에 Common Crawl을 어떻게 처리해야 하는지 대해서는 훨씬 많은 근거가 주어졌네요. Text Extraction, Gopher 휴리스틱, 적절한 (일단은 덤프 단위) Deduplication, 모델 기반 퀄리티 필터링. Deduplication과 모델 기반 퀄리티 필터링 측면에서는 좀 더 테스트할 수 있었으면 싶은 부분들이 많긴 합니다.
여전히 알 수 없는 부분은 Common Crawl 외의 다른 데이터소스로 어떤 것들이 쓰이고 있는가 하는 것이죠. 예를 들어 Reka Flash의 학습 코퍼스에는 5T 토큰 중 25%만이 웹 크롤 데이터였다고 하는데, 코드 관련 데이터 25%도 제외한 50%가 과연 어떤 데이터였을까 하는 생각이 있습니다.
DeepSeekMath와 DeepSeek-Coder-V2에서처럼 Common Crawl 내에서도 코드나 수학 관련 데이터를 발굴하는 작업은 여전히 의미가 있을 것 같습니다.
#dataset #corpus
OlympicArena: Benchmarking Multi-discipline Cognitive Reasoning for Superintelligent AI
(Zhen Huang, Zengzhi Wang, Shijie Xia, Xuefeng Li, Haoyang Zou, Ruijie Xu, Run-Ze Fan, Lyumanshan Ye, Ethan Chern, Yixin Ye, Yikai Zhang, Yuqing Yang, Ting Wu, Binjie Wang, Shichao Sun, Yang Xiao, Yiyuan Li, Fan Zhou, Steffi Chern, Yiwei Qin, Yan Ma, Jiadi Su, Yixiu Liu, Yuxiang Zheng, Shaoting Zhang, Dahua Lin, Yu Qiao, Pengfei Liu)
The evolution of Artificial Intelligence (AI) has been significantly accelerated by advancements in Large Language Models (LLMs) and Large Multimodal Models (LMMs), gradually showcasing potential cognitive reasoning abilities in problem-solving and scientific discovery (i.e., AI4Science) once exclusive to human intellect. To comprehensively evaluate current models' performance in cognitive reasoning abilities, we introduce OlympicArena, which includes 11,163 bilingual problems across both text-only and interleaved text-image modalities. These challenges encompass a wide range of disciplines spanning seven fields and 62 international Olympic competitions, rigorously examined for data leakage. We argue that the challenges in Olympic competition problems are ideal for evaluating AI's cognitive reasoning due to their complexity and interdisciplinary nature, which are essential for tackling complex scientific challenges and facilitating discoveries. Beyond evaluating performance across various disciplines using answer-only criteria, we conduct detailed experiments and analyses from multiple perspectives. We delve into the models' cognitive reasoning abilities, their performance across different modalities, and their outcomes in process-level evaluations, which are vital for tasks requiring complex reasoning with lengthy solutions. Our extensive evaluations reveal that even advanced models like GPT-4o only achieve a 39.97% overall accuracy, illustrating current AI limitations in complex reasoning and multimodal integration. Through the OlympicArena, we aim to advance AI towards superintelligence, equipping it to address more complex challenges in science and beyond. We also provide a comprehensive set of resources to support AI research, including a benchmark dataset, an open-source annotation platform, a detailed evaluation tool, and a leaderboard with automatic submission features.
고난이도 벤치마크가 하나 더 나왔군요. 11K 수준으로 문제 수도 꽤 많습니다. GPQA 같은 역할을 할 수 있을지 궁금하네요.
#benchmark
Prefixing Attention Sinks can Mitigate Activation Outliers for Large Language Model Quantization
(Seungwoo Son, Wonpyo Park, Woohyun Han, Kyuyeun Kim, Jaeho Lee)
Despite recent advances in LLM quantization, activation quantization remains to be challenging due to the activation outliers. Conventional remedies, e.g., mixing precisions for different channels, introduce extra overhead and reduce the speedup. In this work, we develop a simple yet effective strategy to facilitate per-tensor activation quantization by preventing the generation of problematic tokens. Precisely, we propose a method to find a set of key-value cache, coined CushionCache, which mitigates outliers in subsequent tokens when inserted as a prefix. CushionCache works in two steps: First, we greedily search for a prompt token sequence that minimizes the maximum activation values in subsequent tokens. Then, we further tune the token cache to regularize the activations of subsequent tokens to be more quantization-friendly. The proposed method successfully addresses activation outliers of LLMs, providing a substantial performance boost for per-tensor activation quantization methods. We thoroughly evaluate our method over a wide range of models and benchmarks and find that it significantly surpasses the established baseline of per-tensor W8A8 quantization and can be seamlessly integrated with the recent activation quantization method.
Attention Sink를 만들어 Quantization에 도움을 주겠다는 아이디어. Quantization Loss를 줄여주는 토큰들을 찾아낸 다음 이 토큰을 앞에 붙이고 파인튜닝을 하는 형태입니다. Attention Sink는 아웃라이어들의 위치만 옮겨주게 되지 않을까 싶었는데 꽤 의미가 있을 수 있는 것 같네요.
#quantization