Multi-personality generation for LLMs, enabling simultaneous embodiment of multiple personalization attributes, is a fundamental challenge. Existing retraining-based approaches are costly and poorly scalable, while decoding-time methods often rely on external models or heuristics, limiting flexibility and robustness. In this paper, we propose a novel Multi-Personality Generation (MPG) framework under the decoding-time combination paradigm. It flexibly controls multi-personality without relying on scarce multi-dimensional models or extra training, leveraging implicit density ratios in single-dimensional models as a "free lunch" to reformulate the task as sampling from a target strategy aggregating these ratios. To implement MPG efficiently, we design Speculative Chunk-level based Rejection sampling (SCR), which generates responses in chunks and parallelly validates them via estimated thresholds within a sliding window. This significantly reduces computational overhead while maintaining high-quality generation. Experiments on MBTI personality and Role-Playing demonstrate the effectiveness of MPG, showing improvements up to 16%-18%. Code and data are available at https://github.com/Libra117/MPG .
翻译:大语言模型的多个性生成,即同时体现多种个性化属性,是一个根本性挑战。现有的基于重训练的方法成本高昂且可扩展性差,而解码时方法通常依赖外部模型或启发式规则,限制了灵活性与鲁棒性。本文提出一种解码时组合范式下的新型多个性生成框架。该框架无需依赖稀缺的多维模型或额外训练,即可灵活控制多个性,利用单维模型中的隐式密度比作为“免费午餐”,将任务重构为从聚合这些密度比的目标策略中采样。为实现高效的多个性生成,我们设计了基于推测性块级拒绝采样的方法,该方法以块为单位生成响应,并通过滑动窗口内的估计阈值并行验证,在保持高质量生成的同时显著降低计算开销。基于MBTI人格与角色扮演的实验验证了多个性生成框架的有效性,性能提升达16%-18%。代码与数据公开于https://github.com/Libra117/MPG。