Commit f5f8185
committed
refactor(pt): Simplify index calculation and enhance type embedding handling in se_atten
- Streamlined the index calculation for neighbor types by removing unnecessary reshaping and expansion.
- Improved clarity in the handling of type embeddings, ensuring that the logic for two-side embeddings remains intact while enhancing readability.
- Maintained functionality for both compressed and uncompressed type embeddings, optimizing the inference process.
These changes contribute to cleaner code and maintain the performance benefits introduced in previous commits.1 parent 2c829b2 commit f5f8185
1 file changed
+18
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
633 | 633 | | |
634 | 634 | | |
635 | 635 | | |
636 | | - | |
637 | | - | |
638 | | - | |
639 | | - | |
640 | | - | |
641 | | - | |
642 | | - | |
643 | | - | |
644 | | - | |
645 | | - | |
646 | | - | |
647 | | - | |
648 | | - | |
649 | | - | |
650 | | - | |
651 | | - | |
652 | | - | |
653 | | - | |
654 | | - | |
655 | | - | |
656 | | - | |
657 | | - | |
| 636 | + | |
| 637 | + | |
658 | 638 | | |
| 639 | + | |
659 | 640 | | |
660 | 641 | | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
661 | 656 | | |
662 | 657 | | |
663 | 658 | | |
664 | 659 | | |
665 | | - | |
| 660 | + | |
666 | 661 | | |
667 | 662 | | |
668 | 663 | | |
| |||
0 commit comments