zxdu20 commited on
Commit
29868f4
1 Parent(s): 34a7f82

Add warning

Browse files
Files changed (1) hide show
  1. 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: