Skip to content

shamashel/torch-basic-lm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Basic Torch Language Model

PROJECT HAS BEEN MOVED TO https://huggingface.co/shamashel/bad-gpt

Based on the Let's build GPT video from Andrej Karpathy.

This is just an attempt to recreate the transformer Andrej made in his video with the goal of learning more about torch, transformers, and neural networks in general.

To run, make sure python 3.10 and poetry are installed. You can then run poetry install to get the dependencies (it's just torch and numpy).

Finally, you can run the code with poetry run python ./main.py

Note that the first run will train the model and then save the trained weights to model.pth. Subsequent runs will load these weights.

About

Basic language model using torch, based on gpt-2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages