Code Monkey home page Code Monkey logo

Comments (8)

ilyes319 avatar ilyes319 commented on August 28, 2024

Hey @pfebrer,

That is a reasonable solution. Could you try it and check if it solves your issues?

from mace.

pfebrer avatar pfebrer commented on August 28, 2024

It indeed solved the problem, my checkpoint files size has been reduced from 680 MB to 26 MB :) I could also restart the training without problems.

But maybe in some case it is useful to store them precomputed?

from mace.

pfebrer avatar pfebrer commented on August 28, 2024

I now noticed that this change breaks compatibility with loading models.

E.g.: if you load a model that stored the U matrices in a version of mace that has them set to persistent=False this will result in an error. And the same happens in the opposite case.

from mace.

peterbjorgensen avatar peterbjorgensen commented on August 28, 2024

I now noticed that this change breaks compatibility with loading models.

E.g.: if you load a model that stored the U matrices in a version of mace that has them set to persistent=False this will result in an error. And the same happens in the opposite case.

This could maybe be fixed with non-strict loading. The torch load function has a keyword strict=False, but it might be better to just break the backwards compatibility or explicitly remove the U matrices from old checkpoints.

from mace.

pfebrer avatar pfebrer commented on August 28, 2024

@ilyes319 do you think you can make them persistent=False? To load an old model on the new implementation it would just be a matter of "cleaning" the checkpoint file, i.e. removing the matrices from it.

from mace.

ilyes319 avatar ilyes319 commented on August 28, 2024

I wonder how this interacts with torchscript though and libtorch. I guess the safest would be to make an argument and keep the default to true. Would this alright?

from mace.

pfebrer avatar pfebrer commented on August 28, 2024

Yes, if it can be configured from an argument of the SymmetricContraction module (not just Contraction) I think it would be fine for us 👍

from mace.

pfebrer avatar pfebrer commented on August 28, 2024

Could we add this? :) (a persistent_U_matrices or something similar argument to SymmetricContraction that defaults to True)

I can submit a PR.

from mace.

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.