{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/continuous-language-model-interpolation-for","title":"Continuous Language Model Interpolation for Dynamic and Controllable Text Generation","arxiv_id":"2404.07117","date":"2024-04-10","proceeding":null,"authors":["Sara Kangaslahti","David Alvarez-Melis"],"abstract":"As large language models (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.","url_abs":"https://arxiv.org/abs/2404.07117v1","url_pdf":"https://arxiv.org/pdf/2404.07117v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"continuous-language-model-interpolation-for","repo_url":"https://github.com/skangasl/continuous-lm-interpolation","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"text-generation","task_name":"Text Generation"}],"methods":[{"method_slug":"base","method_name":"BASE"},{"method_slug":"focus","method_name":"Focus"},{"method_slug":"set","method_name":"SET"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2404.07117","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2404.07117"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/skangasl/continuous-lm-interpolation","reach":{"status":"ok"}}],"summary":{"ran":5,"unverified":3},"by_repo_kind":{"official":{"samples":8,"ran":5,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":8,"samples":[{"code_sha256_prefix":"1fb4f0f6924d45e0","entry":"compute_mds","repo":"skangasl/continuous-lm-interpolation","repo_kind":"official","path":"evaluation/evaluate_distances.py","file_url":"https://github.com/skangasl/continuous-lm-interpolation/blob/HEAD/evaluation/evaluate_distances.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1fb4f0f6924d45e0"}},{"code_sha256_prefix":"72a3e012682bb367","entry":"get_score","repo":"skangasl/continuous-lm-interpolation","repo_kind":"official","path":"evaluation/create_plots.py","file_url":"https://github.com/skangasl/continuous-lm-interpolation/blob/HEAD/evaluation/create_plots.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"72a3e012682bb367"}},{"code_sha256_prefix":"87b6205fbdb0b4f9","entry":"get_score_csv","repo":"skangasl/continuous-lm-interpolation","repo_kind":"official","path":"evaluation/create_plots.py","file_url":"https://github.com/skangasl/continuous-lm-interpolation/blob/HEAD/evaluation/create_plots.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"87b6205fbdb0b4f9"}},{"code_sha256_prefix":"756ad99fad4efd57","entry":"preprocess_text","repo":"skangasl/continuous-lm-interpolation","repo_kind":"official","path":"finetuning/finetune_classifier.py","file_url":"https://github.com/skangasl/continuous-lm-interpolation/blob/HEAD/finetuning/finetune_classifier.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"756ad99fad4efd57"}},{"code_sha256_prefix":"bc10e82b17b5edc9","entry":"valid","repo":"skangasl/continuous-lm-interpolation","repo_kind":"official","path":"finetuning/finetune_classifier.py","file_url":"https://github.com/skangasl/continuous-lm-interpolation/blob/HEAD/finetuning/finetune_classifier.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"bc10e82b17b5edc9"}},{"code_sha256_prefix":"6468f48948942792","entry":"compute_correlations","repo":"skangasl/continuous-lm-interpolation","repo_kind":"official","path":"evaluation/evaluate_distances.py","file_url":"https://github.com/skangasl/continuous-lm-interpolation/blob/HEAD/evaluation/evaluate_distances.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6468f48948942792"}},{"code_sha256_prefix":"7d56b26920f68394","entry":"compute_pairwise_distances","repo":"skangasl/continuous-lm-interpolation","repo_kind":"official","path":"evaluation/evaluate_distances.py","file_url":"https://github.com/skangasl/continuous-lm-interpolation/blob/HEAD/evaluation/evaluate_distances.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7d56b26920f68394"}},{"code_sha256_prefix":"6e005f7f71f84919","entry":"perplexity","repo":"skangasl/continuous-lm-interpolation","repo_kind":"official","path":"generation/evaluate_generations.py","file_url":"https://github.com/skangasl/continuous-lm-interpolation/blob/HEAD/generation/evaluate_generations.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6e005f7f71f84919"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}