Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference time
Paper • 2203.05482 • Published • 8
# Load model directly
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("jeiku/Linear_Base_3B", trust_remote_code=True, dtype="auto")This is a merge of pre-trained language models created using mergekit.
This model was merged using the linear merge method.
The following models were included in the merge:
The following YAML configuration was used to produce this model:
models:
- model: cxllin/StableHermes-3b
parameters:
weight: 1.0
- model: jondurbin/airoboros-3b-3p0
parameters:
weight: 1.0
- model: jeiku/Rosa_v1_3B
parameters:
weight: 1.0
merge_method: linear
dtype: float16
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jeiku/Linear_Base_3B", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)