Erinaldorodrigues commited on
Commit
adc6ad5
·
verified ·
1 Parent(s): 510ea8b

Stabilize FP8 kernel loading on ZeroGPU

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -14,6 +14,14 @@ import time
14
  import uuid
15
  from typing import Any
16
 
 
 
 
 
 
 
 
 
17
  import gradio as gr
18
  import spaces
19
  import torch
 
14
  import uuid
15
  from typing import Any
16
 
17
+ # Hub kernel downloads can create concurrent tqdm bars inside a ZeroGPU worker;
18
+ # tqdm's shared position bookkeeping is racy there. Progress is irrelevant in
19
+ # a Space runtime, so disable it before importing Hugging Face libraries.
20
+ os.environ.setdefault("HF_HUB_DISABLE_PROGRESS_BARS", "1")
21
+ # DeepGEMM does not yet recognize the ZeroGPU Blackwell SM120 device. The
22
+ # fine-grained FP8 Triton kernel supports it and is the correct fallback.
23
+ os.environ.setdefault("TRANSFORMERS_DISABLE_DEEPGEMM_LINEAR", "1")
24
+
25
  import gradio as gr
26
  import spaces
27
  import torch