27 Jun 2024 | Chris Cummins, Volker Seeker, Dejan Grubisic, Baptiste Rozière, Jonas Gehring, Gabriel Synnaeve, Hugh Leather
The paper introduces LLM Compiler, a suite of large language models (LLMs) specifically designed for code optimization tasks. These models are built on the foundation of CODE LLAMA and are trained on a vast corpus of 546 billion tokens of LLVM-IR and assembly code. The training process involves two stages: initial pretraining on compiler-centric data and instruction fine-tuning to predict the output and effect of optimizations. The models are released under a bespoke commercial license to facilitate wide reuse and are available in two sizes: 7 billion and 13 billion parameters.
The paper highlights the challenges of training LLMs for code optimization, which are resource-intensive and require substantial GPU hours and extensive data collection. LLM Compiler aims to address these issues by providing a scalable and cost-effective foundation for further research and development in compiler optimization. The models are evaluated on tasks such as flag tuning, disassembly, and next-token prediction, demonstrating significant improvements over prior works. For example, the models achieve 77% of the optimizing potential of an autotuning search and 45% disassembly round trip accuracy (14% exact match).
The paper also discusses the limitations of LLM Compiler, including the finite sequence length of inputs and the need for rigorous testing to ensure the accuracy of model outputs. Overall, LLM Compiler provides a robust and pre-trained platform for enhancing the understanding and manipulation of compiler intermediate representations and assembly language, making it a valuable resource for both academic researchers and industry practitioners.The paper introduces LLM Compiler, a suite of large language models (LLMs) specifically designed for code optimization tasks. These models are built on the foundation of CODE LLAMA and are trained on a vast corpus of 546 billion tokens of LLVM-IR and assembly code. The training process involves two stages: initial pretraining on compiler-centric data and instruction fine-tuning to predict the output and effect of optimizations. The models are released under a bespoke commercial license to facilitate wide reuse and are available in two sizes: 7 billion and 13 billion parameters.
The paper highlights the challenges of training LLMs for code optimization, which are resource-intensive and require substantial GPU hours and extensive data collection. LLM Compiler aims to address these issues by providing a scalable and cost-effective foundation for further research and development in compiler optimization. The models are evaluated on tasks such as flag tuning, disassembly, and next-token prediction, demonstrating significant improvements over prior works. For example, the models achieve 77% of the optimizing potential of an autotuning search and 45% disassembly round trip accuracy (14% exact match).
The paper also discusses the limitations of LLM Compiler, including the finite sequence length of inputs and the need for rigorous testing to ensure the accuracy of model outputs. Overall, LLM Compiler provides a robust and pre-trained platform for enhancing the understanding and manipulation of compiler intermediate representations and assembly language, making it a valuable resource for both academic researchers and industry practitioners.