Build a Large Language Model

Build a Large Language Model (from Scratch)
by 作者: Sebastian Raschka (Author)
Publisher Finelybook 出版社: Manning Publications
Publication Date 出版日期: 2024-undefined-Oct.
Language 语言: English
pages 页数: : 400 pages
ISBN-10 书号: 1633437167
ISBN-13 书号: 9781633437166


Book Description
Learn how to create, train, and tweak large language models (LLMs) by building one from the ground up!

In Build a Large Language Model (from Scratch), you’ll discover how LLMs work from the inside out. In this insightful book, bestselling author Sebastian Raschka guides you step by step through creating your own LLM, explaining each stage with clear text, diagrams, and examples. You’ll go from the initial design and creation to pretraining on a general corpus, all the way to finetuning for specific tasks.

Build a Large Language Model (from Scratch) teaches you how to:

  • Plan and code all the parts of an LLM
  • Prepare a dataset suitable for LLM training
  • Finetune LLMs for text classification and with your own data
  • Apply instruction tuning techniques to ensure your LLM follows instructions
  • Load pretrained weights into an LLM


The large language models (LLMs) that power cutting-edge AI tools like ChatGPT, Bard, and Copilot seem like a miracle, but they’re not magic. This book demystifies LLMs by helping you build your own from scratch. You’ll get a unique and valuable insight into how LLMs work, learn how to evaluate their quality, and pick up concrete techniques to finetune and improve them.

The process you use to train and develop your own small-but-functional model in this book follows the same steps used to deliver huge-scale foundation models like GPT-4. Your small-scale LLM can be developed on an ordinary laptop, and you’ll be able to use it as your own personal assistant.

Purchase of the print book includes a free eBook in PDF and ePub formats from Manning Publications.

About the book

Build a Large Language Model (from Scratch) is a one-of-a-kind guide to building your own working LLM. In it, machine learning expert and author Sebastian Raschka reveals how LLMs work under the hood, tearing the lid off the Generative AI black box. The book is filled with practical insights into constructing LLMs, including building a data loading pipeline, assembling their internal building blocks, and finetuning techniques. As you go, you’ll gradually turn your base model into a text classifier tool, and a chatbot that follows your conversational instructions.

About the reader

For readers who know Python. Experience developing machine learning models is useful but not essential.


About the Author

Sebastian Raschka has been working on machine learning and AI for more than a decade. Sebastian joined Lightning AI in 2022, where he now focuses on AI and LLM research, developing open-source software, and creating educational material. Prior to that, Sebastian worked at the University of Wisconsin-Madison as an assistant professor in the Department of Statistics, focusing on deep learning and machine learning research. He has a strong passion for education and is best known for his bestselling books on machine learning using open-source software.


About the Author

Sebastian Raschka has been working on machine learning and AI for more than a decade. Sebastian joined Lightning AI in 2022, where he now focuses on AI and LLM research, developing open-source software, and creating educational material. Prior to that, Sebastian worked at the University of Wisconsin-Madison as an assistant professor in the Department of Statistics, focusing on deep learning and machine learning research. He has a strong passion for education and is best known for his bestselling books on machine learning using open-source software.

Amazon page

Build a Large Language Model (From Scratch)
1. welcome
2. 1_Understanding_Large_Language_Models
3. 2_Working_with_Text_Data
4. 3_Coding_Attention_Mechanisms
5. 4_Implementing_a_GPT_model_from_Scratch_To_Generate_Text
6. 5_Pretraining_on_Unlabeled_Data
7. Appendix_A._Introduction_to_PyTorch
8. Appendix_B._References_and_Further_Reading
9. Appendix_C._Exercise_Solutions
10. Appendix_D._Adding_Bells_and_Whistles_to_the_Training_Loop

相关文件下载地址

Formats: PDF(conv)

下载地址:

Build a Large Language Model (MEAP)9781633437166.pdf

打赏
未经允许不得转载:finelybook » Build a Large Language Model

觉得文章有用就打赏一下

您的打赏,我们将继续给力更多优质内容

支付宝扫一扫打赏

微信扫一扫打赏