Skip to content

[BUG]'NotImplementedError: Cannot copy out of meta tensor; no data!' when loading T5/mistral from_config #4959

Description

@Yejing-Lai

Describe the bug
When loading T5 and mistral from_config, The following error will appear:
'NotImplementedError: Cannot copy out of meta tensor; no data!'

To Reproduce
Steps to reproduce the behavior:

  1. Simple inference script to reproduce
    reproduce script
  2. What packages are required and their versions
    ipex: 2.1.100
    torch: 2.1
    oneccl 2.1.0
  3. How to run the script
    deepspeed --num_gpus 2 --bind_cores_to_rank run_generation_with_deepspeed.py --benchmark -m mistralai/Mistral-7B-v0.1

Expected behavior
No error.

ds_report output
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

deepspeed_not_implemented [NO] ....... [OKAY]
deepspeed_ccl_comm ..... [NO] ....... [OKAY]
cpu_adam ............... [NO] ....... [OKAY]
fused_adam ............. [NO] ....... [OKAY]

DeepSpeed general environment info:
torch install path ............... ['xxx/lib/python3.9/site-packages/torch']
torch version .................... 2.1.2+cpu
deepspeed install path ........... ['xxx/deepspeed']
deepspeed info ................... 0.12.7+a85b6e47, a85b6e47, HEAD
deepspeed wheel compiled w. ...... torch 2.1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions