面向可分解任务的高效编码器-解码器 Transformer 解码
Efficient Encoder-Decoder Transformer Decoding for Decomposable Tasks
AI总结:
本文提出一种名为 PiD 的编码器-解码器模型新配置,通过一次编码输入并并行解码多个输出,显著提升了可分解任务的训练与推理效率,在多项任务中实现高达4.6倍加速且性能相当或更优。
摘要:
基于 Transformer 的 NLP 模型功能强大,但计算成本高,限制了部署。微调的编码器-解码器模型在专业领域很流行,并且可以胜过更大的、更通用的仅解码器模型,例如 GPT-4。我们引入了一种用于编码器-解码器模型的新配置,该配置提高了结构化输出和可分解任务的效率,在这些任务中,单个共享输入需要多个输出。我们的方法,prompt-in-decoder (PiD),对输入进行一次编码并并行解码输出,通过避免重复的输入编码并通过共享输入键值缓存来增加解码过程的操作强度(算术运算数量与内存访问的比率),从而提高了训练和推理效率。我们实现的计算减少大致与子任务数量成比例,在对话状态跟踪、摘要和问答任务中,比最先进的模型获得了高达 4.6 倍的加速,且性能相当或更好。
英文摘要:
Transformer-based NLP models are powerful but have high computational costs that limit deployment. Finetuned encoder-decoder models are popular in specialized domains and can outperform larger more generalized decoder-only models, such as GPT-4. We introduce a new configuration for encoder-decoder models that improves efficiency on structured output and decomposable tasks where multiple outputs are required for a single shared input. Our method, prompt-in-decoder (PiD), encodes the input once and decodes the output in parallel, boosting both training and inference efficiency by avoiding duplicate input encoding and increasing the operational intensity (ratio of numbers of arithmetic operation to memory access) of decoding process by sharing the input key-value cache. We achieve computation reduction that roughly scales with the number of subtasks, gaining up to 4.6x speed-up over state-of-the-art models for dialogue state tracking, summarization, and question-answering tasks, with comparable or better performance.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。