er1t0 commited on
Commit
7976ee8
1 Parent(s): 5680f2a

flash attn fix

Browse files
Files changed (1) hide show
  1. utils.py +1 -1
utils.py CHANGED
@@ -4,7 +4,7 @@ from transformers.dynamic_module_utils import get_imports
4
 
5
  def fixed_get_imports(filename: str | os.PathLike) -> list[str]:
6
  """Workaround for flash_attn import issue."""
7
- if not str(filename).endswith(("modeling_phi.py", "configuration_florence2.py")):
8
  return get_imports(filename)
9
  imports = get_imports(filename)
10
  if "flash_attn" in imports:
 
4
 
5
  def fixed_get_imports(filename: str | os.PathLike) -> list[str]:
6
  """Workaround for flash_attn import issue."""
7
+ if not str(filename).endswith(("/modeling_florence2.py", "configuration_florence2.py")):
8
  return get_imports(filename)
9
  imports = get_imports(filename)
10
  if "flash_attn" in imports: