Skip to content

Code samples for the book 'Build a Large Language Model - From Scratch'

License

Notifications You must be signed in to change notification settings

cotrane/LLMs-From-Scratch

Repository files navigation

LLMs From Scratch

This project follows the book "Large Language Models from Scratch" by Sebastian Raschka, which provides a comprehensive guide to understanding and implementing large language models from the ground up.

About the Book

"Large Language Models from Scratch" is a practical guide that helps readers understand the inner workings of large language models (LLMs) by building them from scratch. The book covers essential concepts, architectures, and implementation details of modern LLMs.

Project Setup

This project uses uv for dependency management, which is a fast Python package installer and resolver.

Prerequisites

  • Python 3.8 or higher
  • uv package installer

Installation

  1. First, install uv if you haven't already:
curl -LsSf https://astral.sh/uv/install.sh | sh
  1. Create and activate a virtual environment:
uv venv
source .venv/bin/activate  # On Unix/macOS
# or
.venv\Scripts\activate  # On Windows
  1. Install dependencies:
uv pip install .

Project Structure

The project follows the structure and implementations as described in the book, with each chapter focusing on different aspects of LLM development.

License

This project is for educational purposes and follows the book's content. Please refer to the book's license for more information.

About

Code samples for the book 'Build a Large Language Model - From Scratch'

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published