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

Support Deepseekv2 #87

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open

Support Deepseekv2 #87

wants to merge 1 commit into from

Conversation

hongywei
Copy link

@hongywei hongywei commented Oct 31, 2024

Description

The current TE version does not seem to support Deepseekv2, so some modifications have been made to attention.py.

Fixes # (issue)

Type of change

  • Documentation change (change only to the documentation, either a fix or a new content)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Infra/Build change
  • Code refractor

Changes

Please list the changes introduced in this PR:
only modify attention.py

  • 2292line modify _get_qkv_layout() function according to nvidia/Transformer_engine
  • 4542line kv_channels:int - > kv_channels: Union[int, Tuple[int, int]] and other changes such as 4578-4583line
  • 4602line modify softmax_scale computation
  • 4881line comment out, because deepseekv2 does not require k and vshape to be consistent.

Checklist:

  • I have read and followed the contributing guidelines
  • The functionality is complete
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@wenchenvincent
Copy link
Collaborator

@hongywei Could you please describe which attention features that deepseek v2 need?

@hongywei
Copy link
Author

hongywei commented Nov 5, 2024

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.

2 participants