合成資料生成流程大解密:深入解析 Nemotron‑4 340B 背後的 "資料生產線"

更新 發佈閱讀 13 分鐘
延續上篇所介紹的 Nemotron-4 340B Technical Report 細說合成資料集的流程,可以依據需要使用其中的步驟(流程),建置自己的合成資料生產線

合成資料生成

合成提示生成

  • 使用 Mixtral-8x7B-Instruct-v0.1 生成合成提示。
  • 任務多樣性(寫作、開放式問答、封閉式問答)
  • 主題多樣性(例如詞幹、人文、日常生活)
  • 指令多樣性(例如json輸出、特定格式)
  • 98% 的資料通過生成合成資料來獲得。

生成流程說明

開放式問答提示

  • 收集 3K 個主題。
  • 提示產生器產生與對應主題相關的問題來產生開放式問答提示(例如 : 「什麼是機器學習?」)。
  • 對於與寫作相關的提示要求將問題細化為更詳細和具體(例如 : 「寫一篇關於機器學習的論文。」)。
  • 有關給定主題的某些類型文件的說明。

封閉式問答提示

  • 使用 C4 資料集中的文字。
  • 對於給定的文本,限制範圍(例如 : 「總結給定的文本」 或 「根據給定的文本,xxx 是什麼?」)。
  • 使用手動定義的範本(例如 : 從數學和 Python 程式設計中收集關鍵字)。
raw-image

合成對話生成

  • 每個對話包含三個回合(例如 : 「寫一篇關於機器學習的文章。您的答案應該包含三個段落)
  • 通過角色扮演和對話歷史設置模擬用戶互動情境(例如 : 「用戶:XXX;助理:XXX;用戶:XXX;」)。
  • 對話生成過程複雜度較高需要大量計算資源。

偏好資料生成

  • 使用10K 人工註釋的 HelpSteer2 偏好數據來訓練 Nemotron-4-340B-Reward。
  • 每個提示輸出的多個回應,判斷偏好排名並加上標註(例如 : 已選擇 / 拒絕回應)
  • 增加偏好數據的多樣性和覆蓋範圍。
  • 利用 Nemotron-4-340B-Reward 來評估對話的質量(幫助性、正確性、一致性、複雜性和冗長性)。

迭代優化

第一次迭代 (使用 Mixtral-8x7B-Instruct-v0.1)

  1. 使用 Mixtral-8x7B-Instruct-v0.1 作為資料生成模型。
  2. 產生的資料用於訓練 Nemotron-4-340B-Base(產生 340B-Interm-1-Instruct)
  3. 340B-Interm-1-Instruct 超越 Mixtral-8x7B-Instruct-v0.1 。證明可以透過弱監督來激發出強能力。

第二次迭代 (使用 340B-Interm-1-Instruct)

  1. 使用 Mixtral-8x7B-Instruct-v0.1 資料訓練的 340B-Interm-1-Instruct 作為資料生成模型。
  2. 產生的資料資料用於將 340B-Interm-2-Base 訓練為 340B-Interm-2-Chat

迭代說明

  • 當使用相同資料集時,基礎模型越強,產生的指導模型就越強。
  • 當使用相同的基礎模型時,更高品質的資料導致更強的指導模型。
  • 進行多輪資料產生和精煉,不斷提高模型的品質
raw-image

效果評估

自動評估(依據數據集)

  • HumanEval: 模型在程式語言生成上的能力
  • MBPP: 包括多種數據模態(如文本、圖像、聲音等)
  • IFEval: 評估模型在理解和執行各種指令上的準確性和一致性。
  • TFEval: 評估模型在對話中保持主題一致性和應對偏離主題干擾的能力。
粗體表示所有模型中得分最高,底線表示開源模型中得分最高

粗體表示所有模型中得分最高,底線表示開源模型中得分最高

人為評估(專門註釋團隊)

  • 任務分級
根據10 個不同的任務類別進行6個級別評估,包括5個品質的級別加上1個定義模型完全未能回答的級別。
比較 Nemotron-4-340B-Instruct 與 GPT-4-1106-preview 在十個任務中人為判定

比較 Nemotron-4-340B-Instruct 與 GPT-4-1106-preview 在十個任務中人為判定

人類對生成長度的感知

下劃線表示感知適當長度率較高的模型

下劃線表示感知適當長度率較高的模型

安全評估

AEGIS 安全評估中不安全回應佔比,越低越好

