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.
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.
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.
- Clone the repository:
git clone https://github.com/teknium1/sharegpt-builder.git
- Navigate to the project directory:
cd sharegpt-builder
- Install the required Python packages:
pip install flask
Or use the requirements file:
pip install -r requirements.txt
- Run the Flask application:
python app.py
-
Open your web browser and navigate to
http://localhost:5000
. -
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. -
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.
-
After adding all the turns, click "Submit" to save the entire conversation.
-
The saved conversations can be viewed in the
data.json
file.
Contributions are welcome and greatly appreciated! Every little bit helps, and credit will always be given.
Here are ways to contribute:
- Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.
- Fork the repository on GitHub and start making your changes to a new branch.
- Write a test which shows that the bug was fixed or that the feature works as expected.
- 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.
The application is set to run in debug mode. For production use, make sure to turn off debug mode in app.py
.
This project is licensed under the terms of the MIT license.