phi2-pro
is a fine-tuned version of
microsoft/phi-2
on
argilla/dpo-mix-7k
preference dataset using
Odds Ratio Preference Optimization (ORPO)
. The model has been trained for 1 epoch.
💥 LazyORPO
This model has been trained using
LazyORPO
. A colab notebook that makes the training
process much easier. Based on
ORPO paper
🎭 What is ORPO?
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:
🧠 Reference model-free → memory friendly
🔄 Replaces SFT+DPO/PPO with 1 single method (ORPO)
🏆 ORPO Outperforms SFT, SFT+DPO on PHI-2, Llama 2, and Mistral
📊 Mistral ORPO achieves 12.20% on AlpacaEval2.0, 66.19% on IFEval, and 7.32 on MT-Bench out Hugging Face Zephyr Beta
💻 Usage
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
torch.set_default_device("cuda")
model = AutoModelForCausalLM.from_pretrained("abideen/phi2-pro", torch_dtype="auto", trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained("abideen/phi2-pro", 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)
🏆 Evaluation
COMING SOON
Runs of abideen phi2-pro on huggingface.co
141
Total runs
2
24-hour runs
9
3-day runs
29
7-day runs
18
30-day runs
More Information About phi2-pro huggingface.co Model
phi2-pro huggingface.co is an AI model on huggingface.co that provides phi2-pro's model effect (), which can be used instantly with this abideen phi2-pro model. huggingface.co supports a free trial of the phi2-pro model, and also provides paid use of the phi2-pro. Support call phi2-pro model through api, including Node.js, Python, http.
phi2-pro huggingface.co is an online trial and call api platform, which integrates phi2-pro's modeling effects, including api services, and provides a free online trial of phi2-pro, you can try phi2-pro online for free by clicking the link below.
abideen phi2-pro online free url in huggingface.co:
phi2-pro is an open source model from GitHub that offers a free installation service, and any user can find phi2-pro on GitHub to install. At the same time, huggingface.co provides the effect of phi2-pro install, users can directly use phi2-pro installed effect in huggingface.co for debugging and trial. It also supports api for free installation.