Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to continue train ALBERT from the modelreleased on the tfhub ? #17

Closed
wxp16 opened this issue Dec 16, 2019 · 2 comments
Closed

How to continue train ALBERT from the modelreleased on the tfhub ? #17

wxp16 opened this issue Dec 16, 2019 · 2 comments

Comments

@wxp16
Copy link

wxp16 commented Dec 16, 2019

Training from scratch is very expensive. Anybody know how to continue train ALBERT from the exported model..

Thanks

@0x0539
Copy link
Collaborator

0x0539 commented Dec 20, 2019

Note that the TF-Hub checkpoints do not contain LAMB optimizer momentum estimates, so it won't be exactly the same as resuming from a training checkpoint (which we do plan to release at some point). In particular, the momentum estimates will be reset to zero.

That said, it's still probably faster than starting from a randomly-initialized ALBERT :)

If you want to try it, I can think of two ways:

  1. Extract the checkpoint files manually from the TF-Hub module. Look inside the variables/ folder. These files can be copied into your training dir as the .data and .index files of a checkpoint. You may need to create a file called checkpoint that points to them (look inside an ALBERT training directory for the format).
  2. Add a flag to run_pretraining.py for initializing from TF-Hub. It should be similar to this recent commit, which did the same thing but for run_classifier.py. If you want to put together a PR for this, that'd really be helpful.

@0x0539
Copy link
Collaborator

0x0539 commented Jan 8, 2020

There's an easier way to get these checkpoints now. See the [Tar file] links in the readme.

@0x0539 0x0539 closed this as completed Jan 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants