Commit 4a2da99
authored
Fix RMS norm patching (#741)
## Summary
<!--- This is a required section; please describe the main purpose of
this proposed code change. --->
Fixes #739.
<!---
## Details
This is an optional section; is there anything specific that reviewers
should be aware of?
--->
Creates new classes for various RMS norms and removes the use of
`partial` for RMS norms.
## Testing Done
<!--- This is a required section; please describe how this change was
tested. --->
Fixes errors of the form:
```
TypeError: isinstance() arg 2 must be a type, a tuple of types, or a union
```
for glm4, olmo2, gemma1 and gemma2.
However, we are now seeing errors when matching the actual logits with
gemma models, which can be tracked separately in
#729.
<!--
Replace BLANK with your device type. For example, A100-80G-PCIe
Complete the following tasks before sending your PR, and replace `[ ]`
with
`[x]` to indicate you have done them.
-->
- Hardware Type: <BLANK>
- [ ] run `make test` to ensure correctness
- [ ] run `make checkstyle` to ensure code style
- [ ] run `make test-convergence` to ensure convergence1 parent 08f2ea4 commit 4a2da99
File tree
3 files changed
+44
-14
lines changed- src/liger_kernel/transformers
3 files changed
+44
-14
lines changedThis file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
627 | 627 | | |
628 | 628 | | |
629 | 629 | | |
630 | | - | |
631 | | - | |
| 630 | + | |
| 631 | + | |
632 | 632 | | |
633 | 633 | | |
634 | 634 | | |
| |||
701 | 701 | | |
702 | 702 | | |
703 | 703 | | |
704 | | - | |
| 704 | + | |
| 705 | + | |
705 | 706 | | |
706 | 707 | | |
707 | 708 | | |
| |||
780 | 781 | | |
781 | 782 | | |
782 | 783 | | |
783 | | - | |
784 | 784 | | |
| 785 | + | |
785 | 786 | | |
786 | 787 | | |
787 | 788 | | |
| |||
1451 | 1452 | | |
1452 | 1453 | | |
1453 | 1454 | | |
| 1455 | + | |
1454 | 1456 | | |
1455 | 1457 | | |
1456 | 1458 | | |
1457 | 1459 | | |
1458 | | - | |
| 1460 | + | |
1459 | 1461 | | |
1460 | 1462 | | |
1461 | 1463 | | |
| |||
1514 | 1516 | | |
1515 | 1517 | | |
1516 | 1518 | | |
| 1519 | + | |
1517 | 1520 | | |
1518 | 1521 | | |
1519 | 1522 | | |
1520 | 1523 | | |
1521 | | - | |
| 1524 | + | |
1522 | 1525 | | |
1523 | 1526 | | |
1524 | 1527 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
0 commit comments