Add warning
Browse files- modeling_chatglm.py +2 -0
modeling_chatglm.py
CHANGED
@@ -913,6 +913,8 @@ class ChatGLMModel(ChatGLMPreTrainedModel):
|
|
913 |
)
|
914 |
use_cache = False
|
915 |
|
|
|
|
|
916 |
if input_ids is not None:
|
917 |
batch_size, seq_length = input_ids.shape[:2]
|
918 |
elif inputs_embeds is not None:
|
|
|
913 |
)
|
914 |
use_cache = False
|
915 |
|
916 |
+
if input_ids is not None and inputs_embeds is not None:
|
917 |
+
logger.warning("You passed both `inputs_embeds` and `input_ids`. Will use `inputs_embeds`")
|
918 |
if input_ids is not None:
|
919 |
batch_size, seq_length = input_ids.shape[:2]
|
920 |
elif inputs_embeds is not None:
|