Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -3,25 +3,10 @@ import json
|
|
3 |
import spaces
|
4 |
import gradio as gr
|
5 |
import torch
|
6 |
-
from distilabel.llms import
|
7 |
-
from distilabel.steps.tasks.argillalabeller import ArgillaLabeller
|
8 |
-
from transformers import BitsAndBytesConfig
|
9 |
-
|
10 |
-
quantization_config = BitsAndBytesConfig(
|
11 |
-
load_in_4bit=True,
|
12 |
-
bnb_4bit_compute_dtype=torch.bfloat16,
|
13 |
-
bnb_4bit_use_double_quant=True,
|
14 |
-
bnb_4bit_quant_type="nf4",
|
15 |
-
)
|
16 |
-
|
17 |
|
18 |
-
llm =
|
19 |
-
model="
|
20 |
-
torch_dtype="float16",
|
21 |
-
model_kwargs={
|
22 |
-
"quantization_config": quantization_config,
|
23 |
-
"device_map": "auto",
|
24 |
-
},
|
25 |
)
|
26 |
task = ArgillaLabeller(llm=llm)
|
27 |
task.load()
|
|
|
3 |
import spaces
|
4 |
import gradio as gr
|
5 |
import torch
|
6 |
+
from distilabel.llms import vLLM
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
+
llm = vLLM(
|
9 |
+
model="Qwen/Qwen2-0.5B-Instruct-GGUF"
|
|
|
|
|
|
|
|
|
|
|
10 |
)
|
11 |
task = ArgillaLabeller(llm=llm)
|
12 |
task.load()
|