isaacperez / tinygpt

A tiny version of GPT fully implemented in Python with zero dependencies

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TinyGPT

Like NanoGPT but tiny. It is also inspired by Tinygrad, Pytorch and MLX.

The main objective of this project is to be as didactic as possible, avoiding optimizations that make the code difficult to understand.

I hope we can understand how to train and run a model like GPT-3 using as few libraries as possible and programming everything from scratch, including the library to train and run the model.

Installation

The current recommended way to install TinyGPT is from source.

From source

$ git clone https://github.com/isaacperez/tinyGPT.git
$ cd tinygpt
$ python -m pip install -e .

Don't forget the . at the end!

Usage

[TO DO]

Documentation

Documentation along with a quick start guide can be found in the docs/ directory.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Testing

You need to install pytest:

$ python -m pip install pytest

and TinyGPT, then run:

$ pytest

About

A tiny version of GPT fully implemented in Python with zero dependencies

License:MIT License


Languages

Language:Python 100.0%