HuggingFace镜像/Llama-3.1-Tulu-3-8B-DPO
模型介绍文件和版本分析
下载使用量0
Tulu 3 banner

Llama-3.1-Tulu-3-8B-DPO

Tülu3 是领先的指令遵循模型系列,提供完全开源的数据、代码和流程,旨在作为现代训练后技术的综合指南。 Tülu3 不仅针对聊天功能进行优化,还致力于在 MATH、GSM8K 和 IFEval 等多种任务上实现最先进的性能。

模型说明

  • 模型类型:基于公开可用数据、合成数据和人工创建数据混合训练的模型。
  • 语言(自然语言处理):主要为英语
  • 许可证:Llama 3.1 社区许可协议
  • 微调基础模型:allenai/Llama-3.1-Tulu-3-8B-SFT

模型来源

  • 训练代码库:https://github.com/allenai/open-instruct
  • 评估代码库:https://github.com/allenai/olmes
  • 论文:https://arxiv.org/abs/2411.15124
  • 演示:https://playground.allenai.org/

模型系列

阶段Llama 3.1 8BLlama 3.1 70B
基础模型meta-llama/Llama-3.1-8Bmeta-llama/Llama-3.1-70B
有监督微调(SFT)allenai/Llama-3.1-Tulu-3-8B-SFTallenai/Llama-3.1-Tulu-3-70B-SFT
直接偏好优化(DPO)allenai/Llama-3.1-Tulu-3-8B-DPOallenai/Llama-3.1-Tulu-3-70B-DPO
最终模型(RLVR)allenai/Llama-3.1-Tulu-3-8Ballenai/Llama-3.1-Tulu-3-70B
奖励模型(RM)allenai/Llama-3.1-Tulu-3-8B-RM(与 8B 相同)
阶段Llama 3.1 405B
基础模型meta-llama/llama-3.1-405B
有监督微调(SFT)allenai/llama-3.1-Tulu-3-405B-SFT
直接偏好优化(DPO)allenai/llama-3.1-Tulu-3-405B-DPO
最终模型(RLVR)allenai/llama-3.1-Tulu-3-405B
奖励模型(RM)(与 8B 相同)

使用模型

通过 HuggingFace 加载

要通过 HuggingFace 加载模型,请使用以下代码片段:

from transformers import AutoModelForCausalLM

tulu_model = AutoModelForCausalLM.from_pretrained("allenai/Llama-3.1-Tulu-3-8B-DPO")

VLLM

作为一个 Llama 基础模型,该模型可以轻松通过以下方式部署:

vllm serve allenai/Llama-3.1-Tulu-3-8B-DPO

请注意,由于Llama的聊天模板较长,您可能需要使用--max_model_len=8192。

聊天模板

我们模型的聊天模板格式如下:

<|user|>\nHow are you doing?\n<|assistant|>\nI'm just a computer program, so I don't have feelings, but I'm functioning as expected. How can I assist you today?<|endoftext|>

或者展开新行后:

<|user|>
How are you doing?
<|assistant|>
I'm just a computer program, so I don't have feelings, but I'm functioning as expected. How can I assist you today?<|endoftext|>

它也嵌入在分词器中,用于 tokenizer.apply_chat_template。

系统提示

在 Ai2 演示中,我们默认使用以下系统提示:

You are Tulu 3, a helpful and harmless AI Assistant built by the Allen Institute for AI.

该模型的训练未预设特定的系统提示。

偏差、风险与局限性

Tülu3 模型的安全训练有限,且不像 ChatGPT 那样在响应生成过程中部署实时过滤机制,因此该模型可能会产生有问题的输出(尤其是在被提示这样做时)。

用于训练基础 Llama 3.1 模型的语料库规模和构成尚不清楚,但很可能包含网络数据以及书籍、代码等技术来源的混合内容。

有关此类信息的示例,请参见 Falcon 180B 模型卡片。

性能

