Continuous Language Model Interpolation for Dynamic and Controllable Text Generation (2404.07117v1)
Abstract: As LLMs have gained popularity for a variety of use cases, making them adaptable and controllable has become increasingly important, especially for user-facing applications. While the existing literature on LLM adaptation primarily focuses on finding a model (or models) that optimizes a single predefined objective, here we focus on the challenging case where the model must dynamically adapt to diverse -- and often changing -- user preferences. For this, we leverage adaptation methods based on linear weight interpolation, casting them as continuous multi-domain interpolators that produce models with specific prescribed generation characteristics on-the-fly. Specifically, we use low-rank updates to fine-tune a base model to various different domains, yielding a set of anchor models with distinct generation profiles. Then, we use the weight updates of these anchor models to parametrize the entire (infinite) class of models contained within their convex hull. We empirically show that varying the interpolation weights yields predictable and consistent change in the model outputs with respect to all of the controlled attributes. We find that there is little entanglement between most attributes and identify and discuss the pairs of attributes for which this is not the case. Our results suggest that linearly interpolating between the weights of fine-tuned models facilitates predictable, fine-grained control of model outputs with respect to multiple stylistic characteristics simultaneously.
- Sparks of artificial general intelligence: Early experiments with gpt-4, 2023.
- Controlled text generation via language model arithmetic. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=SLw9fp4yI6.
- Tinystories: How small can language models be and still speak coherent english?, 2023.
- Hierarchical neural story generation. In Iryna Gurevych and Yusuke Miyao (eds.), Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 889–898, Melbourne, Australia, July 2018. Association for Computational Linguistics. doi: 10.18653/v1/P18-1082. URL https://aclanthology.org/P18-1082.
- Stylenet: Generating attractive visual captions with styles. In 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 955–964, 2017. doi: 10.1109/CVPR.2017.108.
- Concept sliders: Lora adaptors for precise control in diffusion models, 2023.
- Lm-switch: Lightweight language model conditioning in word embedding space, 2023.
- Inspecting and editing knowledge representations in language models, 2023.
- Lora: Low-rank adaptation of large language models. CoRR, abs/2106.09685, 2021. URL https://arxiv.org/abs/2106.09685.
- Lorahub: Efficient cross-task generalization via dynamic lora composition, 2024.
- Editing models with task arithmetic, 2023.
- Byom: Building your own multi-task model for free, 2024.
- Deep Learning for Text Style Transfer: A Survey. Computational Linguistics, 48(1):155–205, 04 2022. ISSN 0891-2017. doi: 10.1162/coli˙a˙00426. URL https://doi.org/10.1162/coli_a_00426.
- CTRL: A conditional transformer language model for controllable generation. CoRR, abs/1909.05858, 2019. URL http://arxiv.org/abs/1909.05858.
- A distributional approach to controlled text generation. In International Conference on Learning Representations, 2021. URL https://openreview.net/forum?id=jWkw45-9AbL.
- GeDi: Generative discriminator guided sequence generation. In Marie-Francine Moens, Xuanjing Huang, Lucia Specia, and Scott Wen-tau Yih (eds.), Findings of the Association for Computational Linguistics: EMNLP 2021, pp. 4929–4952, Punta Cana, Dominican Republic, November 2021. Association for Computational Linguistics. doi: 10.18653/v1/2021.findings-emnlp.424. URL https://aclanthology.org/2021.findings-emnlp.424.
- Booksum: A collection of datasets for long-form narrative summarization. CoRR, abs/2105.08209, 2021. URL https://arxiv.org/abs/2105.08209.
- Inference-time intervention: Eliciting truthful answers from a language model, 2023.
- Prefix-tuning: Optimizing continuous prompts for generation. CoRR, abs/2101.00190, 2021. URL https://arxiv.org/abs/2101.00190.
- Roberta: A robustly optimized BERT pretraining approach. CoRR, abs/1907.11692, 2019. URL http://arxiv.org/abs/1907.11692.
- Politeness transfer: A tag and generate approach. CoRR, abs/2004.14257, 2020. URL https://arxiv.org/abs/2004.14257.
- Merging models with fisher-weighted averaging. CoRR, abs/2111.09832, 2021. URL https://arxiv.org/abs/2111.09832.
- Pointer sentinel mixture models. CoRR, abs/1609.07843, 2016. URL http://arxiv.org/abs/1609.07843.
- Time is encoded in the weights of finetuned language models, 2023.
- Task arithmetic in the tangent space: Improved editing of pre-trained models, 2023.
- A plug-and-play method for controlled text generation. CoRR, abs/2109.09707, 2021. URL https://arxiv.org/abs/2109.09707.
- Controllable natural language generation with contrastive prefixes, 2022.
- Rewarded soups: towards pareto-optimal alignment by interpolating weights fine-tuned on diverse rewards, 2023.
- Dear sir or madam, may I introduce the GYAFC dataset: Corpus, benchmarks and metrics for formality style transfer. In Marilyn Walker, Heng Ji, and Amanda Stent (eds.), Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), pp. 129–140, New Orleans, Louisiana, June 2018. Association for Computational Linguistics. doi: 10.18653/v1/N18-1012. URL https://aclanthology.org/N18-1012.
- Recursive deep models for semantic compositionality over a sentiment treebank. In David Yarowsky, Timothy Baldwin, Anna Korhonen, Karen Livescu, and Steven Bethard (eds.), Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing, pp. 1631–1642, Seattle, Washington, USA, October 2013. Association for Computational Linguistics. URL https://aclanthology.org/D13-1170.
- Extracting latent steering vectors from pretrained language models, 2022.
- Llama: Open and efficient foundation language models, 2023.
- Activation addition: Steering language models without optimization, 2023.
- Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference time, 2022.
- Unpaired sentiment-to-sentiment translation: A cycled reinforcement learning approach. In Iryna Gurevych and Yusuke Miyao (eds.), Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 979–988, Melbourne, Australia, July 2018. Association for Computational Linguistics. doi: 10.18653/v1/P18-1090. URL https://aclanthology.org/P18-1090.
- Ties-merging: Resolving interference when merging models, 2023.
- FUDGE: Controlled text generation with future discriminators. In Kristina Toutanova, Anna Rumshisky, Luke Zettlemoyer, Dilek Hakkani-Tur, Iz Beltagy, Steven Bethard, Ryan Cotterell, Tanmoy Chakraborty, and Yichao Zhou (eds.), Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pp. 3511–3535, Online, June 2021. Association for Computational Linguistics. doi: 10.18653/v1/2021.naacl-main.276. URL https://aclanthology.org/2021.naacl-main.276.
- Composing parameter-efficient modules with arithmetic operations, 2023.
- Controlled text generation with natural language instructions, 2023.