Commit
•
6914c01
1
Parent(s):
670d17e
Update modeling_baichuan.py (#6)
Browse files- Update modeling_baichuan.py (0498e281c48996cb9ff7b3f1485830cdb626ef58)
Co-authored-by: JaheimLee <[email protected]>
- modeling_baichuan.py +1 -1
modeling_baichuan.py
CHANGED
@@ -513,7 +513,7 @@ class NormHead(nn.Module):
|
|
513 |
norm_weight = nn.functional.normalize(self.weight)
|
514 |
elif self.first_flag:
|
515 |
self.first_flag = False
|
516 |
-
self.weight = nn.
|
517 |
norm_weight = self.weight
|
518 |
else:
|
519 |
norm_weight = self.weight
|
|
|
513 |
norm_weight = nn.functional.normalize(self.weight)
|
514 |
elif self.first_flag:
|
515 |
self.first_flag = False
|
516 |
+
self.weight.data = nn.functional.normalize(self.weight)
|
517 |
norm_weight = self.weight
|
518 |
else:
|
519 |
norm_weight = self.weight
|