jxsh341/dyna-run — reverse-engineered prompt

Reverse engineered prompt

GitHub

Build me a lightweight Python demo app called Dyna Run that shows how a small sparse AI model routes text tokens to different experts instead of using every part of the model every time.

I want it to train a tiny transformer on Shakespeare text the first time it runs, then open a Streamlit dashboard where I can type text and see which 2 of 8 experts each token uses across the layers. Show the routing in easy visual ways like flow diagrams, heatmaps, expert usage bars, and simple metrics for balance and confidence.

Also include a benchmark page that compares the sparse model against a similar dense model for speed, latency, memory, active parameters, and speedup at different sequence lengths. Add a page for trying local external models through Ollama, Hugging Face, and llama.cpp if those are available.

Please make it runnable with requirements install plus a Streamlit command, include a Windows launcher, basic tests, and clear troubleshooting notes. Look up current docs online if needed.

Want more depth? Deep Reverse