In this project, I trained a Machine Learning model to mimic my behavior and conversation style by fine-tuning a GPT-3 model on my Facebook chat history.
-
Download Chat History from Facebook: Go to Facebook settings and select 'Download Your Information'.
-
Parse Data: Utilize the
parser.ipynb
Jupyter notebook to process the downloaded chat history. -
Fine-Tune the Model: Use the OpenAI Online Platform or the CLI to fine-tune the GPT-3.5 model.
-
Generate Answer Messages: Employ the
chat.ipynb
Jupyter notebook to create responses.
To obtain your Facebook chat history, visit: Facebook Data Download
Steps to download:
- Wait for the data prepration (usually takes 10-20 minutes)
- Download the data
- Copy it to source_conversations folder
See a comparison of the original Facebook conversation format and the GPT formatted data:
You can fine tune the model with the following two ways:
https://platform.openai.com/finetune
Execute the following CLI command to fine-tune a GPT model:
openai api fine_tunes.create -t 'conversations.jsonl' -m curie --n_epochs 3 --batch_size 128
For more details, visit the OpenAI Fine-Tuning Documentation:
https://platform.openai.com/docs/guides/fine-tuning/preparing-your-dataset
Estimated Training Prices For an estimation of the training costs, refer to the following image:
MIT License
Copyright (c) [2022] [Nemes Gyula Ádám]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.