We present LLMQ, an end-to-end CUDA/C++ implementation for medium-sized language-model training, e.g. 3B to 32B parameters, on affordable, commodity GPUs. These devices are characterized by low memory availability and slow communication compared to datacentre-grade GPUs. Consequently, we showcase a range of optimizations that target these bottlenecks, including activation checkpointing, offloading, and copy-engine based collectives. LLMQ is able to train or fine-tune a 7B model on a single 16GB mid-range gaming card, or a 32B model on a workstation equipped with 4 RTX 4090s. This is achieved while executing a standard 8-bit training pipeline, without additional algorithmic approximations, and maintaining FLOP utilization of around 50%. The efficiency of LLMQ rivals that of production-scale systems on much more expensive cloud-grade GPUs.


翻译:我们提出了LLMQ,一种面向中等规模语言模型(例如30亿至320亿参数)训练的端到端CUDA/C++实现方案,可在价格亲民的消费级GPU上运行。相较于数据中心级GPU,此类设备具有内存容量有限与通信速度较慢的特点。为此,我们展示了一系列针对这些瓶颈的优化技术,包括激活检查点、卸载以及基于复制引擎的集合通信。LLMQ能够在单张16GB中端游戏显卡上训练或微调70亿参数模型,或在配备4张RTX 4090显卡的工作站上训练320亿参数模型。这些成果通过执行标准的8位训练流程实现,无需额外的算法近似处理,并保持约50%的浮点运算利用率。LLMQ的效率可与运行在昂贵得多的云级GPU上的生产级系统相媲美。

0
下载
关闭预览

相关内容

【CVPR2023】DynamicDet:目标检测的统一动态架构
专知会员服务
26+阅读 · 2023年4月15日
NLG任务评价指标BLEU与ROUGE
AINLP
21+阅读 · 2020年5月25日
GitHub超9千星:一个API调用27个NLP预训练模型
新智元
17+阅读 · 2019年7月22日
Seq2seq强化学习实战 (Pytorch, Tensorflow, Theano)
专知
15+阅读 · 2018年1月16日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员