Skip to content
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

Deepseek v2 16b enablement with IFU #51

Open
wants to merge 32 commits into
base: rocm_dev
Choose a base branch
from
Open

Conversation

hakankiymaz-amd
Copy link

@hakankiymaz-amd
Copy link
Author

@lcskrishna @wenchenvincent updated PR after IFU merge.

@@ -136,7 +136,7 @@ def forward(
position_ids=None,
):
"""Forward pass for multi-latent attention"""
assert rotary_pos_emb is None, "Rotary position embeddings should not be passed into MLA."
#assert rotary_pos_emb is None, "Rotary position embeddings should not be passed into MLA."
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure this is Okay?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be Okay, it is not used in the method.
Line 165 , self._adjust_key_value_for_inference uses rotary_pos_emb=None.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If rotary_pos_emb is not really used in this forward function, could we just pass None to rotary_pos_emb when this forward function is called?

megatron/core/transformer/dot_product_attention.py Outdated Show resolved Hide resolved
megatron/core/transformer/mlp.py Outdated Show resolved Hide resolved
megatron/training/utils.py Outdated Show resolved Hide resolved
@@ -1,5 +1,4 @@
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2024, Advanced Micro Devices, Inc. All rights reserved.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that we made some minor changes on this file? So it seems that we still need to put the AMD Copyright statement here...

@@ -0,0 +1,243 @@
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this file from NV upstream or PAI?

@wenchenvincent
Copy link
Collaborator

@hakankiymaz-amd Could you run through the files again to check if the copyright statements are fine?
The guideline is that if we port the files from NV or PAI as is, we don't add AMD copyright statement there. But if we make changes, we will need to add AMD copyright statement.

@hakankiymaz-amd
Copy link
Author

hakankiymaz-amd commented Jan 29, 2025

@wenchenvincent sure. and here are the test results.
test_report_dsv2_ifu.csv

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.

3 participants