arXiv:2412.20382cs.CLcs.AI2024-12被引 4

用自然语言指导微调,少数据也能高效提升大模型表现

Natural Language Fine-Tuning

  • 用自然语言作为微调信号,直接作用于每个词元输出
  • 仅50条数据就比SFT高219%准确率,节省超78%时间和92%空间
  • 适合资源受限场景,如边缘计算下的快速模型定制

大型语言模型微调通常依赖大量标注数据、外部引导或反馈(如人类对齐、标量奖励、示范)。但在实际应用中,特定知识稀缺给现有微调技术带来前所未有的挑战。本文针对小样本领域微调任务,首次提出自然语言微调(NLFT),利用目标语言模型的强语言理解能力,将自然语言作为指导信息附加到词元级输出上,并通过概率计算识别关键词元。由于有效利用了语言信息,NLFT显著降低训练成本,大幅提升训练效率,在准确率、省时和资源节约方面全面优于强化学习微调算法。宏观上看,NLFT可视为SFT的细粒度词元级优化,无需预热即可高效替代SFT(而ReFT需多轮预热)。相比SFT,NLFT算法复杂度不变,维持O(n)。在GSM8K数据集上的大量实验表明,仅用50个样本,NLFT的准确率提升超过SFT 219%;相比ReFT,时间复杂度降低78.27%,空间复杂度降低92.24%。该技术为资源受限环境下各类创新大模型微调应用的部署铺平道路。代码已开源:https://github.com/Julia-LiuJ/NLFT。

原文摘要 · Abstract (English)

Large language model fine-tuning techniques typically depend on extensive labeled data, external guidance, and feedback, such as human alignment, scalar rewards, and demonstration. However, in practical application, the scarcity of specific knowledge poses unprecedented challenges to existing fine-tuning techniques. In this paper, focusing on fine-tuning tasks in specific domains with limited data, we introduce Natural Language Fine-Tuning (NLFT), which utilizes natural language for fine-tuning for the first time. By leveraging the strong language comprehension capability of the target LM, NLFT attaches the guidance of natural language to the token-level outputs. Then, saliency tokens are identified with calculated probabilities. Since linguistic information is effectively utilized in NLFT, our proposed method significantly reduces training costs. It markedly enhances training efficiency, comprehensively outperforming reinforcement fine-tuning algorithms in accuracy, time-saving, and resource conservation. Additionally, on the macro level, NLFT can be viewed as a token-level fine-grained optimization of SFT, thereby efficiently replacing the SFT process without the need for warm-up (as opposed to ReFT requiring multiple rounds of warm-up with SFT). Compared to SFT, NLFT does not increase the algorithmic complexity, maintaining O(n). Extensive experiments on the GSM8K dataset demonstrate that NLFT, with only 50 data instances, achieves an accuracy increase that exceeds SFT by 219%. Compared to ReFT, the time complexity and space complexity of NLFT are reduced by 78.27% and 92.24%, respectively. The superior technique of NLFT is paving the way for the deployment of various innovative LLM fine-tuning applications when resources are limited at network edges. Our code has been released at https://github.com/Julia-LiuJ/NLFT.

微调小样本自然语言边缘计算

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。