CoolFace
Modelpublic

QuantFactory/LLaMA-3-8B-SFR-Iterative-DPO-R-GGUF

sourceHugging Facellama3updated 2y agoView on Hugging Face
1likes568downloads
Model Card

Llama-3-8B-SFR-Iterative-DPO-R-GGUF

This is quantized version of Salesforce/LLaMA-3-8B-SFR-Iterative-DPO-R created using llama.cpp

Model Description

We release a state-of-the-art instruct model of its class, Llama-3-8B-SFR-Iterative-DPO-R. On all three widely-used instruct model benchmarks: Alpaca-Eval-V2, MT-Bench, Chat-Arena-Hard, our model outperforms all models of similar size (e.g., LLaMA-3-8B-it), most large open-sourced models (e.g., Mixtral-8x7B-it), and strong proprietary models (e.g., GPT-3.5-turbo-0613). The model is trained with open-sourced datasets without any additional human-/GPT4-labeling.

Model Releases

Training methods

We have developed a simple and efficient online RLHF recipe for LLM instruct training. Our recipe is DPO-based and thus much cheaper and simpler to train and tune compared to PPO-based approaches. Unlike widely-used offline DPO, the online component of our approach effectively mitigates distribution shifts during policy optimization. For a detailed exposition, please refer to our accompanying technical report.

Chat Benchmarks

**Model****Size****Method****LC Alpaca-Eval-V2****MT-Bench****Chat-Arena-Hard**
Small Open-Sourced Models
Gemma-7B-it7BSFT10.46.387.5
Zephyr-7B-beta7BVanilla DPO13.17.34-
Mistral-7B-v0.2-it7BSFT17.17.5112.6
Open-Chat-01067BSFT15.67.8-
Starling-7B-beta7BPPO25.88.1223.0
LLaMA-3-8B-it8BRS+DPO+PPO22.98.1620.6
Ours
Ours (SFT baseline)8BSFT10.27.695.6
Ours (DPO baseline)8BVanilla DPO22.58.1722.4
Ours (Online RLHF)8BIterative DPO31.38.4629.1
Large Open-Sourced Models
Vicuna-33b-v1.333BSFT17.67.128.6
Yi-34B-Chat34BSFT27.2-23.1
Mixtral-8x7B-it45B*SFT23.78.3023.4
Tulu-2-DPO-70B70BVanilla DPO21.27.8915.0
LLaMA-3-70B-it70BRS+DPO+PPO34.48.9541.1
Mixtral-8x22B-it141B*SFT30.98.6636.4
Proprietary Models
GPT-3.5-turbo-1106--19.38.3518.9
GPT-3.5-turbo-0613--22.78.3924.8
GPT-4-0613--30.29.1837.9
Claude-3-Opus--40.59.0060.4
GPT-4 Turbo (04/09)--55.0-82.6

Academic Benchmarks

**Model****Size****Method****GSM-8K****MMLU****HumanEval****TruthfulQA****ARC****MBPP**
LLaMA-3-8B-it8BRS+DPO+PPO79.666.061.643.959.561.1
Ours (SFT baseline)8BSFT74.264.765.253.461.462.3
Ours (DPO baseline)8BVanilla DPO79.864.563.461.865.260.3
Ours (Iterative RLHF)8BIterative DPO80.765.364.660.464.360.8

Usage

python
from transformers import AutoModelForCausalLM, AutoTokenizer

device = "cuda" 

model = AutoModelForCausalLM.from_pretrained("Salesforce/Llama-3-8B-SFR-Iterative-DPO-R")
tokenizer = AutoTokenizer.from_pretrained("Salesforce/Llama-3-8B-SFR-Iterative-DPO-R")

messages = [
    {"role": "user", "content": "I'm trying to teach myself to have nicer handwriting. Can you help?"},
]

model_inputs = tokenizer.apply_chat_template(messages, return_tensors="pt")

model_inputs = model_inputs.to(device)
model.to(device)

output_tokens = model.generate(model_inputs, max_new_tokens=1024, do_sample=True)
model_outputs = tokenizer.batch_decode(output_tokens)
print(model_outputs[0])

Limitations

Llama-3-8B-SFR-Iterative-DPO-R is a research model developed as part of our RLHF initiative at Salesforce. While safety and ethical considerations are integral to our alignment process, there remains the possibility that the model could generate offensive or unethical content, particularly under adversarial conditions. We are committed to continuous improvement in our models to minimize such risks and encourage responsible usage.

Original Model Citation

Please cite our papers if you find our models are useful.

bibtex
@misc{dong2024rlhf,
      title={RLHF Workflow: From Reward Modeling to Online RLHF}, 
      author={Hanze Dong* and Wei Xiong* and Bo Pang* and Haoxiang Wang* and Han Zhao and Yingbo Zhou and Nan Jiang and Doyen Sahoo and Caiming Xiong and Tong Zhang},
      year={2024},
      eprint={2405.07863},
      archivePrefix={arXiv},
      primaryClass={cs.LG}
}

@misc{xiong2024iterative,
      title={Iterative Preference Learning from Human Feedback: Bridging Theory and Practice for RLHF under KL-Constraint}, 
      author={Wei Xiong and Hanze Dong and Chenlu Ye and Ziqi Wang and Han Zhong and Heng Ji and Nan Jiang and Tong Zhang},
      year={2024},
      eprint={2312.11456},
      archivePrefix={arXiv},
      primaryClass={cs.LG}
}