x54-729
commited on
Commit
•
d21b0ad
1
Parent(s):
f217a2f
small update
Browse files- modeling_internlm2.py +4 -4
modeling_internlm2.py
CHANGED
@@ -1632,10 +1632,10 @@ class InternLM2ForQuestionAnswering(InternLM2PreTrainedModel):
|
|
1632 |
self.post_init()
|
1633 |
|
1634 |
def get_input_embeddings(self):
|
1635 |
-
return self.transformer.
|
1636 |
|
1637 |
def set_input_embeddings(self, value):
|
1638 |
-
self.transformer.
|
1639 |
|
1640 |
@add_start_docstrings_to_model_forward(InternLM2_INPUTS_DOCSTRING)
|
1641 |
def forward(
|
@@ -1739,10 +1739,10 @@ class InternLM2ForTokenClassification(InternLM2PreTrainedModel):
|
|
1739 |
self.post_init()
|
1740 |
|
1741 |
def get_input_embeddings(self):
|
1742 |
-
return self.model.
|
1743 |
|
1744 |
def set_input_embeddings(self, value):
|
1745 |
-
self.model.
|
1746 |
|
1747 |
@add_start_docstrings_to_model_forward(InternLM2_INPUTS_DOCSTRING)
|
1748 |
def forward(
|
|
|
1632 |
self.post_init()
|
1633 |
|
1634 |
def get_input_embeddings(self):
|
1635 |
+
return self.transformer.tok_embeddings
|
1636 |
|
1637 |
def set_input_embeddings(self, value):
|
1638 |
+
self.transformer.tok_embeddings = value
|
1639 |
|
1640 |
@add_start_docstrings_to_model_forward(InternLM2_INPUTS_DOCSTRING)
|
1641 |
def forward(
|
|
|
1739 |
self.post_init()
|
1740 |
|
1741 |
def get_input_embeddings(self):
|
1742 |
+
return self.model.tok_embeddings
|
1743 |
|
1744 |
def set_input_embeddings(self, value):
|
1745 |
+
self.model.tok_embeddings = value
|
1746 |
|
1747 |
@add_start_docstrings_to_model_forward(InternLM2_INPUTS_DOCSTRING)
|
1748 |
def forward(
|