Skip to content

[REQUEST] How to access to the gradients (to manipulate) while the model is training? #3310

@BilgehanSel

Description

@BilgehanSel

Does deepspeed offer an API to have access the gradients while training for any of the stages (1-2-3). When I try to access the gradients, I only get None types. I'm mostly interested in the stage 3. If there is no such API, is there any chance to delve into the deepspeed code to access them somehow, I would also be glad if someone just points me to the right direction in the source code for this. I'm not that concerned about any slowdowns in the code as long as I have access to the gradients. I also want to be able to manipulate/change the gradients before optimization steps.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions