Quick-start guide to fine-tuning ChatGPT using Python. Includes scripts for data preprocessing, model training, and evaluation.
快速入门指南: 使用Python微调ChatGPT。包含数据预处理、模型训练和评估脚本。
chatgpt-finetuning/
│
├── data/
│ ├── raw/
│ │ ├── training_data.txt
│ │ └── validation_data.txt
│ └── processed/
│ └── ...
│
├── scripts/
│ ├── preprocess_data.py
│ ├── upload_data.py
│ └── finetuning.py
│
├── notebooks/
│ ├── fine-tuning.ipynb
│ ├── fine-tuning-format.ipynb
│ ├── fine-tuning-format-comparison.ipynb
│ └── 视频解说.ipynb
│
├── README.md
└── requirements.txt
- Clone the Repository / 克隆仓库:
git clone https://github.com/yuyou-dev/chatgpt-fine-tuning.git
cd chatgpt-fine-tuning
- Install Dependencies / 安装依赖:
pip install -r requirements.txt
- Fine-tuning the Model / 微调模型:
Navigate to the scripts/
directory and run the script to preprocess data:
python3 preprocess_data.py
Run the upload script:
python3 upload_data.py
Run the fine-tuning script:
python3 finetuning.py
Run API test on PlayGround
We welcome contributions! Please open an issue or submit a pull request on GitHub. 我们欢迎各种贡献!请在GitHub上开启一个问题(issue)或提交一个拉取请求(pull request)。