Skip to content
Projets

À propos

Model merging, task-vector rebasin, and fine-tuning for vision and LLM models.

IA et apprentissage automatique

Comment ces chiffres sont mesurés

Progression mesurée des étoiles

in 24h
0
in 7 days
+1
in 15 days
+3
in 1 month
Historique en cours

Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.

README.md

Original

merge-and-rebase

Python PyTorch OpenCLIP Documentation Docs deployment

merge-and-rebase is a research codebase for fine-tuning, model merging, task-vector transport, and evaluation across vision and text models.

Install

uv venv .venv
source .venv/bin/activate
uv pip install -e ".[data,dev]"

Use uv pip install -e . when dataset and development dependencies are not needed.

Quick Start

Run the released Vision8 Task Arithmetic example. Checkpoints referenced through hf-hub: are downloaded automatically.

python -m merge_and_rebase.eval.vision_merge \
  --config configs/vision8_task_arithmetic_hf_release.json

Transport a task vector to a different (wider/deeper) base with Ariadne, on vision or on Qwen decoders:

python -m merge_and_rebase.eval.vision_rebase --config configs/examples/vision8_ariadne_b16_to_l14.json
python -m merge_and_rebase.eval.llm_rebase    --config configs/examples/qwen2.5_0.5b_to_1.5b_ariadne.json

Official Implementations

This repository hosts the official implementation of:

Method Paper Venue Entry point Configs
GradFix Gradient-Sign Masking for Task Vector Transport Across Pre-Trained Models ICLR 2026 merge_and_rebase.eval.vision_rebase configs/vision8_gradfix_hf.json
TAK Dataless Weight Disentanglement in Task Arithmetic via Kronecker-Factored Approximate Curvature ICLR 2026 merge_and_rebase.finetune.train_vision finetune/configs/TAK/
DELTA Distilling Linearized Behavior into Non-Linear Fine-Tuning for Effective Task Arithmetic ICML 2026 merge_and_rebase.finetune.train_vision finetune/configs/DELTA/ (Full FT/, LoRA/)
Theseus Transporting Task Vectors across Different Architectures without Training ICML 2026 merge_and_rebase.eval.vision_rebase configs/vision8_theseus_all.json

Example launches:

# GradFix / Theseus: transport task vectors to a new base model
python -m merge_and_rebase.eval.vision_rebase --config configs/vision8_gradfix_hf.json
python -m merge_and_rebase.eval.vision_rebase --config configs/vision8_theseus_all.json

# TAK / DELTA: fine-tune task vectors (configs named <method>-<backbone>-<suite>.yaml)
python -m merge_and_rebase.finetune.train_vision \
  --vision-config src/merge_and_rebase/finetune/configs/TAK/vision-tak-kfac-vitb16-vision8.yaml
python -m merge_and_rebase.finetune.train_vision \
  --vision-config "src/merge_and_rebase/finetune/configs/DELTA/Full FT/vision-delta-vitb16-vision8.yaml"

Fine-tuned TAK and DELTA checkpoints are then merged with merge_and_rebase.eval.vision_merge (see Merging).

DINOv2 classification supports joint fine-tuning, frozen-backbone linear probing, classifier-then-backbone training, and backbone merging on vision8/14/20. See the DINOv2 workflow guide and runnable examples.

Documentation

  • Documentation site: rendered guides, tutorials, and API reference.
  • Getting started: environments, repository layout, and common commands.
  • Tutorials: end-to-end runs with released and local checkpoints.
  • Concepts: task vectors, bases, preparation, metrics, and compatibility.
  • Configuration reference: merge, rebasin, post-merge, and fine-tuning fields.
  • Artifacts and checkpoints: released checkpoints, manifests, validation, and local checkpoints.
  • Fine-tuning: vision and text configurations, strategies, regularizers, and logging.
  • DINOv2: training modes, task heads, vision8/14/20 presets, alpha search, checkpoints, and inference.
  • Merging: merge methods, evaluation, alpha search, and hyperparameter search.
  • Rebasin: transport methods (Ariadne, THESEUS, BiCo, ...), depth change, vision and LLM entrypoints.
  • Ariadne: the method, its main configuration and ablation options.
  • Changelog: changes, retired options and migration notes.
  • Methods reference: registered methods, configuration parameters, and source-level APIs.
  • Repository overview slides.

Citation

@software{panariello2026merge_and_rebase,
  author = {Panariello, Aniello and Rinaldi, Filippo and Porrello, Angelo and van de Weijer, Joost and Calderara, Simone},
  title = {Merge-and-Rebase: A Unified Framework and Evaluation Benchmark for Fine-Tuning, Model Merging, and Rebasin},
  year = {2026},
  url = {https://github.com/apanariello4/merge-and-rebase},
  version = {0.1.0}
}

GitHub citation metadata is available in CITATION.cff.

Explorer des projets similaires

Chargement…