multimodalart HF Staff commited on
Commit
8f0cdc8
·
verified ·
1 Parent(s): 76b08b7

[Admin maintenance] Support new ZeroGPU hardware

Browse files

Thank you so much for having shared this Space with the community on this demo. We have upgraded the ZeroGPU infra-structure to run on modern blackwell architecture.
For that, we need to upgrade your demo to support that. This PR fixes your demo to work with the new architecture. As this is something we broke on our end, we may merge this PR autonomously. If this breaks unexpectedly or brings unintended consequences, feel free to revert, modify or otherwise. Any issues you can email apolinario@huggingface.co

Files changed (2) hide show
  1. README.md +1 -1
  2. app.py +1 -8
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: 🔍➡️📝
4
  colorFrom: gray
5
  colorTo: green
6
  sdk: gradio
7
- sdk_version: 4.44.0
8
  app_file: app.py
9
  pinned: false
10
  ---
 
4
  colorFrom: gray
5
  colorTo: green
6
  sdk: gradio
7
+ sdk_version: 5.50.0
8
  app_file: app.py
9
  pinned: false
10
  ---
app.py CHANGED
@@ -12,13 +12,6 @@ if not hasattr(huggingface_hub, "HfFolder"):
12
  try: huggingface_hub.logout()
13
  except Exception: pass
14
  huggingface_hub.HfFolder = HfFolder
15
- import subprocess # 🥲
16
-
17
- subprocess.run(
18
- "pip install flash-attn --no-build-isolation",
19
- env={"FLASH_ATTENTION_SKIP_CUDA_BUILD": "TRUE"},
20
- shell=True,
21
- )
22
  import spaces
23
  import gradio as gr
24
  import re
@@ -36,7 +29,7 @@ os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"
36
  model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
37
  "Qwen/Qwen2.5-VL-7B-Instruct",
38
  torch_dtype=torch.bfloat16,
39
- attn_implementation="flash_attention_2",
40
  device_map="auto",
41
  )
42
  processor = AutoProcessor.from_pretrained(
 
12
  try: huggingface_hub.logout()
13
  except Exception: pass
14
  huggingface_hub.HfFolder = HfFolder
 
 
 
 
 
 
 
15
  import spaces
16
  import gradio as gr
17
  import re
 
29
  model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
30
  "Qwen/Qwen2.5-VL-7B-Instruct",
31
  torch_dtype=torch.bfloat16,
32
+ attn_implementation="sdpa",
33
  device_map="auto",
34
  )
35
  processor = AutoProcessor.from_pretrained(