压缩语言模型词表,提升低算力环境运行效率
LLM Vocabulary Compression for Low-Compute Environments
- 按BPE合并规则分组词元,避免生成高内存对数张量
- 内存占用降低3.4倍,推理速度最高提升3倍
- 适合资源受限设备部署,性能接近GPT-2/GPT-Neo
我们提出一种压缩语言模型最后线性层的方法,通过基于字节对编码(BPE)合并规则对词元进行分组,避免生成高内存消耗的对数张量,从而将内存使用量最多降低3.4倍,且性能损失可忽略。在TinyStories数据集上的评估表明,该方法性能与GPT-Neo和GPT2相当,同时推理吞吐量最高提升3倍,适用于低算力环境。
原文摘要 · Abstract (English)
We present a method to compress the final linear layer of language models, reducing memory usage by up to 3.4x without significant performance loss. By grouping tokens based on Byte Pair Encoding (BPE) merges, we prevent materialization of the memory-intensive logits tensor. Evaluations on the TinyStories dataset show that our method performs on par with GPT-Neo and GPT2 while significantly improving throughput by up to 3x, making it suitable for low-compute environments.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。