Python, Deep Learning, and LLMs:
A Crash Course for Complete Beginners

Yegor Tkachenko

Book cover

Buy on Amazon

This book is a coding and machine learning bootcamp in textbook form. You will get hands-on experience with the Python programming language, essential math concepts, neural nets – and, by the end, you will have coded and trained a pocket-sized language model. A high school math background is all you need to get started; no prior programming experience is required. Put in the work, and soon you will know, in concrete detail, how to create a miniature mind inside a chunk of silicon using code. If that is not magic, what is?

Citing the book

To cite this book, please use this bibtex entry:

@misc{tkachenko2025python2llms,
  author={Tkachenko, Yegor},
  title={Python, Deep Learning, and {LLMs}: 
    A Crash Course for Complete Beginners},
  year={2025},
  howpublished={Amazon {KDP}},
  note={\url{https://python2llms.org/}}
}

Contents

The print version is available on Amazon.

PDFs of the book contents are provided for free for non-commercial use only. You can get the full book as a single PDF. Alternatively, you can download individual book sections:

  1. Frontmatter
  2. 1 Python programming basics
  3. 2 Arrays of numbers and their algebra
  4. 3 Randomness and probabilities
  5. 4 Regression models
  6. 5 Deep learning
  7. 6 Language models for text prediction
  8. 7 In pursuit of artificial intelligence
  9. About the author
  10. Index

Code

All Python code from the book is available on GitHub.

Data

You can download the data sets utilized in the book as a single ~350 MB .zip archive. This backup is provided for reproducibility – in case the URLs referenced in the book die or the linked material is updated.

Misc.

If you notice any typos, do not hesitate to contact the author directly by email.

© Yegor Tkachenko