reflection-tuning dataset generation (#349)

This commit is contained in:
Sebastian Raschka 2024-09-10 21:42:12 -05:00 committed by GitHub
parent 8ad50a3315
commit 835ed29dbf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 1077 additions and 4 deletions

View File

@ -122,7 +122,8 @@ Several folders contain optional materials as a bonus for interested readers:
- **Chapter 7:**
- [Dataset Utilities for Finding Near Duplicates and Creating Passive Voice Entries](ch07/02_dataset-utilities)
- [Evaluating Instruction Responses Using the OpenAI API and Ollama](ch07/03_model-evaluation)
- [Generating a Dataset for Instruction Finetuning](ch07/05_dataset-generation)
- [Generating a Dataset for Instruction Finetuning](ch07/05_dataset-generation/llama3-ollama.ipynb)
- [Improving a Dataset for Instruction Finetuning](ch07/05_dataset-generation/reflection-gpt4.ipynb)
- [Generating a Preference Dataset with Llama 3.1 70B and Ollama](ch07/04_preference-tuning-with-dpo/create-preference-data-ollama.ipynb)
- [Direct Preference Optimization (DPO) for LLM Alignment](ch07/04_preference-tuning-with-dpo/dpo-from-scratch.ipynb)

View File

@ -1,6 +1,7 @@
# Generating a Dataset for Instruction Finetuning
# Generating Datasets for Instruction Finetuning
This folder contains utility code that can be used for generating a dataset for instruction finetuning.
- [llama3-ollama.ipynb](llama3-ollama.ipynb): A notebook that creates a synthetic instruction finetuning dataset using Llama 3 and Ollama
- [reflection-gpt4.ipynb](reflection-gpt4.ipynb): A notebook that implements an instruction dataset refinement step based on reflection-tuning

View File

@ -0,0 +1,4 @@
{
"OPENAI_API_KEY": "sk-...",
"_comment": "Enter your API key from https://platform.openai.com/api-keys"
}

View File

@ -498,7 +498,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.6"
"version": "3.11.4"
}
},
"nbformat": 4,

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,2 @@
openai>=1.30.3
tqdm>=4.65.0

View File

@ -12,4 +12,4 @@
- [04_preference-tuning-with-dpo](04_preference-tuning-with-dpo) implements code for preference finetuning with Direct Preference Optimization (DPO)
- [05_dataset-generation](05_dataset-generation) contains code to generate synthetic datasets for instruction finetuning
- [05_dataset-generation](05_dataset-generation) contains code to generate and improve synthetic datasets for instruction finetuning