[论文解读] Distilling Large Language Models into Tiny and Effective Students using pQRNN
该论文提出 pQRNN,一种极小、无需嵌入的神经编码器,在蒸馏 mBERT 等大型多语言预训练模型方面实现了最先进的效率。无需预训练,pQRNN 在语义解析任务上的表现优于使用预训练嵌入的 LSTMs,且在 mBERT 的 95.9–97.1% 性能范围内,同时模型大小缩小了 350 倍,展现出极高的参数效率和强大的蒸馏能力。
Large pre-trained multilingual models like mBERT, XLM-R achieve state of the art results on language understanding tasks. However, they are not well suited for latency critical applications on both servers and edge devices. It's important to reduce the memory and compute resources required by these models. To this end, we propose pQRNN, a projection-based embedding-free neural encoder that is tiny and effective for natural language processing tasks. Without pre-training, pQRNNs significantly outperform LSTM models with pre-trained embeddings despite being 140x smaller. With the same number of parameters, they outperform transformer baselines thereby showcasing their parameter efficiency. Additionally, we show that pQRNNs are effective student architectures for distilling large pre-trained language models. We perform careful ablations which study the effect of pQRNN parameters, data augmentation, and distillation settings. On MTOP, a challenging multilingual semantic parsing dataset, pQRNN students achieve 95.9\% of the performance of an mBERT teacher while being 350x smaller. On mATIS, a popular parsing task, pQRNN students on average are able to get to 97.1\% of the teacher while again being 350x smaller. Our strong results suggest that our approach is great for latency-sensitive applications while being able to leverage large mBERT-like models.
研究动机与目标
- 开发一种高度参数高效的学生成为蒸馏大型预训练多语言语言模型的模型。
- 消除对词元嵌入的需求,从而减小模型大小并降低计算开销。
- 在参数和推理成本极低的情况下,实现在语义解析任务上的高性能。
- 实现从大型教师模型(如 mBERT)到小型高效学生模型的有效知识蒸馏。
- 证明 pQRNN 可在模型大幅缩小的同时,达到教师模型 95% 以上的性能。
提出的方法
- pQRNN 采用基于投影的架构,直接从输入文本学习词元表示,避免使用可学习的词元嵌入。
- 模型采用参数高效的投影机制,结合准循环神经网络(QRNN)结构进行序列建模。
- 通过在微调后的 mBERT 教师模型生成的软标签(logits)上训练 pQRNN 学生模型,实现知识蒸馏。
- 引入数据增强策略,以提升学生模型的泛化能力和性能。
- 通过 8 位量化实现模型压缩,在几乎不损失准确率的情况下减小模型大小。
- 该方法实现了教师与学生模型的解耦演化,使学生模型可针对特定任务进行优化。
实验结果
研究问题
- RQ1无嵌入的神经编码器是否能在显著小于标准模型的前提下,在自然语言处理任务上实现高性能?
- RQ2pQRNN 作为从 mBERT 等大型预训练模型蒸馏知识的学生架构,其有效性如何?
- RQ3pQRNN 的超参数、数据增强策略以及蒸馏设置对最终性能有何影响?
- RQ4极小的 pQRNN 模型在多语言语义解析任务上,能在多大程度上匹配大型 mBERT 教师模型的性能?
- RQ5pQRNN 是否能在将模型大小缩小 350 倍的同时保持高准确率,从而适用于对延迟敏感的边缘应用场景?
主要发现
- 在 MTOP 数据集上,pQRNN 学生模型的性能达到 mBERT 教师模型的 95.9%,同时模型大小缩小了 350 倍。
- 在 mATIS 数据集上,pQRNN 学生模型的平均性能达到 mBERT 教师模型的 97.1%,同样实现了 350 倍的大小压缩。
- 无需预训练,pQRNN 的性能优于使用预训练嵌入的 LSTMs,尽管其模型大小仅为后者的 1/140。
- 在相同参数量下,pQRNN 的性能优于 Transformer 基线模型,展现出更优的参数效率。
- 所提出的增强策略进一步提升了学生模型的质量与鲁棒性。
- 即使在 8 位量化下,pQRNN 仍能保持优异性能,证实其适用于资源受限的部署场景。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。