Abstract
Offsite-Tuning is a framework designed to enable the fine-tuning of massive, proprietary foundation models on private data without compromising model ownership or data privacy. By utilizing a "sandwich" of trainable adapters and a compressed "emulator," this method allows users to perform local adaptation without access to full model weights. It achieves performance comparable to full fine-tuning while providing a 6.5x speedup and a 5.6x reduction in memory requirements.
Introduction: The Privacy and Compute Wall
In the era of foundation models like GPT-4 and CLIP, two major hurdles prevent widespread accessibility for specialized tasks. First, model owners protect their weights as intellectual property, while data owners (such as hospitals) cannot upload sensitive data to third-party APIs. Second, the massive compute requirements for fine-tuning billion-parameter models are beyond the reach of most researchers.
Existing solutions like Federated Learning protect data but still require the full model, while parameter-efficient methods like LoRA require access to frozen weights to compute gradients. Offsite-Tuning addresses these gaps by decoupling the training process from the full model backbone.
Methods: The Sandwich Adapter and Emulator
Offsite-Tuning splits the model into two distinct parts: a small, trainable Adapter and a large, frozen backbone. The workflow functions as a secure exchange between the model owner and the user.
- The Sandwich Adapter: The model owner selects a few layers from the beginning and the end of the full model to create a trainable adapter.
- The Emulator: To allow the user to train these adapters without the full model, the owner creates a lossy, compressed version of the middle layers (the "emulator") using Uniform Layer-drop and Knowledge Distillation.
- Offsite Training: The user receives only the Adapter and the Emulator. They fine-tune the adapter on local data; the emulator provides "rough" gradients accurate enough for effective updates.
- The Plug-in: The user returns the tiny, fine-tuned adapter to the model owner, who plugs it back into the original, full-scale model for inference.
Datasets and Evaluation
The researchers evaluated Offsite-Tuning across language and vision domains:
- Language: Using GPT-2, OPT (up to 6.7B), and BLOOM (7.1B), the framework was tested on benchmarks like WikiText-2 and eight fine-tuning tasks including OpenBookQA, PIQA, and ARC.
- Vision: They tested CLIP and EVA on fine-grained classification datasets such as Flowers, Cars, Pets, and CIFAR-100.
Key Insights and Ideas
- The "Sandwich" Strategy: Including both the earliest layers (low-level features) and latest layers (task-specific logic) in the adapter significantly boosts performance compared to traditional head-only tuning.
- Layer-drop Efficiency: Simply dropping every $N$-th layer to create the emulator preserved the model's logic flow for gradient estimation better than complex pruning or quantization.
- Privacy through Lossiness: Because the emulator is highly compressed, it performs poorly on its own, protecting the model owner’s intellectual property.
- Orthogonality: Offsite-Tuning can be used as a wrapper for other methods; for instance, one can use LoRA inside the Offsite-Tuning adapter to further reduce local compute requirements.
Key Results
- Efficiency: Compared to full fine-tuning, Offsite-Tuning achieved a 6.5x throughput speedup and a 5.6x reduction in peak memory usage.
- Performance: On the OPT-6.7B model, Offsite-Tuning achieved an average accuracy of 58.6%, coming remarkably close to full fine-tuning while vastly outperforming zero-shot baselines.
- Hardware Accessibility: It enabled the fine-tuning of 7B-parameter models on a single NVIDIA A6000 GPU, a task typically impossible with standard methods.
Limitations and Future Work
While the user saves compute, the model owner still faces a one-time cost for knowledge distillation to create the emulator. Furthermore, while the emulator is lossy, there is currently no formal mathematical guarantee (like Differential Privacy) against information reconstruction. Future work will focus on a more rigorous theoretical understanding of why approximate gradients from the emulator are so effective.
Summary updated