jaymody / picoGPT

An unnecessarily tiny implementation of GPT-2 in NumPy.
MIT License
3.25k stars 415 forks source link

Visualization of picoGPT #14

Open QasimWani opened 1 year ago

QasimWani commented 1 year ago

Great work! For beginners, here's a graphical representation of your code. Feel free to embed it in your scripts: https://gctpy.com/graph/1ca770a1905176a355836d485ee7c8fc5b97e74ae058fce332ca59fdcf4ac919. It shows how different functions connect to other functions in your code. This was generated for gpt.py image

chadbrewbaker commented 1 year ago

I am finding nanoGPT useful as a playground for modeling refactors to llama.cpp.

I was thinking of adding a third script that is instrumented so you can run experiments and get quick feedback on asymptotic behavior. Call graph annotated with memory/CPU usage is definitely one output. Any others you can think of?

Here is the list of experiments I want:

Ideally I want to make picoGPT something z3py uses as a reference GPT solver.

chadbrewbaker commented 1 year ago

The tiny codebase should be kept as-is. Perhaps fork the repo elsewhere, and list notable forks at the bottom of the README?

Notable picoGPT uses

Sandy4321 commented 10 months ago

wrong link picoGPT_viz - visualize picoGPT call graphs