用轻量模拟器让大模型在普通显卡上低成本微调
EMLoC: Emulator-based Memory-efficient Fine-tuning with LoRA Correction
- 构建小样本激活感知的压缩模拟器,替代原模型训练
- 380亿参数模型在24GB显卡上微调,仅需95GB内存的1/4
- 支持灵活压缩比,适合个人用户和资源受限场景
开源基础模型虽应用广泛,但针对特定任务的微调仍因内存开销过大而难以普及。本文提出EMLoC框架,通过在小型下游校准集上使用激活感知奇异值分解(SVD)构建轻量级任务特异性模拟器,基于该模拟器采用LoRA进行微调。为解决原模型与压缩模拟器间的偏差,设计新型补偿算法修正微调后的LoRA模块,使其可无缝合并至原始模型用于推理。该方法支持灵活压缩比并兼容标准训练流程。大量实验表明,其性能优于多个基线方法。尤为关键的是,不依赖量化技术即可在单张24GB消费级显卡上完成380亿参数模型的微调,原需95GB内存,显著降低个体用户模型适配门槛。
原文摘要 · Abstract (English)
Open-source foundation models have seen rapid adoption and development, enabling powerful general-purpose capabilities across diverse domains. However, fine-tuning large foundation models for domain-specific or personalized tasks remains prohibitively expensive for most users due to the significant memory overhead beyond that of inference. We introduce EMLoC, an Emulator-based Memory-efficient fine-tuning framework with LoRA Correction, which enables model fine-tuning within the same memory budget required for inference. EMLoC constructs a task-specific light-weight emulator using activation-aware singular value decomposition (SVD) on a small downstream calibration set. Fine-tuning then is performed on this lightweight emulator via LoRA. To tackle the misalignment between the original model and the compressed emulator, we propose a novel compensation algorithm to correct the fine-tuned LoRA module, which thus can be merged into the original model for inference. EMLoC supports flexible compression ratios and standard training pipelines, making it adaptable to a wide range of applications. Extensive experiments demonstrate that EMLoC outperforms other baselines across multiple datasets and modalities. Moreover, without quantization, EMLoC enables fine-tuning of a 38B model, which originally required 95GB of memory, on a single 24GB consumer GPU-bringing efficient and practical model adaptation to individual users.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。