Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MrVI slowdown due to JAX compilation update #3179

Open
justjhong opened this issue Feb 10, 2025 · 4 comments · Fixed by #3184
Open

MrVI slowdown due to JAX compilation update #3179

justjhong opened this issue Feb 10, 2025 · 4 comments · Fixed by #3184
Labels

Comments

@justjhong
Copy link
Contributor

With recent updates to JAX, MrVI trains significantly slower than before. We suspect it is due to the new AOT compilation strategy (https://jax.readthedocs.io/en/latest/aot.html).

Any basic training with MrVI with a fresh install. Reproduced by @PierreBoyeau and myself.

@ori-kron-wis
Copy link
Collaborator

ori-kron-wis commented Feb 11, 2025

@justjhong lmk if you want me to upper bound jax for now and to which version.
We will probably have a release in the coming week or so, so it can get into there.

@justjhong
Copy link
Contributor Author

Hi @ori-kron-wis, thanks for checking. I took some time this morning to try to debug it but was not able to find a solution.
I was able to figure out that the problems arise starting from jax==0.4.36. So for now, let's upper bound to jax<0.4.36 (non-inclusive).

@PierreBoyeau
Copy link
Contributor

Hi, here are a few more details about my understanding of the problem.
It seems that lightning introduces a significant overhead when training the model, here and there for instance.
MrVI is notably faster at this stage without the lightning wrapper.

@canergen
Copy link
Member

canergen commented Feb 13, 2025

For now pinning jax<0.4.36. Potentially related to jax-ml/jax#26162. Check again when this is adressed. Leaving this open as pinning circumvents it but might create issues in the near future.

@canergen canergen reopened this Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants