-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(internlm): implement patch for non-legacy rotary_emb
- Loading branch information
Showing
6 changed files
with
34 additions
and
191 deletions.
There are no files selected for viewing
This file contains 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 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 |
---|---|---|
@@ -1,14 +1,11 @@ | ||
# Copyright (c) 2024, DeepLink. | ||
|
||
try: | ||
from .deeplink import DeepLinkApplyRotaryEmb, DeepLinkApplyRotaryEmbQKV_ | ||
from .deeplink import DeepLinkApplyRotaryEmbQKV_ | ||
except: | ||
print( | ||
"[deeplink_ext] rotary is not implemented in diopi. Falling back to the slower implementation.\n", | ||
end="", | ||
) | ||
from .fallback import ( | ||
ApplyRotaryEmb as DeepLinkApplyRotaryEmb, | ||
ApplyRotaryEmbQKV_ as DeepLinkApplyRotaryEmbQKV_, | ||
) | ||
from .fallback import ApplyRotaryEmbQKV_ as DeepLinkApplyRotaryEmbQKV_ | ||
from . import fallback |
This file contains 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 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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Copyright (c) 2024, DeepLink. | ||
|
||
from .fallback import ApplyRotaryEmb, ApplyRotaryEmbQKV_ | ||
from .fallback import ApplyRotaryEmbQKV_ |
This file contains 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 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