Train Your Own LLM - companion code
Chapter 5: Data: The Part That Matters Most

HOW TO RUN
Use the Python environment from Chapter 4 (Python 3.12 or 3.13,
versions pinned in Appendix F). Unzip this folder, cd into it, and run each
script with: python <script>.py   (each example's caption in the book
gives its file name). Expected output is printed in the book.
Scripts download models and datasets from the Hugging Face Hub on first run.

CHAPTER NOTES
ch05_project1.py writes dolly_clean_*.jsonl and ch05_project4.py / ch05_project4_fix.py
write prefs_*.jsonl; later chapters (6, 8, 10) read these files, so run them first.

FILES THAT NEED A GPU
- None. Every script here ran on a CPU-only test machine,
  except any recipe the book marks as not run on our test machine.

FILES
- ch05_chat_template.py
- ch05_leakage.py
- ch05_load_local.py
- ch05_near_dup.py
- ch05_project1.py
- ch05_project2.py
- ch05_project3.py
- ch05_project4.py
- ch05_project4_fix.py
- ch05_quality.py
- ch05_scout_datasets.py
- ch05_ultrafeedback.py
- tickets.csv
- notes/2026-03-garden.md
- notes/2026-04-recipes.md

LICENSE
The code is released under the MIT License (see LICENSE).
Data files that scripts download keep their own licenses.
