Offsite-Tuning: Transfer Learning without Full Model
Abstract
Transfer learning is important for foundation models to adapt to downstream tasks. However, many foundation models are proprietary, so users must share their data with model owners to fine-tune the models, which is costly and raise privacy concerns. Moreover, fine-tuning large foundation models is computation-intensive and impractical for most downstream users. In this paper, we propose Offsite-Tuning, a privacy-preserving and efficient transfer learning framework that can adapt billion-parameter foundation models to downstream data without access to the full model. In offsite-tuning, the model owner sends a light-weight adapter and a lossy compressed emulator to the data owner, who then fine-tunes the adapter on the downstream data with the emulator's assistance. The fine-tuned adapter is then returned to the model owner, who plugs it into the full model to create an adapted foundation model. Offsite-tuning preserves both parties' privacy and is computationally more efficient than the existing fine-tuning methods that require access to the full model weights. We demonstrate the effectiveness of offsite-tuning on various large language and vision foundation models. Offsite-tuning can achieve comparable accuracy as full model fine-tuning while being privacy-preserving and efficient, achieving 6.5x speedup and 5.6x memory reduction. Code is available at https://github.com/mit-han-lab/offsite-tuning.
Empirical ResultsBrowse all benchmarks →
| Benchmark | Method | Metric | Score | Protocol / Evidence |
|---|---|---|---|---|
| GPT2-XL · Fine-tuning efficiency on GPT2-XL | Offsite-Tuning + LoRA (OT (2-16-2) + LoRA) | Throughput | 6257 tokens per second | fine-tuned · gpu=A6000 · batch-size=1 · sequence-length=512 · ot-configuration=2-16-2Source quoteL301: + LoRA │ 6257 │ 7155 |
| GPT2-XL · Fine-tuning efficiency on GPT2-XL | Offsite-Tuning + LoRA (OT (2-16-2) + LoRA) | Peak memory | 7155 MB-32767 vs baseline | fine-tuned · gpu=A6000 · batch-size=1 · sequence-length=512 · ot-configuration=2-16-2Source quoteL301: + LoRA │ 6257 │ 7155 |
| Flowers | Offsite-Tuning OT Plug-in (EVA-ViT-G) | Accuracy | 99.33% | fine-tuned · backbone=EVA-ViT-G · configuration=4-22-4 DistillSource quoteL224: OT Plug-in │ 99.33 │ 94.99 │ 95.33 │ 96.48 │ 99.63 │ 94.21 |
Reported baseline / comparator measurements (2)
| Benchmark | Method | Metric | Score | Protocol / Evidence |
|---|---|---|---|---|
| GPT2-XL · Fine-tuning efficiency on GPT2-XL | Full fine-tuning (FT) baseline | Peak memory | 39922 MB | fine-tuned · gpu=A6000 · batch-size=1 · sequence-length=512Source quoteL297: \multirow{4}{*}{GPT2-XL} │ FT │ 957 │ 39922 |
| Flowers | Full fine-tuning (FT; EVA-ViT-G) baseline | Accuracy | 99.59% | fine-tuned · backbone=EVA-ViT-G · configuration=4-22-4 DistillSource quoteL222: FT │ 99.59 │ 95.77 │ 95.43 │ 95.80 │ 99.39 │ 93.96 |
BibTeX
@misc{xiao2023offsite,
author = {Guangxuan Xiao and Ji Lin and Song Han},
title = {{Offsite-Tuning: Transfer Learning without Full Model}},
year = {2023},
eprint = {2302.04870},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2302.04870},
}Ask Althea to put this paper to the test.
Loading related content...