Giter Site home page Giter Site logo

Model size about k-planes HOT 5 CLOSED

sarafridov avatar sarafridov commented on August 16, 2024
Model size

from k-planes.

Comments (5)

sarafridov avatar sarafridov commented on August 16, 2024

It's true that there is some extra memory for the proposal models, but this should be small in comparison with the memory for the full model, since the proposal models are lower-resolution and have shorter features. The proposal models are just there to improve speed but they shouldn't affect quality, so you could run with an even lower-resolution proposal model, or without a proposal model, if memory is an issue.

from k-planes.

fnzhan avatar fnzhan commented on August 16, 2024

Thanks for your reply! Just try to make it more clear: here is the report model params:
image
here is the size of provided model:
image

The two sizes look quite different, just want to know if I misunderstand something.

from k-planes.

fnzhan avatar fnzhan commented on August 16, 2024

I understand that params may not mean the model size.
But it is still a little strange, e.g., params of TensoRF is 18 M and model size is 72 MB.
For K-Planes, params is 34M and model size is 384 MB.

from k-planes.

sarafridov avatar sarafridov commented on August 16, 2024

This is interesting; I have some suspicion as to what is happening.

  1. Part of the gap is because the "M" in params is "millions" not "megabytes", so for fp32 there's a factor of 4 difference.
  2. The saved model (at least for kplanes) includes the optimizer state, which for Adam requires a lot of memory (roughly 2x the size of the model, because it keeps two running averages of the gradient to adapt the step sizes). I would suspect that the memory of just the model itself should be about 1/3 of the size of the .pth file because of this.

from k-planes.

fnzhan avatar fnzhan commented on August 16, 2024

This is interesting; I have some suspicion as to what is happening.

  1. Part of the gap is because the "M" in params is "millions" not "megabytes", so for fp32 there's a factor of 4 difference.
  2. The saved model (at least for kplanes) includes the optimizer state, which for Adam requires a lot of memory (roughly 2x the size of the model, because it keeps two running averages of the gradient to adapt the step sizes). I would suspect that the memory of just the model itself should be about 1/3 of the size of the .pth file because of this.

Great, that makes senes! Thanks for the explanation.

from k-planes.

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.