Spaces:
Runtime error
Runtime error
如果您使用自定义数据集,请务必在 `dataset_info.json` 文件中以如下格式提供您的数据集定义。 | |
```json | |
"数据集名称": { | |
"hf_hub_url": "HuggingFace上的项目地址(若指定,则忽略下列三个参数)", | |
"script_url": "包含数据加载脚本的本地文件夹名称(若指定,则忽略下列两个参数)", | |
"file_name": "该目录下数据集文件的名称(若上述参数未指定,则此项必需)", | |
"file_sha1": "数据集文件的SHA-1哈希值(可选)", | |
"ranking": "数据集是否包含排序后的回答(默认:false)", | |
"columns": { | |
"prompt": "数据集代表提示词的表头名称(默认:instruction)", | |
"query": "数据集代表请求的表头名称(默认:input)", | |
"response": "数据集代表回答的表头名称(默认:output)", | |
"history": "数据集代表历史对话的表头名称(默认:None)" | |
} | |
} | |
``` | |
其中 `prompt` 和 `response` 列应当是非空的字符串。`query` 列的内容将会和 `prompt` 列拼接作为模型输入。`history` 列应当是一个列表,其中每个元素是一个字符串二元组,分别代表用户请求和模型答复。 | |
对于训练奖励模型或 DPO 训练的数据集,`response` 列应当是一个字符串列表,排在前面的代表更优的答案,例如: | |
```json | |
{ | |
"instruction": "Question", | |
"input": "", | |
"output": [ | |
"Chosen answer", | |
"Rejected answer" | |
] | |
} | |
``` | |