Update modeling_chatglm.py
Browse files- modeling_chatglm.py +3 -0
modeling_chatglm.py
CHANGED
@@ -705,6 +705,9 @@ class ChatGLMModel(ChatGLMPreTrainedModel):
|
|
705 |
def get_input_embeddings(self):
|
706 |
return self.embedding.word_embeddings
|
707 |
|
|
|
|
|
|
|
708 |
def forward(
|
709 |
self,
|
710 |
input_ids,
|
|
|
705 |
def get_input_embeddings(self):
|
706 |
return self.embedding.word_embeddings
|
707 |
|
708 |
+
def set_input_embeddings(self, new_embeddings: torch.Tensor):
|
709 |
+
self.word_embeddings = new_embeddings
|
710 |
+
|
711 |
def forward(
|
712 |
self,
|
713 |
input_ids,
|