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 AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("WesPro/Llama3-RPLoRa-SmaugOrpo")
model = AutoModelForCausalLM.from_pretrained("WesPro/Llama3-RPLoRa-SmaugOrpo")
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]:]))YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
This is my previous Llama3 merge (OrpoSmaug-Slerp) with an extra LoRa for better RP on top.
Thanks to mradermacher, there are also GGUF quants (Q2_K-Q8_K & IQ3_XS-IQ4_XS) for this model available here: https://huggingface.co/mradermacher/Llama3-RPLoRa-SmaugOrpo-GGUF
base_model:
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: WesPro/Llama3-OrpoSmaug-Slerp-8B+ResplendentAI/RP_Format_Llama3
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="WesPro/Llama3-RPLoRa-SmaugOrpo") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)