Coder Social home page Coder Social logo

Comments (7)

okhat avatar okhat commented on July 23, 2024

There are three relevant flags:

  • --resume (continue from data point)
  • --checkpoint (continue from model parameters)
  • --resume_optimizer (continue from optimizer parameters)

When you pass the first two, the model is in fact resumed but not the optimizer. This leads to seemingly high loss for a number of steps until the optimizer catches up.

from colbert.

okhat avatar okhat commented on July 23, 2024

The --resume_optimizer flag is NOT implemented in the public repository (here), but I have an internal implementation that I can merge if you need it. Let me know.

from colbert.

JamesDeAntonis avatar JamesDeAntonis commented on July 23, 2024

that would be great, thanks!

from colbert.

okhat avatar okhat commented on July 23, 2024

Great --- I think I can do this Friday or Saturday.

from colbert.

wonderingalways avatar wonderingalways commented on July 23, 2024

Hey!
Is the above optimizer reload code merged? If so I am unable to see the changes? If it wont be official merged can I get the internal implementation through mail?

from colbert.

tdieu29 avatar tdieu29 commented on July 23, 2024

Even after loading the optimizer state dict from my previous run, resuming training still did not give me the average loss that I ended up with from the previous run. @JamesDeAntonis If you resolved this problem, could you please share how you did it? Thanks a lot!

from colbert.

tdieu29 avatar tdieu29 commented on July 23, 2024

Found the solution! For anyone who might encounter this problem, what I did was saving train_loss (in addition to saving the model state dict, optimizer state dict and batch idx) when saving the checkpoints! You need the train_loss from the previous run when you resume training if you want the average loss from the current run to start at where you left off.

from colbert.

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.