{"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/neeko-leveraging-dynamic-lora-for-efficient","title":"Neeko: Leveraging Dynamic LoRA for Efficient Multi-Character Role-Playing Agent","arxiv_id":"2402.13717","date":"2024-02-21","proceeding":null,"authors":["Xiaoyan Yu","Tongxu Luo","Yifan Wei","Fangyu Lei","Yiming Huang","Hao Peng","Liehuang Zhu"],"abstract":"Large Language Models (LLMs) have revolutionized open-domain dialogue agents but encounter challenges in multi-character role-playing (MCRP) scenarios. To address the issue, we present Neeko, an innovative framework designed for efficient multiple characters imitation. Unlike existing methods, Neeko employs a dynamic low-rank adapter (LoRA) strategy, enabling it to adapt seamlessly to diverse characters. Our framework breaks down the role-playing process into agent pre-training, multiple characters playing, and character incremental learning, effectively handling both seen and unseen roles. This dynamic approach, coupled with distinct LoRA blocks for each character, enhances Neeko's adaptability to unique attributes, personalities, and speaking patterns. As a result, Neeko demonstrates superior performance in MCRP over most existing methods, offering more engaging and versatile user interaction experiences. Code and data are available at https://github.com/weiyifan1023/Neeko.","url_abs":"https://arxiv.org/abs/2402.13717v3","url_pdf":"https://arxiv.org/pdf/2402.13717v3.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":"neeko-leveraging-dynamic-lora-for-efficient","repo_url":"https://github.com/weiyifan1023/neeko","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"incremental-learning","task_name":"Incremental Learning"}],"methods":[{"method_slug":"adapter","method_name":"Adapter"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2402.13717","atlas_url":"https://app.syntology.ai/?focus=2402.13717","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.13717"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/weiyifan1023/neeko","reach":null}],"summary":{"ran":5,"unverified":2},"by_repo_kind":{"official":{"samples":7,"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":0,"samples":[{"code_sha256_prefix":"08a41b3367d5a129","entry":"Conv2d","repo":"weiyifan1023/neeko","repo_kind":"official","path":"moelora/tuners/moelora.py","file_url":"https://github.com/weiyifan1023/neeko/blob/HEAD/moelora/tuners/moelora.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"08a41b3367d5a129"}},{"code_sha256_prefix":"60ee43fda6864a3d","entry":"Dense","repo":"weiyifan1023/neeko","repo_kind":"official","path":"moelora/tuners/moelora.py","file_url":"https://github.com/weiyifan1023/neeko/blob/HEAD/moelora/tuners/moelora.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"60ee43fda6864a3d"}},{"code_sha256_prefix":"0196405048e1cadd","entry":"Embedding","repo":"weiyifan1023/neeko","repo_kind":"official","path":"moelora/tuners/moelora.py","file_url":"https://github.com/weiyifan1023/neeko/blob/HEAD/moelora/tuners/moelora.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0196405048e1cadd"}},{"code_sha256_prefix":"54bb85057309d721","entry":"Linear","repo":"weiyifan1023/neeko","repo_kind":"official","path":"moelora/tuners/moelora.py","file_url":"https://github.com/weiyifan1023/neeko/blob/HEAD/moelora/tuners/moelora.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"54bb85057309d721"}},{"code_sha256_prefix":"6866786ea518f704","entry":"MoeLoraLayer","repo":"weiyifan1023/neeko","repo_kind":"official","path":"moelora/tuners/moelora.py","file_url":"https://github.com/weiyifan1023/neeko/blob/HEAD/moelora/tuners/moelora.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"6866786ea518f704"}},{"code_sha256_prefix":"899c0d6e0bf3d5f1","entry":"MoeLoraModel","repo":"weiyifan1023/neeko","repo_kind":"official","path":"moelora/tuners/moelora.py","file_url":"https://github.com/weiyifan1023/neeko/blob/HEAD/moelora/tuners/moelora.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"899c0d6e0bf3d5f1"}},{"code_sha256_prefix":"929ad987e7c47453","entry":"mark_only_lora_as_trainable","repo":"weiyifan1023/neeko","repo_kind":"official","path":"moelora/tuners/moelora.py","file_url":"https://github.com/weiyifan1023/neeko/blob/HEAD/moelora/tuners/moelora.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"929ad987e7c47453"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}