您正在查看 main 版本,它需要从源代码安装. 如果你想使用常规 pip 安装,请查看最新的稳定版本 (v0.8.8).
加入 Hugging Face 社区
并获得增强型文档体验
入门
LLM 微调
使用 AutoTrain,您可以轻松地使用自己的数据微调大型语言模型 (LLM)!
AutoTrain 支持以下类型的 LLM 微调
- 因果语言建模 (CLM)
- 掩码语言建模 (MLM) [即将推出]
数据准备
LLM 微调接受 CSV 格式的数据。
SFT/通用训练器的数据格式
对于 SFT/通用训练器,数据应采用以下格式
text |
---|
human: hello \n bot: hi nice to meet you |
human: how are you \n bot: I am fine |
human: What is your name? \n bot: My name is Mary |
human: Which is the best programming language? \n bot: Python |
此格式的示例数据集可在此处找到:https://huggingface.co/datasets/timdettmers/openassistant-guanaco
对于 SFT/通用训练,您的数据集必须包含一个 text
列
奖励训练器的数据格式
对于奖励训练器,数据应采用以下格式
text | rejected_text |
---|---|
human: hello \n bot: hi nice to meet you | human: hello \n bot: leave me alone |
human: how are you \n bot: I am fine | human: how are you \n bot: I am not fine |
human: What is your name? \n bot: My name is Mary | human: What is your name? \n bot: Whats it to you? |
human: Which is the best programming language? \n bot: Python | human: Which is the best programming language? \n bot: Javascript |
对于奖励训练器,您的数据集必须包含一个 text
列(即选定的文本)和一个 rejected_text
列。
DPO/ORPO 训练器的数据格式
对于 DPO/ORPO 训练器,数据应采用以下格式
prompt | text | rejected_text |
---|---|---|
hello | hi nice to meet you | 别烦我 |
你好吗 | 我很好 | 我不太好 |
你叫什么名字? | 我叫玛丽 | 关你什么事? |
你叫什么名字? | 我叫玛丽 | 我没有名字 |
哪种编程语言最好? | Python | Javascript |
哪种编程语言最好? | Python | C++ |
哪种编程语言最好? | Java | C++ |
对于 DPO/ORPO 训练器,您的数据集必须包含一个prompt
列,一个text
列(又称选定文本)和一个rejected_text
列。
对于所有任务,您可以使用 CSV 和 JSONL 文件!
< > 在 GitHub 上更新