Skip to content

Conversation

@yiliu30
Copy link
Contributor

@yiliu30 yiliu30 commented Dec 21, 2023

Type of Change

Feature and example.
API changed: None

Description

The DeepSpeed Zero will convert the module's parameters into ds_param and override some parameter properties, such as shape, and grad. To get and set these properties, we need to use the debug APIs provided by DeepSpeed.

This PR updates the param.shape and param = new_tensor with safe_get_xx and safe_set_xx accordingly, automatically calling the DeepSpeed debug APIs when using DeepSpeed.

How has this PR been tested?

Pre-CI and local test.

Dependency Change?

To run examples, DeepSpeed >= 0.12.4 is required.

yiliu30 and others added 10 commits November 8, 2023 08:56
@yiliu30 yiliu30 added the WIP label Dec 21, 2023
@yiliu30 yiliu30 removed the WIP label Dec 27, 2023
@yiliu30 yiliu30 marked this pull request as ready for review December 27, 2023 07:50
@yiliu30 yiliu30 requested a review from wenhuach21 December 27, 2023 07:51
Signed-off-by: Yi <[email protected]>
Signed-off-by: yiliu30 <[email protected]>
@yiliu30 yiliu30 changed the title Enable the snip with zero 3 on multiple cards Enable SNIP on multiple cards using DeepSpeed ZeRO-3 Dec 27, 2023
Signed-off-by: yiliu30 <[email protected]>
@yiliu30 yiliu30 merged commit 49ab28d into master Jan 12, 2024
@yiliu30 yiliu30 deleted the ly/ds_p2 branch January 12, 2024 01:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants