|
20 | 20 | from .cache_utils import Cache |
21 | 21 | from .configuration_utils import PreTrainedConfig |
22 | 22 | from .utils import is_torch_xpu_available, logging |
23 | | -from .utils.deprecation import deprecate_kwarg |
24 | 23 | from .utils.generic import GeneralInterface, is_flash_attention_requested |
25 | 24 | from .utils.import_utils import is_torch_flex_attn_available, is_torch_greater_or_equal, is_tracing |
26 | 25 |
|
@@ -788,7 +787,6 @@ def find_packed_sequence_indices(position_ids: torch.Tensor) -> torch.Tensor | N |
788 | 787 | return packed_sequence_mask |
789 | 788 |
|
790 | 789 |
|
791 | | -@deprecate_kwarg("input_embeds", version="5.6.0", new_name="inputs_embeds") |
792 | 790 | def _preprocess_mask_arguments( |
793 | 791 | config: PreTrainedConfig, |
794 | 792 | inputs_embeds: torch.Tensor, |
@@ -893,7 +891,6 @@ def _preprocess_mask_arguments( |
893 | 891 | return False, attention_mask, packed_sequence_mask, q_length, kv_length, q_offset, kv_offset |
894 | 892 |
|
895 | 893 |
|
896 | | -@deprecate_kwarg("input_embeds", version="5.6.0", new_name="inputs_embeds") |
897 | 894 | def create_causal_mask( |
898 | 895 | config: PreTrainedConfig, |
899 | 896 | inputs_embeds: torch.Tensor, |
@@ -1019,7 +1016,6 @@ def create_causal_mask( |
1019 | 1016 | return causal_mask |
1020 | 1017 |
|
1021 | 1018 |
|
1022 | | -@deprecate_kwarg("input_embeds", version="5.6.0", new_name="inputs_embeds") |
1023 | 1019 | def create_bidirectional_mask( |
1024 | 1020 | config: PreTrainedConfig, |
1025 | 1021 | inputs_embeds: torch.Tensor, |
@@ -1110,7 +1106,6 @@ def create_bidirectional_mask( |
1110 | 1106 | return attention_mask |
1111 | 1107 |
|
1112 | 1108 |
|
1113 | | -@deprecate_kwarg("input_embeds", version="5.6.0", new_name="inputs_embeds") |
1114 | 1109 | def create_sliding_window_causal_mask( |
1115 | 1110 | config: PreTrainedConfig, |
1116 | 1111 | inputs_embeds: torch.Tensor, |
@@ -1237,7 +1232,6 @@ def create_sliding_window_causal_mask( |
1237 | 1232 | return causal_mask |
1238 | 1233 |
|
1239 | 1234 |
|
1240 | | -@deprecate_kwarg("input_embeds", version="5.6.0", new_name="inputs_embeds") |
1241 | 1235 | def create_bidirectional_sliding_window_mask( |
1242 | 1236 | config: PreTrainedConfig, |
1243 | 1237 | inputs_embeds: torch.Tensor, |
@@ -1324,7 +1318,6 @@ def create_bidirectional_sliding_window_mask( |
1324 | 1318 | return attention_mask |
1325 | 1319 |
|
1326 | 1320 |
|
1327 | | -@deprecate_kwarg("input_embeds", version="5.6.0", new_name="inputs_embeds") |
1328 | 1321 | def create_chunked_causal_mask( |
1329 | 1322 | config: PreTrainedConfig, |
1330 | 1323 | inputs_embeds: torch.Tensor, |
@@ -1453,7 +1446,6 @@ def create_chunked_causal_mask( |
1453 | 1446 | } |
1454 | 1447 |
|
1455 | 1448 |
|
1456 | | -@deprecate_kwarg("input_embeds", version="5.6.0", new_name="inputs_embeds") |
1457 | 1449 | def create_masks_for_generate( |
1458 | 1450 | config: PreTrainedConfig, |
1459 | 1451 | inputs_embeds: torch.Tensor, |
|
0 commit comments