Downloads · 30 days
27
3% of all-time downloads
Columbia-NLP/LION-LLaMA-3-8b-dpo-v1.0
LION-LLaMA-3-8b-dpo-v1.0 is a text generation model from Columbia-NLP. Use it when you need the model to write or continue text. It is set up for transformers.
The LION-series are trained using an empirically optimized pipeline that consists of three stages: SFT, DPO, and online preference learning (online DPO). We find simple techniques such as sequence packing, loss maskin…
Downloads · 30 days
27
3% of all-time downloads
All-time downloads
816
Public
Parameters
8B
64.2 GB on disk
Likes
2
Public
Click a slice to open those files.
.safetensors32.1 GB · 100%
From the Hugging Face model README
The LION-series are trained using an empirically optimized pipeline that consists of three stages: SFT, DPO, and online preference learning (online DPO). We find simple techniques such as sequence packing, loss masking in SFT, increasing the preference dataset size in DPO, and online DPO training can significantly improve the performance of language models. Our best models (the LION-series) exceed the performance of the official instruct models tuned with closed-source data and algorithms.
For training datasets, code, and evaluation scripts, please refer to our paper and codebase.
This model is finetuned from Columbia-NLP/LION-LLaMA-3-8b-sft-v1.0 using DPO from the LION pipeline.
meta-llama/Meta-Llama-3-8BColumbia-NLP/LION-LLaMA-3-8b-sft-v1.0| Model | Method | Size | Arena-Hard | AlpacaEval-2 | MT-Bench | OpenLLM |
|---|---|---|---|---|---|---|
| LLaMA-3-8b | - | 8B | - | - | - | 63.05 |
| LLaMA-3-8b-it | SFT+RS+DPO+PPO | 8B | 20.6 | 22.9 | 8.00 | 68.28 |
| LION-LLaMA-3-8b-sft-v1.0 (ours) | SFT | 8B | 11.3 | 17.9 | 7.58 | 68.71 |
| ⮕ LION-LLaMA-3-8b-dpo-v1.0 (ours) | SFT+DPO | 8B | 19.1 | 21.8 | 8.12 | 71.28 |
| LION-LLaMA-3-8b-odpo-v1.0 (ours) | SFT+DPO+ODPO | 8B | 22.0 | 26.8 | 8.19 | 71.41 |
To ensure reproducibility, please use the following chat templates:
import torch
from transformers import pipeline
pipe = pipeline(
"text-generation",
model="Columbia-NLP/LION-LLaMA-3-8b-dpo-v1.0",
device_map="auto",
torch_dtype=torch.bfloat16,
)
messages = [
# no system message for LLaMa
{
"role": "user",
"content": "Write a short paragraph where every sentence starts with the letter A."
},
]
outputs = pipe(
messages,
max_new_tokens=128,
do_sample=False,
stop_sequence="<|im_end|>",
)
print(outputs[0]["generated_text"][-1]["content"])
# Astonishingly, all animals adore appealing, aromatic apples.
# An array of apples always attracts adventurous ants.
# After analyzing, ants ascertain the apple's accessibility.
# Anticipation amplifies as they approach, anticipating an appetizing treat.
to inspect the chat template/manually do generation:
tokenizer = AutoTokenizer.from_pretrained("Columbia-NLP/LION-LLaMA-3-8b-dpo-v1.0")
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
print(prompt)
# tokenize prompt and use model.generate
Please refer to our paper and codebase.
If you find this model useful in your work, please consider citing our paper:
@misc{yu2024lionsempiricallyoptimizedapproach,
title={LIONs: An Empirically Optimized Approach to Align Language Models},
author={Xiao Yu and Qingyang Wu and Yu Li and Zhou Yu},
year={2024},
eprint={2407.06542},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2407.06542},
}
We thank the Columbia-NLP group and articulate.ai for providing OpenAI API credits and computational resources to conduct our experiments.