deepspeedai / deepspeedai/DeepSpeedExamples

“Current loss scale already at minimum - cannot decrease scale anymore” when I enabled ZERO++

Open
#617 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
6.8k
Forks
1.1k
Avg merge
2d 16h
Merged PRs (30d)
1

Description

deepspeed 0.10.0
here is my config:

 json = {
    "train_batch_size": 2,
    "train_micro_batch_size_per_gpu": 2,
    "steps_per_print": 20,
    "zero_allow_untested_optimizer": true,
    "zero_optimization": {
        "stage": 3,
        "reduce_bucket_size": 1.000000e+07,
        "reduce_scatter": true,
        "zero_quantized_weights": true,
        "zero_hpz_partition_size": 16,
        "zero_quantized_gradients": true,
        "contiguous_gradients": true,
        "overlap_comm": true,
        "offload_param": {
            "device": "none"
        },
        "offload_optimizer": {
            "device": "none"
        },
        "stage3_param_persistence_threshold": 1.000000e+04,
        "stage3_max_live_parameters": 3.000000e+07,
        "stage3_prefetch_bucket_size": 3.000000e+07,
        "memory_efficient_linear": false
    },
    "fp16": {
        "enabled": true,
        "loss_scale_window": 100
    },
    "gradient_clipping": 1.0,
    "prescale_gradients": false,
    "wall_clock_breakdown": false,
    "hybrid_engine": {
        "enabled": false,
        "max_out_tokens": 2.048000e+03,
        "inference_tp_size": 1,
        "release_inference_cache": false,
        "pin_parameters": true,
        "tp_gather_partition_size": 8
    }
}

model and params:

model=LlamaForCausalLM.from_pretrained("decapoda-research/llama-13b-hf")
args.zero_stage=3
args.num_train_epochs=1
args.per_device_train_batch_size = 2
args.gradient_accumulation_steps =1
args.seed=1234
args.weight_decay=0.01
args.lr_scheduler_type="cosine"
args.num_warmup_steps=500
args.learning_rate=1e-5
args.output_dir = "."

Contributor guide

No contributing guide indexed for this repository

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

Reproduce the report using DeepSpeed 0.10.0, the supplied ZERO++/fp16 configuration, and the LlamaForCausalLM model from decapoda-research/llama-13b-hf. Trace when the loss scale reaches its minimum and determine whether the reported configuration causes it; done should identify the cause and provide a confirmed resolution or workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
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.