support inference of llamafactory
#4
by
BUAADreamer
- opened
- modeling_minicpmo.py +3 -2
modeling_minicpmo.py
CHANGED
@@ -595,7 +595,7 @@ class MiniCPMO(MiniCPMOPreTrainedModel):
|
|
595 |
elif self.training:
|
596 |
for i in range(bs):
|
597 |
# dummy audio_embeddings
|
598 |
-
input_embeddings
|
599 |
|
600 |
return input_embeddings
|
601 |
|
@@ -751,7 +751,7 @@ class MiniCPMO(MiniCPMOPreTrainedModel):
|
|
751 |
input_ids=None,
|
752 |
pixel_values=None,
|
753 |
tgt_sizes=None,
|
754 |
-
audio_features=
|
755 |
audio_feature_lens=None,
|
756 |
image_bound=None,
|
757 |
audio_bounds=None,
|
@@ -2655,6 +2655,7 @@ class ConditionalChatTTS(PreTrainedModel):
|
|
2655 |
"""
|
2656 |
|
2657 |
config_class = ConditionalChatTTSConfig
|
|
|
2658 |
|
2659 |
def __init__(self, config: ConditionalChatTTSConfig):
|
2660 |
super().__init__(config)
|
|
|
595 |
elif self.training:
|
596 |
for i in range(bs):
|
597 |
# dummy audio_embeddings
|
598 |
+
input_embeddings = input_embeddings + audio_embeddings[0].mean() * 0
|
599 |
|
600 |
return input_embeddings
|
601 |
|
|
|
751 |
input_ids=None,
|
752 |
pixel_values=None,
|
753 |
tgt_sizes=None,
|
754 |
+
audio_features=[],
|
755 |
audio_feature_lens=None,
|
756 |
image_bound=None,
|
757 |
audio_bounds=None,
|
|
|
2655 |
"""
|
2656 |
|
2657 |
config_class = ConditionalChatTTSConfig
|
2658 |
+
_no_split_modules = []
|
2659 |
|
2660 |
def __init__(self, config: ConditionalChatTTSConfig):
|
2661 |
super().__init__(config)
|