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

Enable the combination of sequence length warmup and RoPE #285

Merged
merged 1 commit into from
Nov 9, 2023

Conversation

conglongli
Copy link

@conglongli conglongli commented Nov 9, 2023

Enable the combination of sequence length warmup (SLW, one of the curriculum learning techniques released by the DeepSpeed team: https://www.deepspeed.ai/tutorials/curriculum-learning/ and https://www.deepspeed.ai/tutorials/data-efficiency/) and RoPE (rotary positional embedding).

Verified the effectiveness of the sequence length warmup when RoPE is used together:

Blue line: baseline with RoPE and without SLW. GPT-3 1.3B pretraining with 30B tokens. Used learning rate = 1.0e-3 (5x of OpenAI's original recipe) and batch size = 2048 (4x of OpenAI's original recipe) to simulate an unstable training.
Red line: with RoPE and with SLW (cl_min = 64, cl_step = 3000). GPT-3 1.3B pretraining with 30B tokens. Same learning rate and batch size as blue line. Compared to blue line, avoided bigger loss spike and achieved better validation loss at the end of training.

Screenshot 2023-11-09 125305

image

@conglongli conglongli merged commit 4c0bc7f into main Nov 9, 2023
1 check passed
@conglongli conglongli deleted the slw_for_rope branch November 9, 2023 21:46
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

Successfully merging this pull request may close these issues.

2 participants