srush / annotated-s4

Implementation of https://srush.github.io/annotated-s4
https://srush.github.io/annotated-s4
MIT License
468 stars 60 forks source link

Add Initial Feed-Forward Model & Synthetic Datasets #1

Closed siddk closed 2 years ago

siddk commented 2 years ago

Implements a simple, single input feed-forward model as a sanity check for the initial synthetic datasets. Specifically, this PR:

@srush - one note is that not all jax.numpy.linalg functions are implemented on the GPU backend; went ahead and fixed the non-symmetric eigendecomposition call eigs() to use the CPU-backed variant instead.

srush commented 2 years ago

Nice! This is looks great, very excited to play with it.

Couple things to note.

If some of this is annoying we could also put the data and model parts in a different file and import them. They may not be necessary for the readable part.

siddk commented 2 years ago

Ok - I think all of the above feedback has been addressed, and I have the s4.py --> streambook pipeline pretty fleshed out. I started some initial text structure for these initial experiments, but I think we should probably factor most of this out into separate files.

I think maybe starting with an RNN on one of these tasks is probably enough... then we build S4 from there.