Skip to content

teknium1/ShareGPT-Builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published