Skip to content

Basic Examples

Start here to learn the fundamentals of FusionBench through hands-on examples.

Getting Started with FusionBench CLI

The quickest way to get started is to run your first fusion experiment:

fusion_bench \
    method=simple_average \
    modelpool=CLIPVisionModelPool/clip-vit-base-patch32_TA8 \
    taskpool=CLIPVisionModelTaskPool/clip-vit-classification_TA8
  • Structured Configs


    Learn how to build structured configuration files and group configurations effectively in FusionBench.

    Read More

  • CLIP Simple Average


    Merge clip vision models using simple average.

    Read More

  • CLIP Task Arithmetic


    Merge CLIP vision models using task arithmetic, allowing you to adjust the scaling factor as a hyperparameter.

    Read More

  • Evaluate Single CLIP Model


    Evaluate the performance of a single CLIP model on image classification tasks.

    Read More

  • Merge Large Language Models


    Merge large language models using SLERP.

    Read More

FusionBench as a Package

  • Import and Use Merging Algorithms


    Learn how to import and use different merging algorithms in FusionBench.

    Read More

  • Parallel Ensemble


    Learn how to create an ensemble from multiple CLIP vision models and inference in parallel using FusionBench.

    Read More

Prerequisites

Before running these examples, make sure you:

  1. Have FusionBench installed: pip install fusion-bench
  2. Have PyTorch and Transformers installed.
  3. Familiarize yourself with Hydra basics