arXiv:2410.19206cs.LGcs.CL2024-10被引 3

通过动态调整向量实现大模型推理时的灵活对齐,降低资源消耗。

Inference time LLM alignment in single and multidomain preference spectrum

  • 用模型编辑思想生成偏好向量,推理时通过线性操作调节输出
  • 在医疗、法律、金融三领域实现渐进式偏好控制,推理成本减半
  • 向量可跨训练阶段迁移,多领域对齐速度比重训快12倍

大语言模型对齐需应对主观性和多层次偏好,但传统方法要么需全量重训,要么每步推理都依赖奖励模型。为此,本文提出一种推理时对齐方法,学习偏好维度的编码表示——对齐向量(Alignment Vectors, AV)。AV通过基础模型与对齐模型相减获得,支持在推理过程中通过简单线性操作动态调整模型行为。研究聚焦医疗、法律、金融三个专业领域,实现三种渐进式响应层级的对齐,验证其实际潜力。该方法引入可调偏好旋钮,使用户能定制输出,同时将推理成本降至提示工程的一半。此外,发现AV可在同一模型不同微调阶段间迁移,具备强灵活性;在多领域多样偏好对齐中表现优异,相较重训提速12倍。

原文摘要 · Abstract (English)

Aligning Large Language Models (LLM) to address subjectivity and nuanced preference levels requires adequate flexibility and control, which can be a resource-intensive and time-consuming procedure. Existing training-time alignment methods require full re-training when a change is needed and inference-time ones typically require access to the reward model at each inference step. To address these limitations, we introduce inference-time model alignment method that learns encoded representations of preference dimensions, called \textit{Alignment Vectors} (AV). These representations are computed by subtraction of the base model from the aligned model as in model editing enabling dynamically adjusting the model behavior during inference through simple linear operations. Even though the preference dimensions can span various granularity levels, here we focus on three gradual response levels across three specialized domains: medical, legal, and financial, exemplifying its practical potential. This new alignment paradigm introduces adjustable preference knobs during inference, allowing users to tailor their LLM outputs while reducing the inference cost by half compared to the prompt engineering approach. Additionally, we find that AVs are transferable across different fine-tuning stages of the same model, demonstrating their flexibility. AVs also facilitate multidomain, diverse preference alignment, making the process 12x faster than the retraining approach.

大模型对齐推理优化偏好控制

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。