arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2002.05645cs.LGcs.DCstat.ML
收藏

用一种新的执行算法训练具有常数记忆的大型神经网络

Training Large Neural Networks with Constant Memory using a New Execution Algorithm

Microsoft(微软)

Bharadwaj Pudipeddi, Maral Mesmakhosroshahi, Jinwen Xi, Sujeeth Bharadwaj

摘要:

广泛流行的基于transformer的NLP模型,如BERT和Turing-NLG,具有数十亿参数的巨大容量。当前的执行方法需要暴力资源,如HBM设备和高速互连性,以实现数据并行。在本文中,我们介绍了一种新的中继式执行技术,称为L2 L(层到层),在任何给定的时刻,设备内存主要只填充执行层的足迹。该模型驻留在DRAM存储器中,该存储器连接到CPU或FPGA,作为我们称之为渴望参数服务器(EPS)的实体。为了克服在EPS中来回穿梭参数的带宽问题,该模型在许多微批中一次执行一层,而不是在整个模型上执行小批的传统方法。L2 L使用16 GB V100设备实现,用于BERT-Large运行它,设备批量大小高达256。我们的研究结果表明,减少45%的内存和40%的吞吐量增加相比,国家的最先进的基线。L2 L还能够在具有单个16 GB V100和512 GB CPU内存的机器上适应多达500亿个参数的模型,而无需任何模型分区。L2 L可以扩展到任意深度,使研究人员能够在负担得起的设备上进行开发,这是实现人工智能民主化的一大步。通过在主机EPS中运行优化器,我们展示了一种新形式的混合精度,以实现更快的吞吐量和收敛。此外,EPS通过在迭代中改变层来实现动态神经架构方法。最后,我们还提出并证明了一个恒定的内存变化的L2 L,我们提出了未来的增强。这项工作首先在GPU上进行,但也针对所有高TFLOPS/Watt加速器。

英文摘要:

Widely popular transformer-based NLP models such as BERT and Turing-NLG have enormous capacity trending to billions of parameters. Current execution methods demand brute-force resources such as HBM devices and high speed interconnectivity for data parallelism. In this paper, we introduce a new relay-style execution technique called L2L (layer-to-layer) where at any given moment, the device memory is primarily populated only with the executing layer(s)'s footprint. The model resides in the DRAM memory attached to either a CPU or an FPGA as an entity we call eager param-server (EPS). To overcome the bandwidth issues of shuttling parameters to and from EPS, the model is executed a layer at a time across many micro-batches instead of the conventional method of minibatches over whole model. L2L is implemented using 16GB V100 devices for BERT-Large running it with a device batch size of up to 256. Our results show 45% reduction in memory and 40% increase in the throughput compared to the state-of-the-art baseline. L2L is also able to fit models up to 50 Billion parameters on a machine with a single 16GB V100 and 512GB CPU memory and without requiring any model partitioning. L2L scales to arbitrary depth allowing researchers to develop on affordable devices which is a big step toward democratizing AI. By running the optimizer in the host EPS, we show a new form of mixed precision for faster throughput and convergence. In addition, the EPS enables dynamic neural architecture approaches by varying layers across iterations. Finally, we also propose and demonstrate a constant memory variation of L2L and we propose future enhancements. This work has been performed on GPUs first, but also targeted towards all high TFLOPS/Watt accelerators.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