Research Papers 论文研究 1d ago Updated 15h ago 更新于 15小时前 47

LARA: Lightweight Adapters in the Residual Stream for Composable Adaptation and Alignment LARA:用于可组合适配与对齐的残差流轻量适配器

LARA introduces a novel adaptation method that operates in the residual stream of a frozen model rather than modifying weight matrices, contrasting with LoRA's weight-space approach LARA matches LoRA's performance on code fine-tuning and preference optimization (DPO) at equal parameter counts while keeping all base weights untouched A key innovation is the scale parameter γ, which enables smooth interpolation between base and adapted behavior at inference time—a form of graded control unavailabl LARA(Lightweight Additive Residual Adaptation)是一种在冻结模型残差流中操作的高效适配方法,不同于LoRA修改权重矩阵的方式 在代码微调任务和DPO偏好优化上,LARA在相同参数量下性能与LoRA相当 LARA暴露缩放参数γ,可在推理时平滑插值基础模型与适配行为,提供权重空间适配无法实现的分级控制 多个行为可同时驻留并自动按token路由,在1.5B模型上放置7个行为(6个微调+1个偏好优化)仅需约33MB额外开销 基础模型权重保持不变,行为可独立训练并按需选择,适合在单设备上托管和扩展多种行为

62
Hot 热度
72
Quality 质量
68
Impact 影响力

Analysis 深度分析

TL;DR

  • LARA introduces a novel adaptation method that operates in the residual stream of a frozen model rather than modifying weight matrices, contrasting with LoRA's weight-space approach
  • LARA matches LoRA's performance on code fine-tuning and preference optimization (DPO) at equal parameter counts while keeping all base weights untouched
  • A key innovation is the scale parameter γ, which enables smooth interpolation between base and adapted behavior at inference time—a form of graded control unavailable in weight-space adaptation
  • Multiple behaviors (seven demonstrated: six fine-tuned + one DPO-optimized) can coexist on a single frozen 1.5B model with only ~33 MB overhead, with per-token automatic routing
  • This architecture enables on-device hosting of many behaviors without loading full models on demand, significantly improving scalability for multi-behavior deployment

Why It Matters

LARA addresses a critical limitation in current model adaptation: the inability to smoothly interpolate between base and fine-tuned behavior, which is essential for safety-critical and production deployments where abrupt behavioral shifts are undesirable. By keeping the base model frozen and treating adaptation as an additive residual, LARA enables composable, multi-behavior systems that are far more efficient than maintaining separate full models—making it highly relevant for edge deployment and multi-task AI systems.

Technical Details

  • Architecture: LARA reads hidden states at a small set of layers and adds a low-rank correction back to the residual stream, leaving all base model weights completely untouched—unlike LoRA, which injects low-rank updates directly into weight matrices
  • Scale parameter γ: Inference exposes a tunable scalar γ that interpolates between the frozen base model's output and the adapted residual, enabling continuous control over behavior deviation without retraining
  • Multi-behavior coexistence: Seven distinct behaviors (six fine-tuned + one DPO-optimized preference model) were hosted simultaneously on a single frozen 1.5B model with only ~33 MB of total overhead, compared to requiring a full model per behavior in conventional approaches
  • Per-token routing: Behaviors are selected automatically per token rather than loaded on demand, enabling dynamic composition of capabilities within a single forward pass
  • Benchmarks: Evaluated on code fine-tuning tasks and preference optimization (DPO), matching LoRA performance at equal parameter budgets

Industry Insight

  • On-device multi-behavior deployment becomes feasible: The ~33 MB overhead for seven behaviors on a 1.5B model suggests that consumer devices could host rich behavioral repertoires without prohibitive memory costs, opening doors for personalized on-device AI assistants
  • Graded control via γ is a safety enabler: The ability to smoothly interpolate between base and adapted behavior provides a practical mechanism for reducing hallucination risk and maintaining alignment guarantees during fine-tuned deployments—something weight-space adapters fundamentally cannot offer
  • Separate training of composable behaviors simplifies MLOps: Since behaviors are trained independently on a frozen base and composed at inference, teams can develop and update individual capabilities (e.g., new fine-tunes, safety filters) without retraining or regressing the entire system

TL;DR

  • LARA(Lightweight Additive Residual Adaptation)是一种在冻结模型残差流中操作的高效适配方法,不同于LoRA修改权重矩阵的方式
  • 在代码微调任务和DPO偏好优化上,LARA在相同参数量下性能与LoRA相当
  • LARA暴露缩放参数γ,可在推理时平滑插值基础模型与适配行为,提供权重空间适配无法实现的分级控制
  • 多个行为可同时驻留并自动按token路由,在1.5B模型上放置7个行为(6个微调+1个偏好优化)仅需约33MB额外开销
  • 基础模型权重保持不变,行为可独立训练并按需选择,适合在单设备上托管和扩展多种行为

为什么值得看

LARA为模型适配提供了全新的技术路径,通过残差流操作而非权重修改,实现了多行为共存和细粒度控制。这对需要部署多种行为模式的边缘设备场景具有重要价值。

技术解析

LARA的核心机制是在少量层读取隐藏状态,将低秩校正加回残差流,保持所有基础权重完全不变。这与LoRA在权重矩阵上添加低秩更新的方式形成对比。

在推理阶段,LARA引入缩放参数γ,允许平滑插值基础模型和适配后的行为,实现分级控制能力。

实验验证了在代码微调和DPO偏好优化任务上,LARA在相同参数量下与LoRA性能相当。

多行为部署方面,在1.5B模型上成功放置7个行为(6个微调+1个偏好优化),仅需约33MB额外开销,相比每个行为加载完整模型的方式大幅节省资源。

行业启示

LARA为边缘设备和资源受限场景提供了多行为共存的可行方案,33MB的额外开销使得在单设备上托管多种行为成为可能。

残差流适配的新范式为模型适配研究开辟了新的技术路线,可能推动更多类似方法的发展。

独立训练和按token路由的机制为动态行为选择提供了基础设施,适合需要灵活切换行为模式的应用场景。

Disclaimer: The above content is generated by AI and is for reference only. 免责声明:以上内容由 AI 生成,仅供参考。

LLM 大模型 Fine-tuning 微调 Research 科学研究 Code Generation 代码生成 Alignment 对齐