summer summer commited on
Update modeling_loop_gqa_action.py
Browse files- modeling_loop_gqa_action.py +0 -13
modeling_loop_gqa_action.py
CHANGED
|
@@ -409,11 +409,6 @@ class LoopTransformerLM(
|
|
| 409 |
def __init__(self, config):
|
| 410 |
super().__init__(config)
|
| 411 |
|
| 412 |
-
# Transformers compatibility (newer versions inspect this during
|
| 413 |
-
# from_pretrained finalization). Define it eagerly.
|
| 414 |
-
self.all_tied_weights_keys = {
|
| 415 |
-
"lm_head.weight": "token_embedding.weight"
|
| 416 |
-
}
|
| 417 |
|
| 418 |
assert (
|
| 419 |
config.n_heads
|
|
@@ -473,9 +468,6 @@ class LoopTransformerLM(
|
|
| 473 |
|
| 474 |
# Reassert exact tied parameter after post_init.
|
| 475 |
self.lm_head.weight = self.token_embedding.weight
|
| 476 |
-
self.all_tied_weights_keys = {
|
| 477 |
-
"lm_head.weight": "token_embedding.weight"
|
| 478 |
-
}
|
| 479 |
|
| 480 |
def _init_weights(
|
| 481 |
self,
|
|
@@ -518,11 +510,6 @@ class LoopTransformerLM(
|
|
| 518 |
):
|
| 519 |
self.lm_head = new_embeddings
|
| 520 |
|
| 521 |
-
def tie_weights(self):
|
| 522 |
-
# Preserve the original exact shared parameter.
|
| 523 |
-
self.lm_head.weight = (
|
| 524 |
-
self.token_embedding.weight
|
| 525 |
-
)
|
| 526 |
|
| 527 |
def forward(
|
| 528 |
self,
|
|
|
|
| 409 |
def __init__(self, config):
|
| 410 |
super().__init__(config)
|
| 411 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 412 |
|
| 413 |
assert (
|
| 414 |
config.n_heads
|
|
|
|
| 468 |
|
| 469 |
# Reassert exact tied parameter after post_init.
|
| 470 |
self.lm_head.weight = self.token_embedding.weight
|
|
|
|
|
|
|
|
|
|
| 471 |
|
| 472 |
def _init_weights(
|
| 473 |
self,
|
|
|
|
| 510 |
):
|
| 511 |
self.lm_head = new_embeddings
|
| 512 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 513 |
|
| 514 |
def forward(
|
| 515 |
self,
|