Downloads · 30 days
64
1% of all-time downloads
abideen/Mistral-v2-orpo
Mistral-v2-orpo is a text generation model from abideen. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
Downloads · 30 days
64
1% of all-time downloads
All-time downloads
8.3K
Public
Parameters
7.2B
29 GB on disk
Likes
1
Public
Click a slice to open those files.
.bin14.5 GB · 50%
From the Hugging Face model README

Mistral-v0.2-orpo is a fine-tuned version of the new Mistral-7B-v0.2 on argilla/distilabel-capybara-dpo-7k-binarized preference dataset using Odds Ratio Preference Optimization (ORPO). The model has been trained for 1 epoch. It took almost 8 hours on A100 GPU.
This model has been trained using LazyORPO. A colab notebook that makes the training process much easier. Based on ORPO paper

Odds Ratio Preference Optimization (ORPO) proposes a new method to train LLMs by combining SFT and Alignment into a new objective (loss function), achieving state of the art results. Some highlights of this techniques are:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
torch.set_default_device("cuda")
model = AutoModelForCausalLM.from_pretrained("abideen/Mistral-v0.2-orpo", torch_dtype="auto", trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained("abideen/Mistral-v0.2-orpo", trust_remote_code=True)
inputs = tokenizer('''
"""
Write a detailed analogy between mathematics and a lighthouse.
"""''', return_tensors="pt", return_attention_mask=False)
outputs = model.generate(**inputs, max_length=200)
text = tokenizer.batch_decode(outputs)[0]
print(text)