数据集:

crumb/Clean-Instruct-440k

语言:

en

许可:

mit

任务:

对话
英文

数据集卡片:"Clean-Instruct"

yahma/alpaca-cleaned + crumb/gpt4all-clean + GPTeacher-Instruct-Dedup

这个数据集并不完美,但它包含了44.3万个高质量、半清洁的指南,且没有以"作为AI语言模型"开头。

from datasets import load_dataset
dataset = load_dataset("crumb/clean-instruct", split="train")
def promptify(example):
  if example['input']!='':
    return {"text": f"<instruction> {example['instruction']} <input> {example['input']} <output> {example['output']}"}
  return {"text": f"<instruction> {example['instruction']} <output> {example['output']}"}
dataset = dataset.map(promptify, batched=False)
dataset = dataset.remove_columns(["instruction", "input", "output"])