Spaces:
Running on Zero
Running on Zero
Expose larger-family benchmark traceback
Browse files
app.py
CHANGED
|
@@ -4,6 +4,7 @@ import json
|
|
| 4 |
import os
|
| 5 |
import time
|
| 6 |
import gc
|
|
|
|
| 7 |
from pathlib import Path
|
| 8 |
|
| 9 |
import gradio as gr
|
|
@@ -275,8 +276,7 @@ BF16_FAMILIES = {
|
|
| 275 |
}
|
| 276 |
|
| 277 |
|
| 278 |
-
|
| 279 |
-
def run_family_bf16_control(family: str) -> dict:
|
| 280 |
if family not in BF16_FAMILIES:
|
| 281 |
raise ValueError(f"unsupported family: {family}")
|
| 282 |
spec = BF16_FAMILIES[family]
|
|
@@ -361,6 +361,18 @@ def run_family_bf16_control(family: str) -> dict:
|
|
| 361 |
return result
|
| 362 |
|
| 363 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 364 |
with gr.Blocks() as demo:
|
| 365 |
gr.Markdown(
|
| 366 |
"# Embedding Quantization CUDA Control\n"
|
|
|
|
| 4 |
import os
|
| 5 |
import time
|
| 6 |
import gc
|
| 7 |
+
import traceback
|
| 8 |
from pathlib import Path
|
| 9 |
|
| 10 |
import gradio as gr
|
|
|
|
| 276 |
}
|
| 277 |
|
| 278 |
|
| 279 |
+
def _run_family_bf16_control(family: str) -> dict:
|
|
|
|
| 280 |
if family not in BF16_FAMILIES:
|
| 281 |
raise ValueError(f"unsupported family: {family}")
|
| 282 |
spec = BF16_FAMILIES[family]
|
|
|
|
| 361 |
return result
|
| 362 |
|
| 363 |
|
| 364 |
+
@spaces.GPU(duration=300)
|
| 365 |
+
def run_family_bf16_control(family: str) -> dict:
|
| 366 |
+
try:
|
| 367 |
+
return _run_family_bf16_control(family)
|
| 368 |
+
except Exception as error:
|
| 369 |
+
return {
|
| 370 |
+
"diagnostic_error": type(error).__name__,
|
| 371 |
+
"diagnostic_message": str(error),
|
| 372 |
+
"diagnostic_traceback": traceback.format_exc(),
|
| 373 |
+
}
|
| 374 |
+
|
| 375 |
+
|
| 376 |
with gr.Blocks() as demo:
|
| 377 |
gr.Markdown(
|
| 378 |
"# Embedding Quantization CUDA Control\n"
|