-
Notifications
You must be signed in to change notification settings - Fork 123
ESM2 changes to work with vLLM #1473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
gagank1
wants to merge
10
commits into
main
Choose a base branch
from
gkaushik/esm2-vllm
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+350
−115
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
e415bb9
draft pr - esm2 working with vllm
gagank1 3f9f00e
remove converted checkpoint from git tracking
gagank1 99e8087
testing
gagank1 7383a7c
merge main
gagank1 af0c43c
cleanup
gagank1 e2b3fcd
files from other branch
gagank1 c34c09b
remove zombie files
gagank1 a67df14
addressed feedback
gagank1 8e8a87c
remove unnecessary diff
gagank1 36cdbb2
fix recipes
gagank1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,3 +9,4 @@ torch | |
| torchao!=0.14.0 | ||
| transformer_engine[pytorch] | ||
| transformers | ||
| vllm | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -209,8 +209,8 @@ def test_context_parallel_equivalence_2process(): | |
|
|
||
| # Sample gradients from a few layers for comparison | ||
| sample_layers = [ | ||
| model.esm.encoder.layers[0].self_attention.core_attention, | ||
| model.esm.encoder.layers[0].self_attention.layernorm_qkv, | ||
| model.model.encoder.layers[0].self_attention.core_attention, | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why the rename here from |
||
| model.model.encoder.layers[0].self_attention.layernorm_qkv, | ||
| ] | ||
|
|
||
| # Now grab the gradients from the sample layers | ||
|
|
@@ -262,7 +262,7 @@ def test_context_parallel_equivalence_2process(): | |
| cp_world_size = torch.distributed.get_world_size(group=cp_group) | ||
|
|
||
| # Set up context parallelism for each layer | ||
| for i, transformer_layer in enumerate(model.module.esm.encoder.layers): | ||
| for i, transformer_layer in enumerate(model.module.model.encoder.layers): | ||
| transformer_layer.set_context_parallel_group( | ||
| cp_group, torch.distributed.get_process_group_ranks(device_mesh["cp"].get_group()), torch.cuda.Stream() | ||
| ) | ||
|
|
@@ -347,8 +347,8 @@ def test_context_parallel_equivalence_2process(): | |
| # Capture gradients from the same layers in the CP model | ||
| # Note: DDP wraps the model with 'module.' prefix | ||
| sample_layers_cp = [ | ||
| model.module.esm.encoder.layers[0].self_attention.core_attention, | ||
| model.module.esm.encoder.layers[0].self_attention.layernorm_qkv, | ||
| model.module.model.encoder.layers[0].self_attention.core_attention, | ||
| model.module.model.encoder.layers[0].self_attention.layernorm_qkv, | ||
| ] | ||
|
|
||
| gradients_cp = {} | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're deleting
_do_not_quantize? we need that