Skip to content
This repository has been archived by the owner on Mar 24, 2024. It is now read-only.
/ transfusion Public archive

A tiny version of GPT, built with PyTorch and trained on Shakespeare

License

Notifications You must be signed in to change notification settings

lostflux/transfusion

Repository files navigation

Generative Pre-trained Transformer Model

What did you built?

I followed a tutorial that explains the various components of an AI model such as GPT and builds such a model by assembling together the required components using the pytorch deep-learning library.

I trained the model for about 5 hours on a dataset of Shakespeare's works and saved the final weights.

I then tried out a second tutorial on deploying ML models using FastAPI to host the model behidn an API that receives query params and sends back the model's response as JSON.

I haven't gotten down to hosting the api — but I will soon!
Presently, clone this repo then start the server in the terminal:

 uvicorn main:app --reload

Include some screenshots.

Screenshot

Screenshot

Who Did What?

Amittai

What you learned

  • Building ML models.
  • Deploying ML models.
  • A few hazards involved therein.

    For instance, I attempted deploying to Vercel but apparently something about the model was too big. I'll have to find another solution.

Authors

TODO: list of authors

Acknowledgments

  1. Build GPT
  2. Deploy using FastAPI