Skip to content

[BUG]: It seems that the parameters of 'requires_grade=False' have also allocated grad memory #3777

Closed

Description

@NHZlX

Describe the bug
https://github.com/microsoft/DeepSpeed/blob/master/deepspeed/runtime/engine.py#L2267

When I run "Lora+8bit", parameters of type int8 that do not participate in training will automatically generate all 0 grads, so the following error will be reported:

attempting to reduce an unsupported grad type: torch.cuda.Bytetensor

I add a line code as following, it can runs normally.
image

May I ask if adding grads automatically is a bug or a necessary logic?

Activity

  1. added
    bug
    on Jun 21, 2023
  2. changed the title [-][BUG]: It seems that the parameters of 'requires_grade=False' have also allocated Grade space[/-] [+][BUG]: It seems that the parameters of 'requires_grade=False' have also allocated grad memory[/+] on Jun 21, 2023
  3. self-assigned this
    on Jun 22, 2023
  4. linked a pull request that will close this issueAll Reduce Requires Grad Check #3789on Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugtraining

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions