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

Remove lr scheduler in DeepSpeed config to avoid conflict #909

Merged
merged 1 commit into from
Dec 4, 2023

Conversation

Haoxiang-Wang
Copy link
Contributor

@Haoxiang-Wang Haoxiang-Wang commented Dec 4, 2023

This PR removed the following schduler in DeepSpeed config files.

{
  "scheduler": {
    "type": "WarmupDecayLR",
    "params": {
      "warmup_min_lr": "auto",
      "warmup_max_lr": "auto",
      "warmup_num_steps": "auto",
      "warmup_type": "linear",
      "total_num_steps": "auto"
    }
}

The scheduler in DeepSpeed configurations is not necessary because the axolotl package defines its own learning rate scheduler (which is passed to the HuggingFace trainer). In fact, the DeepSpeed scheduler can sometimes cause conflicts. For instance, when lr_scheduler: constant_with_warmup is set in the training YAML file, the actual scheduler is overridden by DeepSpeed's scheduler (which is DeepSpeed's WarmupDecayLR instead of HuggingFace's constant_with_warmup). Removing scheduler from DeepSpeed configurations can resolve this issue.

@winglian winglian merged commit 476a205 into axolotl-ai-cloud:main Dec 4, 2023
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.

None yet

2 participants