Coder Social home page Coder Social logo

Comments (2)

aashaka avatar aashaka commented on July 19, 2024

Hi, thanks for trying it out.

  1. MONeT's optimization problem aims to minimize the compute cost for a given batch size and memory budget. As mentioned in section 6.4 of Checkmate, building an optimization problem to maximize the batch size will lead to quadratic constraints, making the problem more difficult to solve. Instead, I would suggest a different (untested as of now) modification to MONeT's formulation in order to programmatically get maximum batch size - fix a batch size (ideally the batch size which just fits the GPU) and minimize the memory budget while fixing the compute overhead. Use the obtained MONeT schedule with the maximum batch size obtained by scaling the original batch size with a scale factor of machine_memory/minimum_memory_budget.

  2. Yes. You need not recompute the schedules for each batch size. The schedules can be used for other batch sizes and will use memory proportional to the batch size increase while keeping the same compute overhead. This is another way you can obtain a schedule for training with the maximum batch size. We have provided a schedule zoo for this exact reason.
    For example, we can train Resnet-50 using a batch size of 416 on a P100 GPU using a schedule obtained for batch size 184 and memory budget 6GB. The memory used increases by 2.22x and computation time by 2.23x, which is nearly the same as the batch size increase of 2.27x.

  3. I hope the above answers and the answer to issue 4 will help you get started with it.

from monet.

merrymercy avatar merrymercy commented on July 19, 2024

Thanks for the excellent answer!

from monet.

Related Issues (5)

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.