Update modeling_minicpmv.py
Browse files- modeling_minicpmv.py +6 -0
modeling_minicpmv.py
CHANGED
@@ -61,6 +61,12 @@ class MiniCPMV(MiniCPMVPreTrainedModel):
|
|
61 |
]
|
62 |
)
|
63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
def get_vllm_embedding(self, data):
|
65 |
if 'vision_hidden_states' not in data:
|
66 |
dtype = self.vpm.embeddings.position_embedding.weight.dtype
|
|
|
61 |
]
|
62 |
)
|
63 |
|
64 |
+
def get_input_embeddings(self):
|
65 |
+
return self.llm.get_input_embeddings()
|
66 |
+
|
67 |
+
def set_input_embeddings(self, value):
|
68 |
+
self.llm.embed_tokens = value
|
69 |
+
|
70 |
def get_vllm_embedding(self, data):
|
71 |
if 'vision_hidden_states' not in data:
|
72 |
dtype = self.vpm.embeddings.position_embedding.weight.dtype
|