用小型神经网络高效估算指令微调数据影响,速度提升99%且不损失精度。
Neural Networks for Learnable and Scalable Influence Estimation of Instruction Fine-Tuning Data
- 用小型神经网络替代大模型计算数据影响值,降低计算成本。
- 模型仅需原模型0.0027%大小(7B/8B级),仍保持高准确率。
- 适用于大规模数据筛选,尤其适合资源有限的指令微调场景。
影响力函数为模型训练提供关键洞察,但现有方法计算开销大且泛化能力差。近期工作虽提出多种基于语言模型的数据影响力度量算法,但在大模型和大数据集上难以扩展,主要受限于高昂的前向与反向传播开销、存储大模型所需的巨大内存,以及对新数据的影响力估计泛化性不佳。本文提出使用小型神经网络(称作InfluenceNetwork)来估算影响力值,实现最高达99%的成本降低。实验表明,影响力值可由仅相当于完整语言模型0.0027%大小的模型(我们使用7B和8B版本)准确估计。我们将该算法(命名为NN-CIFT:Neural Networks for efficient Instruction Fine-Tuning)应用于通用指令微调中的子集选择任务。研究中对比了四种前沿影响力函数,结果表明,尽管速度显著提升,NN-CIFT在性能上无明显下降。本文还对NN-CIFT进行了深入的超参数分析。代码已开源:https://github.com/agarwalishika/NN-CIFT。
原文摘要 · Abstract (English)
Influence functions provide crucial insights into model training, but existing methods suffer from large computational costs and limited generalization. Particularly, recent works have proposed various metrics and algorithms to calculate the influence of data using language models, which do not scale well with large models and datasets. This is because of the expensive forward and backward passes required for computation, substantial memory requirements to store large models, and poor generalization of influence estimates to new data. In this paper, we explore the use of small neural networks -- which we refer to as the InfluenceNetwork -- to estimate influence values, achieving up to 99% cost reduction. Our evaluation demonstrates that influence values can be estimated with models just 0.0027% the size of full language models (we use 7B and 8B versions). We apply our algorithm of estimating influence values (called NN-CIFT: Neural Networks for effiCient Instruction Fine-Tuning) to the downstream task of subset selection for general instruction fine-tuning. In our study, we include four state-of-the-art influence functions and show no compromise in performance, despite large speedups, between NN-CIFT and the original influence functions. We provide an in-depth hyperparameter analyses of NN-CIFT. The code for our method can be found here: https://github.com/agarwalishika/NN-CIFT.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。