论文

超网络自动生成LoRA,让端侧LLM实现个性化

LoRA-generating hypernetworks for efficient on-device LLM generative personalization

精选理由

做端侧LLM的可以看看:超网络给每个用户自动生成专属LoRA,手机上只跑前向推理就完成个性化。

论文提出一种端侧LLM个性化方法:训练一个超网络(hypernetwork),把用户上下文token映射为适合该用户的LoRA权重。手机等设备算力有限、端侧LLM规模受限,该方法部署后只需前向传播即可在本地合成个性化LoRA。与ICL(上下文学习)不同,它通过权重直接修改目标LLM,避免输入序列拉长带来的延迟;与PEFT(参数高效微调)不同,设备端无需反向传播训练。架构上部分复用目标LLM自身权重,额外存储开销很小。作者在多个个性化数据集上与ICL、PEFT基线做了对比验证。

原文 · arXiv cs.LG

LoRA-generating hypernetworks for efficient on-device LLM generative personalization

On-device large language models (`LLMs'), e.g. running on mobile phones, are ripe for improvement via personalization. The limited compute resources of mobile devices impose limits on model scale and thus model quality, making any realizable quality gains highly impactful. At the same time, their personal nature (i.e., the close coupling to a particular user) means that a given on-device LLM tends to be used in similar, predictable patterns over the course of time. This paper presents a novel method for personalizing on-device LLMs. It trains a hypernetwork to map a user's context tokens to a low-rank adaptation (`LoRA') well-suited to that user. Once the trained common artifacts are deployed to users' devices, each user uses the hypernetwork to synthesize (entirely on device) a personalized LoRA. This approach blends the benefits while avoiding the drawbacks of two existing approaches to LLM customization: in-context learning (`ICL') and parameter-efficient fine-tuning (`PEFT'). Like ICL (and unlike PEFT), the on-device phase of our approach is computationally feasible, requiring only forward passes through neural networks. Like PEFT (and unlike ICL), our approach modifies the `target' base LLM via weights (the LoRA), avoiding negative consequences (e.g. increased latency) associated with extending the input sequence. Our approach is particularly well-suited to the mobile device regime. Apart from the on-device compute and latency benefits mentioned, it also requires minimal additional storage, as internally its architecture partly leverages the same LLM weights as belong to the target LLM to be personalized. We demonstrate the benefits of LoRA-generating hypernetworks on several representative personalization datasets, comparing against baselines like ICL and PEFT. Of note, our personalization experiments focus on more challenging and less studied long-form text generation tasks.