Remove import that no longer exists in Transformers
#2
by Rocketknight1 HF Staff - opened
21 unmodified lines2223242526272813 unmodified lines42434445464748495021 unmodified linesSequenceClassifierOutputWithPast,)from transformers.modeling_utils import PreTrainedModelfrom transformers.pytorch_utils import is_torch_greater_or_equal_than_1_13from transformers.utils import (add_start_docstrings,add_start_docstrings_to_model_forward,13 unmodified lines# This makes `_prepare_4d_causal_attention_mask` a leaf function in the FX graph.# It means that the function will not be traced through and simply appear as a node in the graph.if is_torch_fx_available():if not is_torch_greater_or_equal_than_1_13:import torch.fx_prepare_4d_causal_attention_mask = torch.fx.wrap(_prepare_4d_causal_attention_mask)from .configuration_minimax_text_01 import MiniMaxText01Config21 unmodified lines22232425262713 unmodified lines41424344454621 unmodified linesSequenceClassifierOutputWithPast,)from transformers.modeling_utils import PreTrainedModelfrom transformers.utils import (add_start_docstrings,add_start_docstrings_to_model_forward,13 unmodified lines# This makes `_prepare_4d_causal_attention_mask` a leaf function in the FX graph.# It means that the function will not be traced through and simply appear as a node in the graph.if is_torch_fx_available():_prepare_4d_causal_attention_mask = torch.fx.wrap(_prepare_4d_causal_attention_mask)from .configuration_minimax_text_01 import MiniMaxText01Config
modeling_minimax_text_01.py-4