Merge Methods API
This page is generated from the registered merge-method class docstrings and signatures. For defaults, accepted values, and parameter behavior, see the method configuration reference.
Weighted Average
Bases: DirectionMerge
Interpolate the base model toward a weighted average of checkpoints.
The prepared direction is avg(tuned) - base and apply returns
base + alpha * direction. method_params["normalize"] chooses
weight-sum normalization ("sumw", default) or task-count
normalization ("n").
Task Arithmetic
Bases: DirectionMerge
Add weighted task vectors to the shared base checkpoint.
The prepared direction is sum_i w_i * (tuned_i - base) and apply
returns base + alpha * direction. Task Arithmetic has no
method-specific parameters.
TIES
Bases: DirectionMerge
Prune task vectors, resolve their signs, and merge agreeing entries.
topk retains a magnitude fraction per task vector (or a percentage
above one); merging_type selects "mean" (default), "sum", or
"max" aggregation. Set low_memory to process checkpoint tensors
incrementally rather than constructing a flattened task-vector bank.
DARE
Bases: DirectionMerge
Merge randomly sparsified task vectors with optional expectation-preserving rescaling.
drop_rate (or p) controls the fraction of delta entries removed from
each task. Set seed for reproducible masks and low_memory to process
checkpoint tensors without materializing the full flattened task-vector bank.
TSV
Bases: DirectionMerge
Merge matrix-valued task deltas through truncated singular-vector components.
sv_reduction and max_rank control the retained rank; svd_dtype
controls decomposition precision. One-dimensional deltas are zero by default
or averaged when vector_1d_merge is "average".
IsoC
Bases: DirectionMerge
Merge matrix deltas after replacing their singular spectrum with its mean.
The method operates on compatible two-dimensional floating-point tensors.
Set vector_1d_merge to "average" to include one-dimensional task
deltas; otherwise they remain unchanged from the base model.
IsoCTS
Bases: DirectionMerge
Compose matrix deltas from common and task-specific singular subspaces.
common_space_fraction allocates the shared subspace; the remaining rank
is divided across tasks. As with other matrix methods, one-dimensional
tensors are controlled by vector_1d_merge.
CART
Bases: DirectionMerge
Compose low-rank task-vector updates with Cartesian pruning and scaling.
pruning_rank selects the retained rank fraction for matrix deltas and
scaling_coeffs scales the resulting direction before the common alpha
interpolation is applied.
PCB
Bases: DirectionMerge
Balance flattened task vectors through intra- and inter-task signals.
PCB clamps absolute deltas by the clamp_min_ratio and
clamp_max_ratio quantiles, builds an attention scale with att_ratio,
then applies the task-weight multiplier lam. The ratios are validated in
the method implementation.
ACTMerge
Bases: DirectionMerge
ACTMat / ACTMerge on dense task vectors.
For linear 2D weights we merge deltas with Δ* = Σ_i w_i Δ_i (Δ_i^T Δ_i) (Σ_j w_j Δ_j^T Δ_j)^† and then apply the resulting direction on top of the shared base model.
Non-matrix tensors default to weighted averaging, which matches the practical recipe described in the paper for parameters outside linear layer weights.
DC-Merge
Bases: DirectionMerge
Merge dense task deltas through whitened low-rank coordinate covers.
The method truncates and optionally smooths each matrix spectrum, merges
their core matrices with cover_merge_method, and maps the result back
through the coordinate cover. LoRA checkpoints must be materialized into
dense deltas before this method is called.
WUDI
Bases: DirectionMerge
Solve the WUDI matrix objective independently for each tensor.
The default closed_form solver uses a ridge-regularized linear solve;
solver: "gd" instead optimizes the objective with Adam. One-dimensional
tensors use the vector_1d_merge fallback, which defaults to averaging.