This is a merge of pre-trained language models created using mergekit.

Merge Details

Merge Method

This model was merged using the Task Arithmetic merge method using medalpaca-7b as a base.

Task Arithmetic: Merging LLMs with Vector Algebra

Task Arithmetic is a powerful model merging technique where the knowledge learned during fine-tuning on a specific task is isolated as a task vector.

  • Task Vector Calculation: This vector represents the change in weights from the base model to the fine-tuned model.

    Task Vector = Weights_Fine-Tuned - Weights_Base

  • Merging: To combine multiple skills, it add the task vectors for each skill back to the base model's weights.

    Model_Merged = Weights_Base + sum(Task Vectors)

  • Editing/Forgetting: To remove a specific learned capability, you subtract its task vector from the model's weights.

This technique enables simple, linear arithmetic operations in the model's high-dimensional parameter space to efficiently compose, edit, or remove specific capabilities without retraining.


Would you like to know which popular model merging framework implements the Task Arithmetic technique?

Models Merged

The following models were included in the merge:

Configuration

The following YAML configuration was used to produce this model:

base_model: medalpaca-7b
dtype: bfloat16
merge_method: task_arithmetic
modules:
  default:
    slices:
    - sources:
      - layer_range: [0, 32]
        model: medalpaca-sft
        parameters:
          weight: 0.7
      - layer_range: [0, 32]
        model: medalpaca-kd
        parameters:
          weight: 0.7
      - layer_range: [0, 32]
        model: medalpaca-7b

Review all model metrics benchmark via Benchmark Document Preview.

Downloads last month
5
Safetensors
Model size
7B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 2 Ask for provider support

Model tree for MedSwin/MedSwin-Merged-TA-SFT-0.7

Merge model
this model
Quantizations
2 models

Datasets used to train MedSwin/MedSwin-Merged-TA-SFT-0.7

Space using MedSwin/MedSwin-Merged-TA-SFT-0.7 1

Collection including MedSwin/MedSwin-Merged-TA-SFT-0.7

Paper for MedSwin/MedSwin-Merged-TA-SFT-0.7