Instructions to use ayoubkirouane/Mistral-SLERP-Merged7B-DPO with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use ayoubkirouane/Mistral-SLERP-Merged7B-DPO with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("ayoubkirouane/Mistral-SLERP-Merged7B") model = PeftModel.from_pretrained(base_model, "ayoubkirouane/Mistral-SLERP-Merged7B-DPO") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Unsloth Studio
How to use ayoubkirouane/Mistral-SLERP-Merged7B-DPO with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for ayoubkirouane/Mistral-SLERP-Merged7B-DPO to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for ayoubkirouane/Mistral-SLERP-Merged7B-DPO to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for ayoubkirouane/Mistral-SLERP-Merged7B-DPO to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="ayoubkirouane/Mistral-SLERP-Merged7B-DPO", max_seq_length=2048, )
Mistral-SLERP-Merged7B-DPO
- DPO PEFT finetuned version from my Mistral-SLERP-Merged7B
What is DPO ?
Direct Preference Optimization (DPO) is an algorithm introduced in order to achieve precise control of the behavior of large-scale unsupervised language models (LMs). It is a parameterization of the reward model in Reinforcement Learning from Human Feedback (RLHF) that enables the extraction of the corresponding optimal policy in closed form. This allows for the solution of the standard RLHF problem with only a simple classification loss.
DPO eliminates the need for sampling from the LM during fine-tuning or performing significant hyperparameter tuning, making it stable, performant, and computationally lightweight. Experiments have shown that DPO can fine-tune LMs to align with human preferences as well as or better than existing methods. It has been found to be particularly effective in controlling the sentiment of generations and matching or improving response quality in summarization and single-turn dialogue.
- Downloads last month
- 2
Model tree for ayoubkirouane/Mistral-SLERP-Merged7B-DPO
Base model
ayoubkirouane/Mistral-SLERP-Merged7B