-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Summary Add a new monkeypatch function to support patching Huggingface's Phi3 implementation with Liger Kernels. Phi3 has its own MLP implementation (`Phi3MLP`) so a `LigerPhi3SwiGLUMLP` implementation that leverages `LigerSiLUMulFunction` is provided as well. ## Testing Done - [x] run `make test` to ensure correctness - [x] run `make checkstyle` to ensure code style - [x] run `make test-convergence` to ensure convergence Convergence test added (and passing on my 4090) for a minimodel based on Phi3 patched with liger kernels. All tests passing. ## Questions for Discussion Apparently Phi3 was only added in [transformers v4.41](https://github.com/huggingface/transformers/releases/tag/v4.41.0), but the lowest supported version of transformers in Liger-Kernel is 4.40.1. Additionally, only more recently has [`sdpa` been supported in HF Phi3](huggingface/transformers#32457). Thoughts? Should I leave the transformers dependency version as-is?
- Loading branch information
1 parent
a272dad
commit ee2dacb
Showing
11 changed files
with
204 additions
and
43 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
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
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
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
Oops, something went wrong.