Skip to content

This project aims to replicate the functionality of GPT-2 using Numpy, without relying on sampling mechanisms. It provides a lightweight alternative for understanding and working with GPT-2.

Notifications You must be signed in to change notification settings

RyanTomich/np_GPT2

Repository files navigation

np_GPT2

np_GPT2 is a non-sampling implementation of GPT-2 using only Numpy for tensor operations.

Overview

This project aims to replicate the functionality of GPT-2 using Numpy, without relying on sampling mechanisms. It provides a lightweight alternative for understanding and working with GPT-2.

Running the Comparison Script

To compare the outputs of different GPT-2 implementations, run the got2_comparison.py script with Python 3.12. The script will display responses from:

The goal is for all responses to match, demonstrating the correctness of the np_GPT2 implementation.

Requirements

Installation

  1. Clone the repository:
    git clone https://github.com/RyanTomich/np_GPT2.git

About

This project aims to replicate the functionality of GPT-2 using Numpy, without relying on sampling mechanisms. It provides a lightweight alternative for understanding and working with GPT-2.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published