用稀疏自编码器精选数据,让小模型在特定领域表现更优。
FineScope : SAE-guided Data Selection Enables Domain Specific LLM Pruning and Finetuning
- 通过SAE提取领域专属数据子集,指导模型剪枝与微调。
- 剪枝后模型经自数据蒸馏,恢复超70%原始性能。
- 适合资源有限但需高精度领域模型的研发者。
从头训练大语言模型(LLM)需要巨大算力,促使人们关注构建更小、更具领域特性的高效模型。以LLaMA等中等规模模型为起点进行领域适配时,往往在专业数据集上出现准确率下降。本文提出FineScope框架,从预训练大模型中生成紧凑且领域优化的LLM。该框架利用稀疏自编码器(SAE)提取大规模数据中的领域相关子集,结合领域约束的结构化剪枝,确保剪枝后模型保留关键领域知识。为进一步提升性能,对剪枝模型进行自数据蒸馏,使用SAE筛选的数据集恢复剪枝过程中丢失的关键信息。大量实验与消融研究显示,FineScope在领域任务上表现优异,超越多个大型先进LLM。结果表明,剪枝模型经SAE数据微调后可恢复超过70%的原始性能;同时,将这些数据用于未剪枝的预训练模型微调,也能显著提升其领域准确性,验证了方法的鲁棒性。
原文摘要 · Abstract (English)
Training large language models (LLMs) from scratch requires significant computational resources, driving interest in developing smaller, domain-specific LLMs that maintain both efficiency and strong task performance. Medium-sized models such as LLaMA, llama} have served as starting points for domain-specific adaptation, but they often suffer from accuracy degradation when tested on specialized datasets. We introduce FineScope, a framework for deriving compact, domain-optimized LLMs from larger pretrained models. FineScope leverages the Sparse Autoencoder (SAE) framework, inspired by its ability to produce interpretable feature representations, to extract domain-specific subsets from large datasets. We apply structured pruning with domain-specific constraints, ensuring that the resulting pruned models retain essential knowledge for the target domain. To further enhance performance, these pruned models undergo self-data distillation, leveraging SAE-curated datasets to restore key domain-specific information lost during pruning. Extensive experiments and ablation studies demonstrate that FineScope achieves highly competitive performance, outperforming several large-scale state-of-the-art LLMs in domain-specific tasks. Additionally, our results show that FineScope enables pruned models to regain a substantial portion of their original performance when fine-tuned with SAE-curated datasets. Furthermore, applying these datasets to fine-tune pretrained LLMs without pruning also improves their domain-specific accuracy, highlighting the robustness of our approach.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。