Manuscript Offprint

arXiv:2610.06415

Training-Free Transformer Merging via Sequential Local Operator Alignment

Akansh Maurya, Ya-Wei Eileen Lin, Stefanie Jegelka, Sebastian U Stich, Rotem Mulayoff

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Training-free model merging aims to combine multiple fine-tuned models into a single model without further optimization on labeled data. Yet, in transformers, independently merging individual layers can affect a shared attention computation because the query-key and value-output operators depend on composed matrices, overlooking the functional structure. Moreover, when merging earlier components, downstream components receive different activations than they do in the original model, thus, the merged and original execution paths no longer match. In this paper, we introduce Sequential Local Operator Alignment, a training-free method that merges transformers along the execution path of the partially merged model. Our method uses calibration data to estimate the local behavior of each functional component, aligns operators sequentially under the intermediate activation of the partially merged model, and subsequently factorizes the merged operators back into valid transformer parameters. We empirically show that this sequential step reduces error accumulation across layers. Furthermore, the proposed operator factorization step enables rank expansion, providing a principled mechanism for increasing multi-task capacity. We demonstrate that our approach generalizes across modalities, model scales, and varying numbers of tasks, from CLIP and RoBERTa to billion-parameter LLMs, and further extends naturally to the merging of LoRA-fine-tuned models. The results indicate improvements over strong merging baselines without requiring rank expansion, while optional expansion provides a further accuracy-inference-cost trade-off. Project link: https://akansh12.github.io/SLOA-Merge/

1 Introduction

Modern neural networks are often adapted into many task-specific variants from the same pretrained initialization [Bommasani et al., 2021, Devlin et al., 2019, Raffel et al., 2020, Radford et al., 2021a, Ding et al., 2023]. However, maintaining a separate model for every task is expensive [Guo et al., 2021, Wortsman et al., 2022, Yadav et al., 2025], while retraining a single multi-task model can require substantial data, compute, and engineering effort [Ruder, 2017, Crawshaw, 2020, Yang et al., 2024b]. Training-free model merging [Xu et al., 2024, Fu et al., 2025, Matena and Raffel, 2022, Ilharco et al., 2023, Ortiz-Jimenez et al., 2023, Jin et al., 2023] provides a practical alternative: given several independently fine-tuned models, the goal is to combine them into one model without further training. An effective merged model should preserve the task-specific capabilities of the original models while offering the deployment efficiency of a single network [Yang et al., 2026].

Many existing training-free merging methods operate directly on individual parameter tensors or individual

Multiple task-specific Transformer models

Figure

Figure 1: Illustration of Sequential Local Operator Alignment. Our method aligns the effective local functional operators, merges them sequentially, and then factorizes the aligned operators. This sequential operator-level view respects coupled attention computation, reduces error accumulation across layers, and enables rank expansion to have additional multi-task capacity.

activation spaces. For example, they average corresponding weight matrices [Wortsman et al., 2022], interpolate task vectors [Ilharco et al., 2023], or align intermediate activations layer by layer [Ainsworth et al., 2023, Singh and Jaggi, 2020]. While simple and often effective, this layer-wise perspective is parameterization-dependent: a model's function is not uniquely tied to the particular tensors used to represent it [Zhao et al., 2025, Bürgin et al., 2026, Bona-Pellissier et al., 2023, Elhage et al., 2021, Dar et al., 2023]. For instance, in a transformer attention head [Vaswani et al., 2017], the matrices WQW_Q, WKW_K, WVW_V, and WOW_O are not used as independent functional units. The query and key determine the pre-softmax attention scores through the combined bilinear operator WQWK⊤W_Q W_K^\top, while the value and output determine the post-attention contribution through the composed operator WVWOW_V W_O. Thus, the functionally meaningful objects are the composed operators WQWK⊤W_Q W_K^\top and WVWOW_V W_O. A merging procedure that independently combines WQW_Q and WKW_K, or WVW_V and WOW_O, may therefore fail to preserve a shared attention computation even when that computation is functionally equivalent.

A natural way is to merge objects at the level at which they enter the model's computation, rather than at the level of an arbitrary parameter decomposition. To this end, we introduce Sequential Local Operator Alignment (SLOA), a training-free framework for merging transformer models by aligning local functional operators (see Fig. 1 for the illustration). SLOA associates each model component with the local operator. For each component, SLOA constructs a merged operator from the task models. SLOA considers two alignment criteria: (i) behavior matching, on calibration inputs to the component, the merged operator should produce outputs close to those of the task-specific operators, and (ii) data-aware operator regularization, the merged operator is kept close to the task-specific operators under a metric induced by the calibration activations. This metric emphasizes directions that are active on the data. Importantly, our contribution is to instantiate them as a unified local-operator alignment framework for training-free transformer merging. The same objective applies across LayerNorm modules, linear maps, QK attention operators, and VO attention operators by changing only the behavior map and the induced metric.

A key feature of our framework is that alignment is performed sequentially. When earlier operators have already been merged, the hidden activations entering later components are no longer identical to the activations produced by any individual task model. If later components are merged only under the original task-model activations, the local objective assumes that all previous merges were perfect. Our approach instead evaluates the activation-matching term on the activations produced by the partially merged model. This makes each local merge corrective, aligning downstream operators along the actual execution path of the merged network.

and reducing error accumulation across layers.

Our operator view separates the merged operator from its eventual factorization. For QK and VO components, each individual task head has rank at most the head dimension, but the merged multi-task operator may require a higher-rank representation, as different tasks can use different subspaces. Therefore, we treat rank as a capacity-control mechanism. After merging an operator, we can factorize it at the original rank to preserve the architecture, or expand the rank to retain additional singular directions that capture task-specific behavior. Empirically, our method achieves state-of-the-art training-free merging performance across vision benchmarks, RoBERTa models, and billion-parameter LLMs. Moreover, SLOA naturally extends to models fine-tuned with LoRA [Hu et al., 2022], further broadening its applicability to parameter-efficient adaptation settings. It consistently outperforms baselines that merge individual weights or rely on isolated activation alignment, supporting the central claim that model merging should be performed at local functional operators.

References (52)