Email the Author
You can use this page to email J. Paul Liu about How to Build and Fine-Tune a Small Language Model.
About the Book
How to Build and Fine-Tune a Small Language Model is a practical, end-to-end guide for anyone who wants to move from AI user to AI builder. Based on real graduate courses, research workshops, and industry bootcamps, this book shows that you don’t need billion-dollar infrastructure to create powerful AI systems—you only need a laptop, curiosity, and the right roadmap.
The book demystifies modern language models by guiding you through the full pipeline:
- understanding transformer architecture step-by-step (you build a working GPT in Chapter 2),
- pretraining and fine-tuning small models on your own data,
- aligning models with DPO,
- and deploying real applications on consumer hardware.
The examples are drawn from real scientific and professional use cases—geohazard analysis, legal document processing, historical text analysis, multilingual customer support, and more—reflecting how this material was used successfully by scientists, researchers, and practitioners in workshops and production settings .
All code is provided as Google Colab notebooks, allowing readers to click, run, and learn without installation or expensive hardware .
By the end, readers will know how to build, train, align, and deploy small language models (125M–350M parameters) with confidence—and more importantly, will understand the trade-offs behind practical AI systems and how to choose the right design for their needs .
This is not a research monograph—it is a builder’s manual. A clear, hands-on path for beginners, researchers, and non-programmers who want to bring AI to their own domain.
About the Author
Liu, J. Paul. 2025. *How to Build and Fine-Tune a Small Language Model*. Amazon Kindle Direct Publishing., 485 p.