ORPO: Monolithic Preference Optimization without Reference Model
Paper β’ 2403.07691 β’ Published β’ 75
Run OpenBabylon/MamayLM-ORPO-align-lora64 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Use HF Jobs to fine-tune https://huggingface.co/OpenBabylon/MamayLM-ORPO-align-lora64. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Use HF Jobs to run batch inference with https://huggingface.co/OpenBabylon/MamayLM-ORPO-align-lora64 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
How to use OpenBabylon/MamayLM-ORPO-align-lora64 with Transformers:
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("OpenBabylon/MamayLM-ORPO-align-lora64", device_map="auto")This model is a fine-tuned version of INSAIT-Institute/MamayLM-Gemma-2-9B-IT-v0.1. It has been trained using TRL.
from transformers import pipeline
question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
generator = pipeline("text-generation", model="OpenBabylon/MamayLM-ORPO-align-lora64", device="cuda")
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
print(output["generated_text"])
This model was trained with ORPO, a method introduced in ORPO: Monolithic Preference Optimization without Reference Model.
Cite ORPO as:
@article{hong2024orpo,
title = {{ORPO: Monolithic Preference Optimization without Reference Model}},
author = {Jiwoo Hong and Noah Lee and James Thorne},
year = 2024,
eprint = {arXiv:2403.07691}
}
Cite TRL as:
@misc{vonwerra2022trl,
title = {{TRL: Transformer Reinforcement Learning}},
author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallou{\'e}dec},
year = 2020,
journal = {GitHub repository},
publisher = {GitHub},
howpublished = {\url{https://github.com/huggingface/trl}}
}
Base model
google/gemma-2-9b
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("OpenBabylon/MamayLM-ORPO-align-lora64", device_map="auto")