Resolving Interference When Merging Models
Paper • 2306.01708 • Published • 18
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("appvoid/test-mix-06")
model = AutoModelForCausalLM.from_pretrained("appvoid/test-mix-06")
messages = [
{"role": "user", "content": "Who are you?"},
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
tokenize=True,
return_dict=True,
return_tensors="pt",
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=40)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))This is a merge of pre-trained language models created using mergekit.
This model was merged using the TIES merge method using raidhon/coven_tiny_1.1b_32k_orpo_alpha as a base.
The following models were included in the merge:
The following YAML configuration was used to produce this model:
models:
- model: raidhon/coven_tiny_1.1b_32k_orpo_alpha
#no parameters necessary for base model
- model: appvoid/palmer-003
parameters:
density: 0.5
weight: 0.5
- model: appvoid/palmer-004-2406
parameters:
density: 0.5
weight: 0.5
merge_method: ties
base_model: raidhon/coven_tiny_1.1b_32k_orpo_alpha
parameters:
normalize: false
int8_mask: true
dtype: float16
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="appvoid/test-mix-06") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)