基准测试(评估)Tülu 3 SFT 8BTülu 3 DPO 8BTülu 3 8BLlama 3.1 8B InstructQwen 2.5 7B InstructMagpie 8BGemma 2 9B InstructMinistral 8B Instruct
平均值60.464.464.862.257.844.755.258.3
MMLU(零样本,思维链)65.968.768.271.276.662.074.668.5
PopQA(15 样本)29.329.329.120.218.122.528.320.2
TruthfulQA(6 样本)46.856.155.055.163.157.061.455.5
BigBenchHard(3 样本,思维链)67.965.866.062.821.70.92.556.2
DROP(3 样本)61.362.562.661.554.449.458.856.2
MATH(4 样本思维链,Flex)31.542.043.742.514.85.129.840.0
GSM8K(8 样本,思维链)76.284.387.683.483.861.279.780.0
HumanEval(pass@10)86.283.983.986.393.175.471.791.0
HumanEval+(pass@10)81.478.679.282.989.769.167.088.5
IFEval(宽松提示)72.881.182.480.674.738.869.956.4
AlpacaEval 2(LC % 胜率)12.433.534.524.229.049.043.731.4
安全性(6 任务平均)93.187.285.575.275.046.475.556.2
基准测试(评估)Tülu 3 70B SFTTülu 3 DPO 70BTülu 3 70BLlama 3.1 70B InstructQwen 2.5 72B InstructHermes 3 Llama 3.1 70BNemotron Llama 3.1 70B
平均值72.675.976.073.471.568.365.5
MMLU(零样本,思维链)78.983.383.185.385.580.483.8
PopQA(15 样本)48.646.346.546.430.648.136.4
TruthfulQA(6 样本)55.767.967.666.869.966.562.6
BigBenchHard(3 样本,思维链)82.781.882.073.867.282.10.7
DROP(3 样本)77.274.174.377.034.273.268.8
MATH(4 样本思维链,Flex)53.762.363.056.474.341.955.0
GSM8K(8 样本,思维链)91.193.593.593.789.590.084.7
HumanEval(pass@10)92.992.492.493.694.089.694.1
HumanEval+(pass@10)87.388.488.089.590.885.985.5
IFEval(宽松提示)82.182.683.288.087.676.079.9
AlpacaEval 2(LC % 胜率)26.349.649.833.447.728.466.1
安全性(6 任务平均)94.489.088.376.587.057.969.0
基准测试(评估)Tülu 3 405B SFTTülu 3 405B DPOTülu 3 405BLlama 3.1 405B InstructNous Hermes 3 405BDeepseek V3GPT 4o (11-24)
不含安全性的平均值76.379.080.078.174.479.080.5
含安全性的平均值77.579.680.779.073.575.981.6
MMLU(5 样本,思维链)84.486.687.088.084.982.187.9
PopQA(3 样本)55.755.455.552.954.244.953.6
BigBenchHard(零样本,思维链)88.088.888.687.187.789.583.3
MATH(4 样本,Flex)63.459.967.366.658.472.568.8
GSM8K(8 样本,思维链)93.694.295.595.492.794.191.7
HumanEval(pass@10)95.797.295.995.992.394.697.0
HumanEval+(pass@10)93.393.992.990.386.991.692.7
IFEval(宽松提示)82.485.086.088.481.988.084.8
AlpacaEval 2(LC % 胜率)30.449.851.438.530.253.565.0
安全性(6 任务平均)87.785.586.786.865.872.290.9

超参数

DPO:

  • 学习率:5 × 10⁻⁷(8B),2.0e-7(70B、405B)
  • 学习率调度:线性
  • 批大小(有效):32(8B),128(70B),256(405B)
  • KL惩罚系数:5
  • 预热比例:0.1
  • 最大序列长度:2,048
  • 训练轮次:1

许可与使用

所有 Llama 3.1 Tülu3 模型均根据 Meta 的 Llama 3.1 社区许可协议 发布。 Llama 3.1 根据 Llama 3.1 社区许可授权,版权所有 © Meta Platforms, Inc. Tülu3 旨在用于研究和教育用途。 如需更多信息,请参阅我们的 负责任使用指南。

这些模型是使用包含第三方模型生成输出的混合数据集进行微调的,并受附加条款约束: Gemma 使用条款 和 Qwen 许可协议(模型使用 Qwen 2.5 进行了改进)。

引用

如果 Tülu3 或任何相关材料对您的工作有所帮助,请引用:

@article{lambert2024tulu3,
  title = {Tülu 3: Pushing Frontiers in Open Language Model Post-Training},
  author = {
    Nathan Lambert and 
    Jacob Morrison and 
    Valentina Pyatkin and 
    Shengyi Huang and 
    Hamish Ivison and 
    Faeze Brahman and 
    Lester James V. Miranda and 
    Alisa Liu and 
    Nouha Dziri and 
    Shane Lyu and 
    Yuling Gu and 
    Saumya Malik and 
    Victoria Graf and 
    Jena D. Hwang and 
    Jiangjiang Yang and
    Ronan Le Bras and
    Oyvind Tafjord and
    Chris Wilhelm and
    Luca Soldaini and 
    Noah A. Smith and 
    Yizhong Wang and 
    Pradeep Dasigi and 
    Hannaneh Hajishirzi
  },
  year = {2024},
  email = {tulu@allenai.org}
}