PreFT:仅前缀微调用于高效的推理
PreFT: Prefill-only finetuning for efficient inference
AI总结:
本文提出PreFT,通过仅在前缀阶段应用适配器以提高多适配器服务的吞吐量,实验显示其在不同任务中均优于传统PEFT。
摘要:
大型语言模型现在可以利用参数高效的微调方法(PEFTs)在大规模上进行高效个性化,但服务用户特定的PEFTs会损害吞吐量,即使使用了专门的内核和内存管理技术。这是因为,理论上和实证上,前缀(一次处理大量标记)和解码(生成单个标记自回归)之间存在不匹配:后者在服务多个适配器时吞吐量显著降低。为此,我们提出PreFT(仅前缀微调),仅在前缀标记上应用适配器并在之后丢弃它。PreFT在最小影响性能的情况下显著提高了吞吐量。我们开发并发布了两种仅前缀的PEFTs(LoRA和ReFT)在vLLM推理引擎上的高效实现。我们首先展示服务多用户PreFTs比传统PEFTs更高效(在服务512个适配器时,Llama 3.1 70B的吞吐量提高了1.9倍)。然后,我们在各种监督微调和强化学习任务中比较仅前缀适配器与全标记适配器的性能。在SFT中,我们发现PreFTs的评估损失高于PEFTs,但通过增加秩几乎不减少吞吐量即可补偿。在RL中,我们一致发现PreFTs与标准PEFTs相当。总的来说,这项工作验证了LLMs的仅前缀适应作为比现有PEFTs更优的准确率-吞吐量权衡。
英文摘要:
Large language models can now be personalised efficiently at scale using parameter efficient finetuning methods (PEFTs), but serving user-specific PEFTs harms throughput, even with specialised kernels and memory management techniques. This is because, theoretically and empirically, a mismatch exists between prefill (processing a large number of tokens at once) and decode (generating a single token autoregressively): the latter has far lower throughput when serving multiple adapters. Rather than optimising performance relative to parameter count, for efficient multi-adapter serving, we instead ought to optimise performance relative to serving throughput. We therefore propose PreFT (Prefill-only Finetuning), wherein we only apply the adapter to prefill tokens and discard it afterwards. PreFT significantly increases throughput with minimal effect on performance. We develop and release an efficient implementation of two prefill-only PEFTs, LoRA and ReFT, on the vLLM inference engine. We first show that serving multi-user PreFTs is more efficient than traditional PEFTs ($1.9\times$ the throughput when serving $512$ adapters on Llama 3.1 70B). Then, we compare the performance of prefill-only vs. all-token adapters on a variety of supervised finetuning and reinforcement learning tasks with LMs at varying scales. On SFT, we observe that the evaluation loss of PreFTs is higher than PEFTs, but can be compensated by increasing rank with nearly no reduction in throughput. On RL, we consistently find that PreFTs approach parity with standard PEFTs. Together, this work validates prefill-only adaptation of LLMs as a more favourable accuracy-throughput tradeoff than existing PEFTs for personalised serving.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。