ranji-t/sequence-models-jax — reverse-engineered prompt
Reverse engineered prompt
Build me a small learning repo that teaches sequence models from scratch in pure JAX, without Flax or Haiku. I want it to feel like a hands on notebook journey, starting with simple RNN and LSTM code, then GRU training, then a small Transformer that predicts Korean Steel power usage from time series data.
Keep the code explicit and readable, with weights stored in simple structures, batching with vmap, sequence loops with lax.scan, and the Transformer attention written with einsum so I can see what every matrix is doing. Include preprocessing for the time features, sliding windows, a proper time based train and test split, training loops, loss charts, prediction charts, and basic metrics like R², MSE, and MAE.
Use Marimo notebooks, uv for setup, Plotly for charts, and make the data paths relative so it runs after cloning. Add a clear README with setup and run commands. Look up current docs online if you need to.
Want more depth? Deep Reverse