Giter Site home page Giter Site logo

support other update types about git-theta HOT 9 CLOSED

craffel avatar craffel commented on August 14, 2024
support other update types

from git-theta.

Comments (9)

craffel avatar craffel commented on August 14, 2024

Copying design here since README will change:

For a given parameter group, git-cml will store either the group's parameter's values or an update to the values in the event that it can be stored more efficiently. For example, if a sparse update is made to a parameter group, git-cml will store the sparse update in a sparse format to save storage costs. For a given parameter group, all updates made since the last time the group's values were stored are stored in an updates subdirectory within .git_cml/{checkpoint_file_name}/{parameter_name}. Whenever a dense update is made to a parameter group, the new full set of parameter values is stored and all prior updates are removed from the updates subdirectory. All parameters and updates are currently stored via git-lfs.

from git-theta.

craffel avatar craffel commented on August 14, 2024

Requires making it so that you can provide hints to git-theta as to the appropriate update type to use

from git-theta.

blester125 avatar blester125 commented on August 14, 2024

Do we want to allow a single commit to have multiple changed parameters with different update types? Like a dense update to attn weights but a sparse update to the embedding table? Or a single change changes everything the same way?

from git-theta.

vishalathreya avatar vishalathreya commented on August 14, 2024

Last time we discussed this, we decided on a single commit to have only 1 kind of update to begin with. @craffel are there scenarios wherein multiple update types are used in the same training run?

from git-theta.

craffel avatar craffel commented on August 14, 2024

Ideally we could support something like that - there's no reason someone wouldn't possibly update different parameter groups with different methods. But I think it's probably a lot less common, and we could always force users to break up their changes into multiple subsequent commits according to update type.

from git-theta.

blester125 avatar blester125 commented on August 14, 2024

With #92 merged we can now use plugins for different update types.

@vishalathreya The current "sparse" implementation is really simple and you don't get any actual gain wrt to the sparseness. It would be good to incorporate the smart sparseness features you had in #75. It would probably be via updates to the read, write, and calculate sparse methods here https://github.com/r-three/git-theta/blob/main/git_theta/updates/sparse.py#L51(it would probably also make sense to abstract part of the writing into a write_update method.

from git-theta.

nkandpa2 avatar nkandpa2 commented on August 14, 2024

After #114 the current pattern is that git add <model> will default to storing the updates as dense updates. In cases where a user wants to use a different update type, they can set an environment variable GIT_THETA_UPDATE_TYPE=sparse before running git add <model>. Alternatively, they can do git theta add <model> --update-type sparse which internally just sets the environment variable, calls git add <model>, and restores the environment variable to its initial value.

from git-theta.

blester125 avatar blester125 commented on August 14, 2024

I think once #127 (low-rank) and #125 (real sparse updates) land it should probably be enough to close this.

from git-theta.

craffel avatar craffel commented on August 14, 2024

Closing because it's subsumed by #127 and #125.

from git-theta.

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.