LLMBox: A Comprehensive Library for Large Language Models
Tianyi Tang, Yiwen Hu, Bingqian Li, Wenyang Luo, Zijing Qin, Haoxiang Sun, Jiapeng Wang, Shiyi Xu, Xiaoxue Cheng, Geyang Guo, Han Peng, Bowen Zheng, Yiru Tang, Yingqian Min, Yushuo Chen, Jie Chen, Yuanqian Zhao, Luran Ding, Yuhao Wang, Zican Dong, Chunxuan Xia, Junyi Li, Kun Zhou, Wayne Xin Zhao, Ji-Rong Wen
TL;DR
LLMBox tackles reproducibility and fair comparison in large language model research by delivering a unified library for training, utilization, and evaluation. It introduces a unified data interface, a broad evaluation suite across 18 tasks and 56 datasets, and practical usability features (GPU memory calculator, prefix caching, packing) to streamline experimentation. The framework supports diverse training methods (pre-training, instruction tuning, human alignment) with efficiency mechanisms (LoRA/QLoRA, DeepSpeed, packing) and domain adaptation capabilities, validated by extensive experiments demonstrating effectiveness and efficiency. By enabling reproducible pipelines and cross-model comparisons, LLMBox stands to accelerate research and deployment of LLMs.
Abstract
To facilitate the research on large language models (LLMs), this paper presents a comprehensive and unified library, LLMBox, to ease the development, use, and evaluation of LLMs. This library is featured with three main merits: (1) a unified data interface that supports the flexible implementation of various training strategies, (2) a comprehensive evaluation that covers extensive tasks, datasets, and models, and (3) more practical consideration, especially on user-friendliness and efficiency. With our library, users can easily reproduce existing methods, train new models, and conduct comprehensive performance comparisons. To rigorously test LLMBox, we conduct extensive experiments in a diverse coverage of evaluation settings, and experimental results demonstrate the effectiveness and efficiency of our library in supporting various implementations related to LLMs. The detailed introduction and usage guidance can be found at https://github.com/RUCAIBox/LLMBox.
