Spaces:
Sleeping
Sleeping
Zen0
commited on
Commit
·
0414451
1
Parent(s):
0718f6d
Add @spaces.GPU decorator for HuggingFace GPU support
Browse files
app.py
CHANGED
|
@@ -5,6 +5,7 @@ Interactive Gradio Space for benchmarking LLMs on Australian cybersecurity knowl
|
|
| 5 |
"""
|
| 6 |
|
| 7 |
import gradio as gr
|
|
|
|
| 8 |
import torch
|
| 9 |
import gc
|
| 10 |
import json
|
|
@@ -284,6 +285,7 @@ def evaluate_single_model(model_name, tasks, use_4bit=True, temperature=0.7, max
|
|
| 284 |
)
|
| 285 |
|
| 286 |
|
|
|
|
| 287 |
def run_evaluation(selected_models, num_samples, use_4bit, temperature, max_tokens, progress=gr.Progress()):
|
| 288 |
"""Run evaluation on selected models"""
|
| 289 |
global current_results
|
|
|
|
| 5 |
"""
|
| 6 |
|
| 7 |
import gradio as gr
|
| 8 |
+
import spaces
|
| 9 |
import torch
|
| 10 |
import gc
|
| 11 |
import json
|
|
|
|
| 285 |
)
|
| 286 |
|
| 287 |
|
| 288 |
+
@spaces.GPU
|
| 289 |
def run_evaluation(selected_models, num_samples, use_4bit, temperature, max_tokens, progress=gr.Progress()):
|
| 290 |
"""Run evaluation on selected models"""
|
| 291 |
global current_results
|