🚀 SummLlama3-8B
你是否正在寻找一个能够跨多个领域生成更符合人类偏好摘要的摘要生成器?我们的SummLlama3-8B可能正是你所需要的!
SummLlama3基于Llama3-8B-Instruct进行初始化,并使用直接偏好优化(DPO)方法,基于大规模(超过10万条)摘要反馈进行了额外训练。这些反馈涵盖了从短文本到长文本的各种输入文档,包括对话和非对话格式,并且跨越了七个不同的领域:
- 四个非对话领域:新闻、生活方式、报告、医学
- 三个对话领域:日常生活、访谈、会议
令人惊讶的是,它在性能上超过了规模几乎大10倍的Llama3-70B-Instruct,甚至超过了GPT-4o,同时还提供了更快的推理速度。
✨ 主要特性
- 多领域适用:支持多种领域的文本摘要生成,包括新闻、生活、报告、医学等非对话领域,以及日常生活、访谈、会议等对话领域。
- 性能卓越:在忠实度、完整性和简洁性方面表现出色,超过了Llama3-70B-Instruct和GPT-4o,同时推理速度更快。
- 基于反馈训练:使用大规模摘要反馈进行训练,生成的摘要更符合人类偏好。
📦 安装指南
文档未提供安装步骤,故跳过此章节。
💻 使用示例
基础用法
我们建议使用以下提示来获取摘要,因为我们使用此提示对模型进行了训练。
def format_chat_template(document):
instruction = "Please summarize the input documnet."
row_json = [{"role": "user", "content": f"Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{instruction}\n\n### Input:\n{document}\n\n### Response:\n"}]
return tokenizer.apply_chat_template(row_json, tokenize=False)
📚 详细文档
评估结果
-
自动化评估结果
| 配置 | 忠实度 | 完整性 | 简洁性 | 平均得分 |
|----------|------------|-----------|-----------|----------|
| Llama3-8B-Instruct | 0.864 | 0.583 | 0.450 | 0.632 |
| Llama3-70B-Instruct | 0.931 | 0.596 | 0.487 | 0.671 |
| GPT-4o | 0.940 | 0.657 | 0.437 | 0.678 |
| SummLlama3-8B | 0.931 | 0.614 | 0.659 | 0.735 |
| SummLlama3-70B | 0.950 | 0.632 | 0.754 | 0.779 |
-
人工评估结果
| 配置 | 忠实度 | 完整性 | 简洁性 | 平均得分 |
|----------|------------|-----------|-----------|----------|
| Llama3-8B-Instruct | 0.902 | 0.636 | 0.784 | 0.774 |
| Llama3-70B-Instruct | 0.953 | 0.659 | 0.792 | 0.801 |
| SummLlama3-8B | 0.980 | 0.697 | 0.959 | 0.879 |
示例对比
以下是一个示例,展示了SummLlama3-8B相对于Llama3-8/70B-Instruct在摘要生成上的改进:
说话者 |
对话内容 |
Person 1 |
Hey, Paul, you're still having Thanksgiving dinner at my house on Thursday, right? |
Person 2 |
Yeah, thanks again for the invitation. I was worried I'd have to spend it alone after my parents announced they'd be in Finland. |
Person 1 |
I think it's strange that you're not going with them. Is it because of the cold weather in Northern Europe? |
Person 2 |
Not exactly. I have a lot of work to do next week. |
Person 1 |
Well, I'm glad you won't be alone on a holiday. It'll be great to have you celebrate with us. The more the merrier! |
Person 2 |
Exactly, how many people will be there? |
Person 1 |
Let's see, my parents, my grandpa, my sister, my brother-in-law, my niece and my two cousins, plus us. So, ten people altogether. |
Person 2 |
Should I bring anything? |
Person 1 |
Nope, we've got it covered. |
Person 2 |
Come on, I hate to show up empty-handed. You are being so generous to have me. I know! I'll bring pie. I'll make a great pumpkin pie. |
Person 1 |
Sounds delicious, but my sister has already volunteered for dessert. Look, don't worry about it. There will be tons of food. Turkey, stuffing, green beans, sweet potatoes. |
Person 2 |
Wow, I'm getting hungry just thinking about it. How about this, I'll bring a nice bottle of wine. You can never have too much of that. |
Person 1 |
Well, isn't that the truth? Sounds good to me. |
模型 |
摘要 |
Llama3-8B-Instruct |
Person1邀请Person2周四到他家共进感恩节晚餐。Person2接受了邀请,称父母宣布要去芬兰后,他担心自己要独自过节。Person1向Person2保证他们很欢迎他,人越多越热闹。Person2询问有多少人参加,得知包括家人和表亲在内共有10人。Person2提出带礼物,但Person1拒绝了,说他们什么都准备好了。Person2坚持要带,提出带一瓶酒或一个派,但Person1表示他们的姐姐已经主动提出带甜点。 |
Llama3-70B-Instruct |
Person 1邀请Person 2周四到他家过感恩节晚餐。Person 2对邀请表示感激,并解释说由于工作原因不能和父母去芬兰。Person 1很高兴他们能和家人一起庆祝,届时将有10人参加。当Person 2提出带点东西时,Person 1拒绝了,但最终同意让他们带一瓶酒。 |
SummLlama3-8B |
对话围绕感恩节晚餐安排展开,Person2(Paul)确认周四会参加Person1(主人)家的晚餐,讨论了带什么东西以及哪些已经安排好,最终确定Person2带酒而不是派,因为其他人会负责甜点。 |
SummLlama3-8B的摘要更符合人类偏好,原因如下:
- 核心聚焦:准确抓住了对话的主要主题,即感恩节晚餐的安排。突出了两人确认计划、讨论带什么以及最终确定Person2带酒而非派的过程,保持了核心上下文。
- 包含关键事实:涵盖了对话的重要细节,包括Person2最初提出带甜点(南瓜派)以及因另一名家庭成员负责甜点而改为带酒的转变。其他摘要往往忽略或简化了这一过程,而SummLlama3-8B完整地捕捉了互动的关键事件。
- 清晰简洁:结构简洁明了,有效地总结了对话,没有不必要的细节。以清晰的方式呈现了讨论的流程和结果,使读者易于理解。
- 准确描述角色:明确将Person1识别为主人,Paul(Person2)识别为客人,有助于澄清他们的关系和对话的性质。与其他摘要相比,SummLlama3-8B的这一区分更加明确。
🔧 技术细节
SummLlama3基于Llama3-8B-Instruct进行初始化,并使用直接偏好优化(DPO)方法,基于大规模(超过10万条)摘要反馈进行了额外训练。反馈涵盖了多种输入文档和七个不同领域。
📄 许可证
文档未提供许可证信息,故跳过此章节。
其他版本
- SummLlama3-70B:https://huggingface.co/DISLab/SummLlama3-70B
- SummLlama3.1系列
- https://huggingface.co/DISLab/SummLlama3.1-8B
- https://huggingface.co/DISLab/SummLlama3.1-70B
- SummLlama3.2系列:https://huggingface.co/DISLab/SummLlama3.2-3B
相关论文
请参考我们的论文,了解如何在文本摘要的背景下利用大语言模型生成的反馈。
信息表格
属性 |
详情 |
基础模型 |
meta-llama/Meta-Llama-3-8B-Instruct |
任务类型 |
文本摘要 |