anas-awadalla
commited on
Commit
•
f40a2c7
1
Parent(s):
a9e0851
add tie_weights()
Browse files- mosaic_gpt.py +3 -0
mosaic_gpt.py
CHANGED
@@ -242,6 +242,9 @@ class MosaicGPT(PreTrainedModel):
|
|
242 |
|
243 |
def set_output_embeddings(self, new_embeddings):
|
244 |
self.lm_head = new_embeddings
|
|
|
|
|
|
|
245 |
|
246 |
def forward(
|
247 |
self,
|
|
|
242 |
|
243 |
def set_output_embeddings(self, new_embeddings):
|
244 |
self.lm_head = new_embeddings
|
245 |
+
|
246 |
+
def tie_weights(self):
|
247 |
+
self.lm_head.weight = self.transformer.wte.weight
|
248 |
|
249 |
def forward(
|
250 |
self,
|