Giter Club home page Giter Club logo

Comments (5)

albertfgu avatar albertfgu commented on July 30, 2024

These extensions are required because the algorithm requires functionality that is not supported in vanilla PyTorch. There is a pure PyTorch implementation of the kernel that is slower and uses more memory. To use it, in the line https://github.com/HazyResearch/state-spaces/blob/2af126108991d214fd82ffc1899f6d4e31a1eda3/src/models/sequence/ss/kernel.py#L322 replace cauchy.cauchy_conj with cauchy.cauchy_conj_slow.
Or if you're using the standalone module, replace the cauchy function with the one found here https://github.com/HazyResearch/state-spaces/blob/2af126108991d214fd82ffc1899f6d4e31a1eda3/src/models/functional/cauchy.py#L124

from s4.

bratao avatar bratao commented on July 30, 2024

That worked @albertfgu , thank you!
I will open a PR to use this as fallback on the standalone module

from s4.

albertfgu avatar albertfgu commented on July 30, 2024

No problem. I can also make the requisite changes to fall back on this - should be pretty simple.

Do keep in mind again that this version is less efficient, so it might be useful for preliminary testing but we would recommend trying to set up the full environment if possible.

Also, there is an excellent port of S4 to JAX here if that might be easier to set up: https://srush.github.io/annotated-s4/

from s4.

albertfgu avatar albertfgu commented on July 30, 2024

I just added a fallback to the slow version. Can you test this?

from s4.

bratao avatar bratao commented on July 30, 2024

Works perfectly @albertfgu , thank you!

from s4.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.