🚀 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 |
任務類型 |
文本摘要 |