five

pietrolesci/gpt3_nli

收藏
Hugging Face2022-04-25 更新2024-03-04 收录
下载链接:
https://hf-mirror.com/datasets/pietrolesci/gpt3_nli
下载链接
链接失效反馈
官方服务:
资源简介:
## Overview Original dataset available [here](https://github.com/krandiash/gpt3-nli). Debiased dataset generated with GPT-3. ## Dataset curation All string columns are stripped. Labels are encoded with the following mapping ``` {"entailment": 0, "neutral": 1, "contradiction": 2} ``` ## Code to create the dataset ```python import pandas as pd from datasets import Dataset, ClassLabel, Value, Features import json # load data with open("data/dataset.jsonl", "r") as fl: df = pd.DataFrame([json.loads(line) for line in fl]) df.columns = df.columns.str.strip() # fix dtypes df["guid"] = df["guid"].astype(int) for col in df.select_dtypes(object): df[col] = df[col].str.strip() # encode labels df["label"] = df["label"].map({"entailment": 0, "neutral": 1, "contradiction": 2}) # cast to dataset features = Features( { "text_a": Value(dtype="string"), "text_b": Value(dtype="string"), "label": ClassLabel(num_classes=3, names=["entailment", "neutral", "contradiction"]), "guid": Value(dtype="int64"), } ) ds = Dataset.from_pandas(df, features=features) ds.push_to_hub("pietrolesci/gpt3_nli", token="<token>") ```
提供机构:
pietrolesci
原始信息汇总

数据集概述

  • 原始数据集链接:此处
  • 数据集类型:去偏见数据集,由GPT-3生成

数据集处理

  • 字符串列已去除空格

  • 标签编码映射如下:

    {"entailment": 0, "neutral": 1, "contradiction": 2}

数据集创建代码

  • 使用Python和Pandas库加载和处理数据
  • 数据加载自data/dataset.jsonl文件
  • 数据集特征包括:
    • text_a:字符串类型
    • text_b:字符串类型
    • label:分类标签,包含三个类别(entailment, neutral, contradiction)
    • guid:整数类型
  • 数据集已上传至Hugging Face Hub,仓库名为pietrolesci/gpt3_nli
5,000+
优质数据集
54 个
任务类型
进入经典数据集
二维码
社区交流群

面向社区/商业的数据集话题

二维码
科研交流群

面向高校/科研机构的开源数据集话题

数据驱动未来

携手共赢发展

商业合作