deepspeedai / deepspeedai/DeepSpeed

Initialization/warmstarting for RoBERTa pretraining

Open
#1,777 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
43.1k
Forks
5k
Avg merge
4d 15h
Merged PRs (30d)
112

Description

I am currently trying to further pretrain a RoBERTa model on a custom dataset, initializing the model with roberta-base weights. I am using this script which works fine for pretraining from scratch. The function load_training_checkpoint allows to resume training from an existing deepspeed checkpoint but I haven't found an easy way to initialize the pretraining with weights not obtained through deepspeed training (e.g. roberta-base weights). I have looked at the docs and I tried to set the load_module_only argument to True but I get a TypeError:
TypeError: load_checkpoint() got an unexpected keyword argument 'load_module_only'

Could you please help me on this? Is there any easy way to do warmstarting with DeepSpeed?

I am using deepspeed==0.4.3 and transformers==4.4.0.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with run_pretraining.py, especially load_training_checkpoint and the attempted load_module_only call, then compare that usage with the DeepSpeed model checkpointing documentation for version 0.4.3. Determine whether initialization from roberta-base weights is supported; done means a documented warmstarting path or a clear explanation of the limitation and required versions.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
distributed-systems, machine-learning
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.