Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/betarixm/llm-from-scratch


https://github.com/betarixm/llm-from-scratch

Last synced: about 15 hours ago
JSON representation

Awesome Lists containing this project

README

        

# LLM from Scratch

> Originally from the "Build a Large Language Model (From Scratch)"

This repository contains the code and exercises for building a Large Language Model (LLM) from scratch. Follow along to understand the intricacies of language models and implement your own.

## Requirements

- Python 3.11+

## Environment Setup

### (Optional) Create a Virtual Environment

It is recommended to create a virtual environment to manage dependencies and avoid conflicts with other projects.

```bash
python -m venv .venv
source .venv/bin/activate
```

### Install Dependencies

Install the required dependencies by running:

```bash
pip install -e .
```

Ensure that you are in the correct environment before proceeding.

## Note

Each chapter includes a `tests.py` file which could provide answers and hints for the respective `exercise.ipynb`. Refer to this file if you need guidance or want to verify your solutions.

## Chapters

The project is divided into several chapters, each focusing on different aspects of building a Large Language Model.

### Chapter 2: Working with Text Data

In this chapter, you'll learn how to preprocess and work with text data, a crucial step in building any language model.

[Exercise Link](./llm_from_scratch/chapter_02/exercise.ipynb)