Code Monkey home page Code Monkey logo

chat-dataset-curators-toolkit's Introduction

Chat Dataset Curators' Toolkit

Overview

The Unified Chat Dataset Converter is a tool designed to standardize various instruction/chat datasets into a single, unified format and then filter it with LLM-based chatbots. This project aims to facilitate research and development in Large Language Models by providing a consistent structure for diverse datasets.

Instruction following and chat datasets can both be seen as a system information followed by n rounds of user and assistant speeches. However, different formats are used for different datasets, which makes it difficult to train on them with a uniform format. The Unified Chat Dataset Converter in the toolkit aims to solve this problem by converting various datasets into a unified format.

Features

  • Prefix Customization: Users can specify prefixes for system information, user inputs, and AI replies, ensuring compatibility with different processing models.
  • Broad Compatibility: Offers functions to convert various original datasets available on Huggingface to the unified format.
  • Easy Integration: Designed for straightforward integration with existing NLP pipelines and workflows.

Getting Started

Prerequisites

  • Python 3.6 or higher
  • Access to datasets on Huggingface

Installation

  1. Clone the repository:
    git clone https://github.com/MilesQLi/Unified-Chat-Dataset-Converter.git
    
  2. Install required dependencies:
    pip install -r requirements.txt
    

Usage of Unified Chat Dataset Converter

  1. Set the prefixes for system information, user input, and AI replies in the configuration file.

  2. Define a list of the datasets you want to convert from Huggingface, including their types and paths.

    Example:

     from Dataset_unifier import convert_datasets
    
     sys_prefix = "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions."
     user_prefix = "\n\nUSER: "
     assist_prefix = "\nASSISTANT: "
     original_datasets = [('alpaca','teknium/GPTeacher-General-Instruct','input','response','instruction'),('alpaca','cognitivecomputations/dolphin,flan1m-alpaca-uncensored'),('alpaca','truthful_qa',None,'best_answer','question'),('sharegpt', "erfanzar/ShareGPT4")]
    
     convert_datasets(original_datasets, sys_prefix, user_prefix, assist_prefix)

Please check the details in the original_datasets variable to see how to handle different situations.

The aforementioned example will convert the datasets into Vicuna-1.1 format. The converted datasets will be combined to a DatasetDict and returned.

Supported Datasets

List of types of datasets from Huggingface that are currently supported by this tool:

  • Alpaca
  • ShareGPT
  • Capybara
  • ...

License

Apache 2.0

TODO

  • Add support for more dataset types
  • Add support for dataset cleaning

chat-dataset-curators-toolkit's People

Contributors

servis avatar menicefellow avatar

Stargazers

Sethu Iyer avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.