AEGIS 安全評估中不安全回應佔比,越低越好

使用LLM生成合成數據

參考 Nemotron-4 340B Technical Report 此篇附錄

Prompts Used for Synthetic Prompt Generation

1. Topics Generation

Prompt: Generate Macro Topics

Can you generate {n_macro_topics} comprehensive topics that encompass various
aspects of our daily life, the world, and science? Your answer should be a list
of topics. Make the topics as diverse as possible.For example, 1. Food and drinks.
\n2. Technology.\n


Prompt: Generate Subtopics based on Macro Topics

Can you generate {n_subtopics} comprehensive topics that encompass various aspects
of {text1}? Your answer should be a list of topics. Make the topics as diverse as
possible.

Prompt: Generate Math Macro Topics

Can you generate {n_macro_topics} comprehensive topics that encompass the mathematics
knowledge taughted in {school_level}? Your answer should be a list of topics. Make
the topics as diverse as possible.

Prompt: Generate Math Subtopics based on Macro Topics

List {n_subtopics} mathemathics topics that encompass various aspects of "{text1}".
Your answer should be a list of topics. Make the topics as diverse as possible.

Prompt: Classify if an entity is related to Math

Does the concept "{text1}" belong to one of the following categories?
- Math concepts taught at elementary school, middle school, high school, and univiersity.
- Important mathematics axioms, theorems, algorithms, equations, or inequalities.
- Representative math problems, functions, and applications.

Your answer should start with "Yes" or "No".

Prompt: Generate Python Macro Topics

List {n_macro_topics} important concepts in the python language.

Prompt: Generate Python Subtopics based on Macro Topics

List {n_subtopics} important concepts related to "{text1}" in the python language.

Prompt: Classify if an entity is related to Python Programming

Does the concept "{text1}" belong to one of the following categories?
- Programming concepts like loops, functions, and data structures in python.
- Important functions, objects, or libraries in python.
- Mathematical concepts like linear algebra which can be implemented in python.
- Basic algorithms or problems in computer science likes Greedy Search and Dynamics
programming which can be addressed in python.

Your answer should start with "Yes" or "No".

2. Open Q&A

Prompt: Generate Open Q&A questions based on Topics

Can you generate {n_openlines} questions or requests related to {text1}? The questions
and requests should be as diverse possible. Your answer should be a list.

Prompt: Revise Open Q&A questions

Question: {text1}

Can you revise the question above to include more contexts or details? The revised
questions can be any of the follows:
1. Adding some context to the original question. The context might state the
importance of the question, explain background knowledge, or add other reasonable
information.
2. Change the questions into a different format or style, e.g., imperative
statements, length requirements for the answer, etc.
3. Elongated questions that require to elaborate on specific topic or discuss a
certain point.
4. Any other related questions or statements.

The revised question should contain two, three, or four sentences. You should
generate {n_tasks} revised questions or statements in a list. Make them as
diverse as possible.


