-
-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* rope embeddings added * added sinusoidial embedding * added rope to mha * added caching and compute-on-the-fly approach if no max_seq_len given and added process heads to MHA * remove `use_rope_embedding` flag * fixed merge related errors * removed unnecessary state_len flag and placed shape checking in if-clause * rope embeddings added * added sinusoidial embedding * added rope to mha * added caching and compute-on-the-fly approach if no max_seq_len given and added process heads to MHA * remove `use_rope_embedding` flag * fixed merge related errors * removed unnecessary state_len flag and placed shape checking in if-clause * worked in review * export new embeddings * removed state len again, oops * add ensure_compile_time_eval * remove max_seq_len completely * removed unnecessary if check * improved docstrings * better mem, adhering to strict jax config * fixed dtype promotion * removed dtype float and use float(seq_len) instead * jnp.arange(0.0, ...) to force floats * Adjustments to RoPE: - Changed how the rotation is done to match the ESM2 implementation. - Lots of doc tidy-ups. - Removed SinusoidalPositionalEmbedding. I think I want to be more certain that this is correct before merging it. * added rope tests * typo * fixed tests and annotations * removed internal_sinus cache --------- Co-authored-by: Patrick Kidger <[email protected]>
- Loading branch information
1 parent
7988ec2
commit fce75be
Showing
5 changed files
with
284 additions
and
2 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