Giter Site home page Giter Site logo

sharegpt-builder's Introduction

ShareGPT Builder

ShareGPT Builder is a versatile Flask application that provides two key functionalities for training Language Learning Models (LLMs).

The application is designed to run locally, and submitted examples will be stored locally in the applications directory, but can also be served as a web application to anyone.

Supervised Fine-Tuning (SFT) Conversation Sample Builder:

Firstly, it allows you to manually construct and store ShareGPT Formatted (SFT) conversations involving a system, a human, and GPT role. These conversations are stored in a JSON file, sft_data.json, and are automatically appended if the data file already exists.

For datasets using this format, refer to the Hermes 2.5 Dataset here.

image

Direct Preference Optimization (DPO) RLHF Sample Builder:

Secondly, the application also includes a DPO Sample Builder. This feature enables the creation of sample comparison conversation responses, for Reinforcement Learning from Human Feedback (RLHF). This data gets saved to dpo_data.json, and is in the Intel NeuralChat DPO format.

image

Installation

  1. Clone the repository:
git clone https://github.com/teknium1/sharegpt-builder.git
  1. Navigate to the project directory:
cd sharegpt-builder
  1. Install the required Python packages:
pip install flask

Or use the requirements file:

pip install -r requirements.txt

Usage

  1. Run the Flask application:
python app.py
  1. Open your web browser and navigate to http://localhost:5000.

  2. You will see a form with three text areas: one for the system prompt, one for the user prompt, and one for the GPT response. Fill in these fields and click "Submit" to save the conversation to the data.json file.

  3. To add more turns to the conversation, click the "Add Turn" button. This will add two more text areas: one for the user prompt and one for the GPT response.

  4. After adding all the turns, click "Submit" to save the entire conversation.

  5. The saved conversations can be viewed in the data.json file.

Contributing

Contributions are welcome and greatly appreciated! Every little bit helps, and credit will always be given.

Here are ways to contribute:

  1. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.
  2. Fork the repository on GitHub and start making your changes to a new branch.
  3. Write a test which shows that the bug was fixed or that the feature works as expected.
  4. Send a pull request and bug the maintainer until it gets merged and published.

Alternatively, you can contribute via submission of bugs or feature requests to the issues tab.

Note

The application is set to run in debug mode. For production use, make sure to turn off debug mode in app.py.

License

This project is licensed under the terms of the MIT license.

sharegpt-builder's People

Contributors

teknium1 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.