TL;DR
This paper tackles the challenge of enabling Large Language Models (LLMs) to perform multiple tasks simultaneously on resource-constrained devices like smartphones. They introduce "Learnable Calibration," a novel method that efficiently adapts existing task-specific adapters to handle these complex, multi-task scenarios with minimal overhead, achieving performance comparable to more resource-intensive approaches.
What Problem Does This Paper Address?
Large Language Models (LLMs) have revolutionized NLP, but deploying them on devices like smartphones (on-device LLMs) is challenging due to limited computational power and storage. While LLMs can be fine-tuned for individual tasks using parameter-efficient methods like LoRA (Low-Rank Adapters), enabling them to perform multiple tasks at once on these devices is a significant hurdle. Existing methods for combining tasks, like model merging, are often designed for single-task execution per input. This paper addresses the need for LLMs that can handle "compositional multi-tasking" – executing several tasks concurrently for a single input – in an on-device setting, where efficiency is paramount. For example, generating a translated summary of a text requires both summarization and translation to be performed simultaneously.
Methods
The core of the paper's contribution is the Learnable Calibration method. It builds upon existing, pre-trained task-specific LoRA adapters. Instead of training a new, large adapter for each compositional task or relying on inefficient multi-step pipelines, Learnable Calibration introduces a small number of additional, learnable parameters. These parameters are trained on compositional task data and are used to "calibrate" the merged single-task LoRAs.
The authors propose two variations:
- Variation #1 (Learnable Calibration): Adds a simple calibration vector of biases.
- Variation #2 (Learnable Calibration++): Introduces a more expressive calibration matrix, factorized into two low-rank matrices.
This approach leverages existing adapters, minimizing storage needs, and performs the compositional task in a single inference pass, crucial for on-device efficiency. They also explore sharing these calibration parameters across multiple compositional tasks to further reduce storage requirements.
Datasets
The authors introduce a new benchmark comprising four practical compositional tasks. These tasks combine a main task (summarization or reply suggestion) with an auxiliary task (translation or tone adjustment).
- Summarization + Translation: Uses the DialogSum dataset, with ground-truth summaries translated using OpusMT.
- Summarization + Tone Adjustment: Uses DialogSum, with tone adjustment applied using a fine-tuned RedPajama-INCITE-Base 3B model.
- Reply + Translation: Uses the Synthetic Persona Chat dataset, with ground-truth replies translated using OpusMT.
- Reply + Tone Adjustment: Uses Synthetic Persona Chat, with tone adjustment applied using the RedPajama-INCITE-Base 3B model.
They also utilize standard datasets for training individual task adapters: TED Talks for translation and Sound Natural for tone adjustment.
Key Insights and Ideas
- On-device LLMs struggle with compositional tasks: Even with task-specific prompts or in-context learning, zero-shot performance on compositional tasks is poor for on-device LLMs, highlighting the need for specialized adaptation.
- Standard merging strategies fail: Traditional model merging techniques, effective for single-task scenarios, do not translate well to compositional multi-tasking.
- Efficiency is key for on-device: The paper emphasizes that solutions must be efficient in terms of computation, inference time, and storage, making methods like multi-step LoRA usage or joint-expert LoRAs impractical despite their performance.
- Leveraging existing adapters is crucial: The success of Learnable Calibration hinges on its ability to build upon pre-existing, single-task LoRAs, significantly reducing the need for new storage.
- Calibration adds diversity: Analyzing the update matrices reveals that Learnable Calibration significantly increases the diversity of the LoRA update matrix, enabling it to handle auxiliary tasks effectively.
Key Results
- Learnable Calibration++ achieved state-of-the-art performance: It reached 65.15% on the LLM Judge score for summarization + translation, surpassing inefficient baselines while being highly efficient.
- Efficiency gains: Learnable Calibration methods require only 0.08-0.56% of the parameters of a joint-expert LoRA, translating to minimal additional storage (less than 0.5 MB).
- Scalability: The proposed method demonstrates strong performance across different model sizes (0.5B to 3B parameters) and maintains effectiveness even under mild domain shifts.
- Three-way tasks are feasible: The framework successfully handles combinations of three tasks, showcasing its flexibility.
- Qualitative analysis confirms success: Examples show that Learnable Calibration correctly performs both tasks in a compositional scenario, unlike zero-shot or main-task LoRA approaches that often fail one or both.
Limitations and Future Work
- On-device focus: The evaluation primarily focused on on-device-sized LLMs. While the approach is likely to scale, evaluating with significantly larger models would require substantial compute resources.
- Task combinations: The benchmark studied combinations of two and three tasks. Extending the benchmark to include a larger number of tasks could be a future direction.
- Safeguarding mechanisms: The paper notes that safeguards in LLMs might be weakened when models are merged or adapted for compositional multi-tasking. Future research could explore the interplay between compositional multi-tasking and robust safeguarding mechanisms.
Summary updated