EMLoC: Emulator-based Memory-efficient Fine-tuning with LoRA Correction

Hsi-Che Lin, Yu-Chu Yu, Kai-Po Chang, Yu-Chiang Frank Wang

Abstract

Fine-tuning large foundation models is often constrained by high GPU memory requirements for optimizer states and activations, even when using parameter-efficient methods like LoRA. We present EMLoC (Emulator-based Memory-efficient Fine-tuning with LoRA Correction), a framework that enables fine-tuning within the same memory budget as inference. By constructing a lightweight "emulator" via activation-aware Singular Value Decomposition (SVD) and applying a novel LoRA correction algorithm, EMLoC allows a 38B parameter model to be fine-tuned on a single 24GB consumer GPU—a task that typically requires nearly 100GB of VRAM.

The Memory Bottleneck in Fine-tuning

Fine-tuning large foundation models has traditionally been a resource-intensive task. While inference (running a model) might fit on a consumer GPU, fine-tuning requires significantly more memory to store optimizer states and intermediate activations. Even with Parameter-Efficient Fine-Tuning (PEFT) methods like LoRA, the frozen model weights themselves remain a massive bottleneck.

Comparison of GPU memory usage across different model scales and the EMLoC approach.

As shown in Figure 1, users are often forced to choose between using a smaller, less capable model that fits their hardware or forgoing fine-tuning altogether. EMLoC addresses this by answering the question: Can we design a strategy where the memory budget for fine-tuning is identical to the budget for inference?

The EMLoC Framework

The EMLoC framework operates in three distinct stages to bridge the gap between inference and fine-tuning memory requirements.

The three-stage pipeline of EMLoC: Emulator Construction, Fine-tuning, and LoRA Correction.

1. Downstream-aware Emulator Construction

Instead of training on the full model, EMLoC creates a lightweight "emulator." It employs activation-aware Singular Value Decomposition (SVD) on a small subset of the target data (calibration set). This process compresses the original weight matrices into a low-rank factored form, drastically reducing the memory occupied by the model parameters.

2. Emulator Fine-tuning

Standard LoRA fine-tuning is performed on this compressed emulator. Because the emulator is significantly smaller than the original model, the total memory footprint—including parameters, activations, and optimizer states—stays within the original inference budget.

3. LoRA Correction

Because the emulator is a compressed approximation, LoRA weights learned on it are not directly compatible with the original, full-sized model. EMLoC introduces a novel compensation algorithm that re-parameterizes the LoRA modules and adjusts them to account for the "misalignment" between the emulator and the original weights. This mathematical alignment leverages the linear nature of the compression error to precisely shift the LoRA modules.

Experimental Evaluation

The authors evaluated EMLoC across multiple modalities to demonstrate its versatility:

  • Visual Question Answering (VQA): Tested on ChartQA, DocVQA, InfoVQA, TextVQA, and specialized domains like PMC-VQA (medical) and WebSRC.
  • Language Modeling: Evaluated on mathematical reasoning tasks using MathQA and GSM8K.
  • Image Generation: Demonstrated personalization tasks using the DreamBooth dataset on the 12B parameter FLUX.1-dev diffusion model.

Key Insights and Results

  • Hardware Accessibility: EMLoC enabled the fine-tuning of an InternVL2.5-38B model (typically requiring ~95GB of VRAM) on a single 24GB RTX 3090/4090 GPU.
  • Performance Parity: In VQA tasks, EMLoC consistently outperformed other memory-efficient baselines like Offsite-Tuning and UPop, achieving results nearly identical to full-model fine-tuning.
  • Efficiency: The overhead is minimal. For an 8B model, emulator construction takes approximately 18 minutes, while the correction step takes only 20 seconds.
  • Downstream Awareness: Unlike generic compression, building the emulator using activations from the target task ensures that the compressed model preserves the knowledge most relevant to the fine-tuning process.

Limitations and Future Directions

While EMLoC significantly lowers the barrier to fine-tuning, some limitations remain. The current SVD-based approach preserves output behavior but may not perfectly capture training dynamics like gradient directions. Future work could explore compression strategies designed specifically to preserve "trainability." Additionally, the current correction algorithm is tailored to the linear nature of LoRA; extending this to non-linear PEFT methods remains an open research challenge.

Summary updated

BibTeX
@inproceedings{lin2025emloc,
  author = {Hsi-Che Lin and Yu-Chu Yu and Kai-Po Chang and Yu-Chiang Frank Wang},
  title = {{EMLoC: Emulator-based Memory-efficient Fine-tuning with LoRA Correction}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=vqaWAmuzRt},
}
Figure