留言
avatar-img
留言分享你的想法!
avatar-img
AI 工程師的 LLM 筆記
0會員
14內容數
聊一聊提示工程、模型調校與優化技巧,同時分享一路走來的挑戰與突破,作為提醒未來的自己:別忘初心,走得更踏實。
2025/07/30
由 NVIDIA 發表,包括 Base、Instruct 與 Reward 三個版本,在 alignment 過程中超過 98% 的微調資料來自合成資料生成流程,展現有效運用 synthetic data 發展對齊模型的能力。
Thumbnail
2025/07/30
由 NVIDIA 發表,包括 Base、Instruct 與 Reward 三個版本,在 alignment 過程中超過 98% 的微調資料來自合成資料生成流程,展現有效運用 synthetic data 發展對齊模型的能力。
Thumbnail
2025/07/30
Phi‑3 系列透過大量高品質與合成資料訓練,並結合 RLHF、對齊與自動測試,推出 3.8B 至 14B 的小模型與 4.2B 參數的多模態 Phi‑3‑Vision,在理解、推理、生成與圖像理解任務上表現突破,支援手機部署與低延遲場景。
Thumbnail
2025/07/30
Phi‑3 系列透過大量高品質與合成資料訓練,並結合 RLHF、對齊與自動測試,推出 3.8B 至 14B 的小模型與 4.2B 參數的多模態 Phi‑3‑Vision,在理解、推理、生成與圖像理解任務上表現突破,支援手機部署與低延遲場景。
Thumbnail
2025/07/30
Microsoft Research 發表《Textbooks Are All You Need II: phi-1.5 technical report》,Phi-1.5 展現高品質合成資料(教科書等級)的潛力,以僅 1.3B 參數在常識推理與語言理解上媲美大型模型,挑戰「參數規模至上」的傳統觀點
Thumbnail
2025/07/30
Microsoft Research 發表《Textbooks Are All You Need II: phi-1.5 technical report》,Phi-1.5 展現高品質合成資料(教科書等級)的潛力,以僅 1.3B 參數在常識推理與語言理解上媲美大型模型,挑戰「參數規模至上」的傳統觀點
Thumbnail
看更多
你可能也想看
Thumbnail
還在煩惱平凡日常該如何增添一點小驚喜嗎?全家便利商店這次聯手超萌的馬來貘,推出黑白配色的馬來貘雪糕,不僅外觀吸睛,層次豐富的雙層口味更是讓人一口接一口!本文將帶你探索馬來貘雪糕的多種創意吃法,從簡單的豆漿燕麥碗、藍莓果昔,到大人系的奇亞籽布丁下午茶,讓可愛的馬來貘陪你度過每一餐,增添生活中的小確幸!
Thumbnail
還在煩惱平凡日常該如何增添一點小驚喜嗎?全家便利商店這次聯手超萌的馬來貘,推出黑白配色的馬來貘雪糕,不僅外觀吸睛,層次豐富的雙層口味更是讓人一口接一口!本文將帶你探索馬來貘雪糕的多種創意吃法,從簡單的豆漿燕麥碗、藍莓果昔,到大人系的奇亞籽布丁下午茶,讓可愛的馬來貘陪你度過每一餐,增添生活中的小確幸!
Thumbnail
要做會議記錄或課程筆記,想做逐字稿卻苦於打字速度不夠快嗎?錄音再慢慢回放浪費時間又容易恍神?這篇文章包你滿意,不用再浪費時間爬文了,你需要的逐字稿神器在這裡,保母級教學!
Thumbnail
要做會議記錄或課程筆記,想做逐字稿卻苦於打字速度不夠快嗎?錄音再慢慢回放浪費時間又容易恍神?這篇文章包你滿意,不用再浪費時間爬文了,你需要的逐字稿神器在這裡,保母級教學!
Thumbnail
利用文字紀錄,明確寫下自己的採購項目......
Thumbnail
利用文字紀錄,明確寫下自己的採購項目......
Thumbnail
自訂元件生成位置顧名思義就是可以指定部分HTML區塊渲染在特定的畫面上,即使在不同組件也能把A組件內的部分畫面,展現在B組件上,以下方程式舉例。
Thumbnail
自訂元件生成位置顧名思義就是可以指定部分HTML區塊渲染在特定的畫面上,即使在不同組件也能把A組件內的部分畫面,展現在B組件上,以下方程式舉例。
Thumbnail
Ae 小技巧:製作3D 方塊 動態後記系列會記錄一些我在製作中的記錄,可能是分解動畫、小技巧、發想、腳本......等等。 每篇都是小短篇,就是補充用的小筆記,沒有前後順序,可跳著閱讀。
Thumbnail
Ae 小技巧:製作3D 方塊 動態後記系列會記錄一些我在製作中的記錄,可能是分解動畫、小技巧、發想、腳本......等等。 每篇都是小短篇,就是補充用的小筆記,沒有前後順序,可跳著閱讀。
Thumbnail
Ae 小技巧:如何製作網格 動態後記系列會記錄一些我在製作中的記錄,可能是分解動畫、小技巧、發想、腳本......等等。 每篇都是小短篇,就是補充用的小筆記,沒有前後順序,可跳著閱讀。
Thumbnail
Ae 小技巧:如何製作網格 動態後記系列會記錄一些我在製作中的記錄,可能是分解動畫、小技巧、發想、腳本......等等。 每篇都是小短篇,就是補充用的小筆記,沒有前後順序,可跳著閱讀。
Thumbnail
這篇要搭建一個同時生成寫實照片跟動漫風格圖片的工作流,還可以幫線稿上色。
Thumbnail
這篇要搭建一個同時生成寫實照片跟動漫風格圖片的工作流,還可以幫線稿上色。
追蹤感興趣的內容從 Google News 追蹤更多 vocus 的最新精選內容追蹤 Google News