Update modeling_cloverlm.py
Browse files- modeling_cloverlm.py +1 -3
modeling_cloverlm.py
CHANGED
|
@@ -209,13 +209,11 @@ class CloverLMForCausalLM(PreTrainedModel, GenerationMixin):
|
|
| 209 |
config_class = CloverLMConfig
|
| 210 |
supports_gradient_checkpointing = False
|
| 211 |
_no_split_modules = ["_Block"]
|
| 212 |
-
_tied_weights_keys =
|
| 213 |
_tp_plan = {}
|
| 214 |
|
| 215 |
def __init__(self, config: CloverLMConfig):
|
| 216 |
super().__init__(config)
|
| 217 |
-
self.all_tied_weights_keys = {k: "transformer.emb.weight"
|
| 218 |
-
for k in (self._tied_weights_keys or [])}
|
| 219 |
self.transformer = _Transformer(
|
| 220 |
vocab_size=config.vocab_size,
|
| 221 |
num_blocks=config.num_blocks,
|
|
|
|
| 209 |
config_class = CloverLMConfig
|
| 210 |
supports_gradient_checkpointing = False
|
| 211 |
_no_split_modules = ["_Block"]
|
| 212 |
+
_tied_weights_keys = {"transformer.linear.weight": "transformer.emb.weight"}
|
| 213 |
_tp_plan = {}
|
| 214 |
|
| 215 |
def __init__(self, config: CloverLMConfig):
|
| 216 |
super().__init__(config)
|
|
|
|
|
|
|
| 217 |
self.transformer = _Transformer(
|
| 218 |
vocab_size=config.vocab_size,
|
| 219 |
num_blocks=config.num_blocks,
|