Astraios:參數高效的指導調整代碼大型語言模型
Astraios: Parameter-Efficient Instruction Tuning Code Large Language Models
January 1, 2024
作者: Terry Yue Zhuo, Armel Zebaze, Nitchakarn Suppattarachai, Leandro von Werra, Harm de Vries, Qian Liu, Niklas Muennighoff
cs.AI
摘要
對於大型語言模型(LLMs)的全參數微調(FFT)成本高昂,因此出現了一系列參數高效微調(PEFT)方法。然而,目前仍不清楚在不同模型規模下,哪些方法提供了最佳的成本效能平衡。我們介紹了Astraios,這是一套包含28個經過指令調整的OctoCoder模型,使用7種微調方法和4種模型規模,最高達到160億個參數。通過對5個任務和8個不同數據集的研究,涵蓋了代碼理解和代碼生成任務,我們發現在各種規模下,FFT通常會帶來最佳的下游性能,而基於模型規模,PEFT方法在效能上存在顯著差異。LoRA通常提供了成本和性能之間最有利的平衡。進一步研究這些方法對模型的穩健性和代碼安全性的影響發現,較大的模型往往表現出較低的穩健性和較差的安全性。最後,我們探討了更新參數、交叉熵損失和任務性能之間的關係。我們發現在小型模型中觀察到的微調效果在較大模型中也有很好的泛化性,而指令調整中的驗證損失可以作為整體下游性能的可靠指標。
English
The high cost of full-parameter fine-tuning (FFT) of Large Language Models
(LLMs) has led to a series of parameter-efficient fine-tuning (PEFT) methods.
However, it remains unclear which methods provide the best cost-performance
trade-off at different model scales. We introduce Astraios, a suite of 28
instruction-tuned OctoCoder models using 7 tuning methods and 4 model sizes up
to 16 billion parameters. Through investigations across 5 tasks and 8 different
datasets encompassing both code comprehension and code generation tasks, we
find that FFT generally leads to the best downstream performance across all
scales, and PEFT methods differ significantly in their efficacy based on the
model scale. LoRA usually offers the most favorable trade-off between cost and
performance. Further investigation into the effects of these methods on both
model robustness and code security reveals that larger models tend to
demonstrate reduced robustness and less security. At last, we explore the
relationships among updated parameters, cross-entropy loss, and task
performance. We find that the tuning effectiveness observed in small models
generalizes well to larger models, and the validation loss in instruction
tuning can be a reliable indicator of overall downstream performance.