Train Your Own LLM - companion code
Chapter 8: Your First Fine-Tune

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
Run ch08_make_shop_data.py first: it writes the shop_*.jsonl files that Chapters 8-13
and 17 use. ch08_sft.py also needs dolly_clean_*.jsonl from Chapter 5.
ch08_compare.py and ch08_forgetting.py read the runs/ that ch08_sft.py and
ch08_house_style.py save.

FILES THAT NEED A GPU
- ch08_sft_gpu.py (Example 8.8: one 80 GB NVIDIA GPU)

FILES
- ch08_compare.py
- ch08_forgetting.py
- ch08_house_style.py
- ch08_json.py
- ch08_json_confusion.py
- ch08_make_shop_data.py
- ch08_sft.py
- ch08_sft_gpu.py
- ch08_style_facts.py
- ch08_template.py

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