Skip to content

Training Loss inconsistent after resume from old checkpoint #25340

@dumpmemory

Description

@dumpmemory

System Info

  • transformers version: 4.31.0

  • Platform: Linux-5.4.119-19.0009.28-x86_64-with-glibc2.35

  • Python version: 3.10.6

  • Huggingface_hub version: 0.15.1

  • Safetensors version: 0.3.1

  • Accelerate version: 0.21.0

  • Accelerate config: not found

  • PyTorch version (GPU?): 2.0.0 (True)

  • Tensorflow version (GPU?): not installed (NA)

  • Flax version (CPU?/GPU?/TPU?): not installed (NA)

  • Jax version: not installed

  • JaxLib version: not installed

  • Using GPU in script?:

  • Using distributed or parallel set-up in script?:

  • Accelerate version: 0.21.0

  • Platform: Linux-5.4.119-19.0009.28-x86_64-with-glibc2.35

  • Python version: 3.10.6

  • Numpy version: 1.22.2

  • PyTorch version (GPU?): 2.0.0 (True)

  • PyTorch XPU available: False

  • PyTorch NPU available: False

  • System RAM: 1877.62 GB

  • GPU type: NVIDIA H800

  • Accelerate default config:
    Not found


DeepSpeed C++/CUDA extension op report

NOTE: Ops not installed will be just-in-time (JIT) compiled at
runtime if needed. Op compatibility means that your system
meet the required dependencies to JIT install the op.

JIT compiled ops requires ninja
ninja .................. [OKAY]

op name ................ installed .. compatible

[WARNING] async_io requires the dev libaio .so object and headers but these were not found.
[WARNING] async_io: please install the libaio-dev package with apt
[WARNING] If libaio is already installed (perhaps from source), try setting the CFLAGS and LDFLAGS environment variables to where it can be found.
async_io ............... [NO] ....... [NO]
cpu_adagrad ............ [NO] ....... [OKAY]
cpu_adam ............... [NO] ....... [OKAY]
fused_adam ............. [NO] ....... [OKAY]
fused_lamb ............. [NO] ....... [OKAY]
quantizer .............. [NO] ....... [OKAY]
random_ltd ............. [NO] ....... [OKAY]
[WARNING] sparse_attn requires a torch version >= 1.5 and < 2.0 but detected 2.0
[WARNING] using untested triton version (2.0.0), only 1.0.0 is known to be compatible
sparse_attn ............ [NO] ....... [NO]
spatial_inference ...... [NO] ....... [OKAY]
transformer ............ [NO] ....... [OKAY]
stochastic_transformer . [NO] ....... [OKAY]
transformer_inference .. [NO] ....... [OKAY]

DeepSpeed general environment info:
torch install path ............... ['/usr/local/lib/python3.10/dist-packages/torch']
torch version .................... 2.0.0
deepspeed install path ........... ['/usr/local/lib/python3.10/dist-packages/deepspeed']
deepspeed info ................... 0.9.5, unknown, unknown
torch cuda version ............... 12.1
torch hip version ................ None
nvcc version ..................... 12.1
deepspeed wheel compiled w. ...... torch 2.0, cuda 12.1

Who can help?

No response

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction

  1. run run_clm.py for a while. seed =42, dataset_seed = 42. model llma-7b-hf
  2. start training with middle checkpoint.
  3. see the training loss.
  4. my training loss look like following:
  5. Screen Shot 2023-08-07 at 2 06 58 PM
  6. u can see that first resume loss is ok, but for the second the loss is inconsistent

Expected behavior

Training loss should be the same level before and after resume.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions