arXiv:2410.14740cs.LGcs.DC2024-10被引 5

用旧显卡跑大模型,靠混合精度和多级缓存降碳省资源

Harnessing Your DRAM and SSD for Sustainable and Accessible LLM Inference with Mixed-Precision and Multi-level Caching

  • 将模型分块按重要性排序,动态调整精度减少计算量
  • 在3090上实现700亿参数模型推理,仅需24GB显存+64GB内存
  • 适合低预算、低碳排放需求的AI部署场景

尽管大语言模型(LLMs)表现出强大能力,但其庞大的参数量和计算需求使其成为当前人工智能应用中主要的碳排放来源。相比现代GPU如H100,使用老旧的M40 GPU可显著降低碳排放(仅为H100的三分之一)。然而,这类设备有限的高带宽内存(HBM)难以支撑大模型加载,例如700亿参数的LLaMA2模型通常需要128GB内存,远超3090的24GB HBM,即使加上64GB DRAM仍不可行。为此,本文提出M2Cache:一种结合模型模块化与混合精度的推理方法,通过动态稀疏混合精度量化降低计算与通信开销。同时引入三级缓存系统——HBM中的神经元级混合精度LRU缓存、DRAM中的层感知缓存、SSD中的完整模型存储,实现高效数据调度与低碳运行。

原文摘要 · Abstract (English)

Although Large Language Models (LLMs) have demonstrated remarkable capabilities, their massive parameter counts and associated extensive computing make LLMs' deployment the main part of carbon emission from nowadays AI applications. Compared to modern GPUs like H$100$, it would be significantly carbon-sustainable if we could leverage old-fashioned GPUs such as M$40$ (as shown in Figure 1, M$40$ only has one third carbon emission of H$100$'s) for LLM servings. However, the limited High Bandwidth Memory (HBM) available on such GPU often cannot support the loading of LLMs due to the gigantic model size and intermediate activation data, making their serving challenging. For instance, a LLaMA2 model with $70$B parameters typically requires $128$GB for inference, which substantially surpasses $24$GB HBM in a $3090$ GPU and remains infeasible even considering the additional $64$GB DRAM. To address this challenge, this paper proposes a mixed-precision with a model modularization algorithm to enable LLM inference on outdated hardware with resource constraints. (The precision denotes the numerical precision like FP16, INT8, INT4) and multi-level caching (M2Cache).) Specifically, our M2Cache first modulizes neurons in LLM and creates their importance ranking. Then, it adopts a dynamic sparse mixed-precision quantization mechanism in weight space to reduce computational demands and communication overhead at each decoding step. It collectively lowers the operational carbon emissions associated with LLM inference. Moreover, M2Cache introduces a three-level cache management system with HBM, DRAM, and SSDs that complements the dynamic sparse mixed-precision inference. To enhance communication efficiency, M2Cache maintains a neuron-level mixed-precision LRU cache in HBM, a larger layer-aware cache in DRAM, and a full model in SSD.

大模型推理低碳计算混合精度多级缓存

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。