Views
No views yet
meta-llama/Meta-Llama-3-8B using SFT from the LION pipeline.meta-llama/Meta-Llama-3-8Bmeta-llama/Meta-Llama-3-8B| 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 |
1import torch
2from transformers import pipeline
3
4pipe = pipeline(
5 "text-generation",
6 model="Columbia-NLP/LION-LLaMA-3-8b-sft-v1.0",
7 device_map="auto",
8 torch_dtype=torch.bfloat16,
9)
10messages = [
11 # no system message for LLaMa
12 {
13 "role": "user",
14 "content": "Write a short paragraph where every sentence starts with the letter A."
15 },
16]
17outputs = pipe(
18 messages,
19 max_new_tokens=128,
20 do_sample=False,
21 stop_sequence="<|im_end|>",
22)
23print(outputs[0]["generated_text"][-1]["content"])
24# Amazing animals are fascinating creatures.
25# They are active all day, always alert.
26# They are adaptable to their environment.1tokenizer = AutoTokenizer.from_pretrained("Columbia-NLP/LION-LLaMA-3-8b-sft-v1.0")
2prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
3print(prompt)
4# tokenize prompt and use model.generate@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},
}