Implementation of an example GPT for understanding how next character is generated by a Transformer
- Based on ng-video-lecture and nanoGPT
- Using the Neural Network service
-
Clone the Repository:
git clone https://github.com/derinworks/penr-oz-gpt-example.git cd penr-oz-gpt-example
-
Create and Activate a Virtual Environment:
- Create:
python -m venv venv
- Activate:
- On Unix or macOS:
source venv/bin/activate
- On Windows:
venv\Scripts\activate
- On Unix or macOS:
- Create:
-
Install Dependencies:
pip install -r requirements.txt
-
Neural Network Service:
- Follow instructions on Quick Start Guide
- Deployed remotely then use a
.env
file as such to configure url:
PREDICTION_SERVER_URL=http://???:8000
-
Run:
python main.py