https://github.com/alexbuccheri/custom_gpt2
Implementation of GPT2, as described by [Andrej Karpathy](https://www.youtube.com/watch?v=kCc8FmEb1nY&t=638s)
https://github.com/alexbuccheri/custom_gpt2
Last synced: 9 days ago
JSON representation
Implementation of GPT2, as described by [Andrej Karpathy](https://www.youtube.com/watch?v=kCc8FmEb1nY&t=638s)
- Host: GitHub
- URL: https://github.com/alexbuccheri/custom_gpt2
- Owner: AlexBuccheri
- Created: 2024-01-08T17:29:46.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-25T20:44:58.000Z (over 1 year ago)
- Last Synced: 2025-02-08T12:30:52.558Z (5 months ago)
- Language: Python
- Size: 429 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Custom GPT2 Implementation
Learning project, following the Youtube video of
[Andrej Karpathy](https://www.youtube.com/watch?v=kCc8FmEb1nY&t=638s), where he implements GPT2 from
scratch, using Pytorch.## Installation
* Set up a Conda environment that contains pytorch (not documented here).
* Modify `CONDA_ENV_NAME` in [makefile.common](makefile.common) to equal the name of the Conda environment.
* Run `make install-dev` in the project root.
### Testing
* Run pytest for the local conda env by typing `pytest` in the project root.
* Run `tox` for python versions 3.10 - 3.12 by typing `make test` in the project root.