Train Your Own LLM - companion code
Chapter 20: Capstone: Your Model on a Laptop or Phone

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
pip install onnx==1.23.2 onnxruntime==1.30.0 
ch20_browser_test.py also needs: pip install playwright && playwright install chromium
Unzip next to the Chapter 17 and 19 folders, renamed ch17/ ch19/ ch20/: the scripts read
../ch19/runs/chess-3000.pt, ../ch19/games.json and ../ch17/emb_*.npy.

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
- categories.json
- ch11_gpt.py
- ch20_browser_test.py
- ch20_check_chess.py
- ch20_export_chess.py
- ch20_router.py
- chess.html

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