Remove delete inputs_embeds in _update_model_kwargs_for_generation
Browse files- modeling_chatglm.py +0 -4
modeling_chatglm.py
CHANGED
@@ -1099,10 +1099,6 @@ class ChatGLMForConditionalGeneration(ChatGLMPreTrainedModel):
|
|
1099 |
[position_ids, new_position_id], dim=-1
|
1100 |
)
|
1101 |
|
1102 |
-
# set to None as prepare_inputs_for_generation use past for input embeds
|
1103 |
-
if "inputs_embeds" in model_kwargs:
|
1104 |
-
model_kwargs["inputs_embeds"] = None
|
1105 |
-
|
1106 |
return model_kwargs
|
1107 |
|
1108 |
def prepare_inputs_for_generation(
|
|
|
1099 |
[position_ids, new_position_id], dim=-1
|
1100 |
)
|
1101 |
|
|
|
|
|
|
|
|
|
1102 |
return model_kwargs
|
1103 |
|
1104 |
def prepare_inputs_for_generation(
|