Remove import that no longer exists in Transformers
#5
by Rocketknight1 HF Staff - opened
21 unmodified lines2223242526272814 unmodified lines4344454647484950515221 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,14 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)use_triton = eval(os.environ.get("use_triton", default="False"))debug = eval(os.environ.get("debug", default="False"))do_eval = eval(os.environ.get("do_eval", default="False"))21 unmodified lines22232425262714 unmodified lines424344454647484921 unmodified linesSequenceClassifierOutputWithPast,)from transformers.modeling_utils import PreTrainedModelfrom transformers.utils import (add_start_docstrings,add_start_docstrings_to_model_forward,14 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)use_triton = eval(os.environ.get("use_triton", default="False"))debug = eval(os.environ.get("debug", default="False"))do_eval = eval(os.environ.get("do_eval", default="False"))
modeling_minimax_text_01.py+1-4