Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -6,10 +6,10 @@ import time
|
|
6 |
|
7 |
import huggingface_hub as hf_hub
|
8 |
# εε§ε OpenVINO 樑ε
|
9 |
-
|
10 |
-
|
11 |
-
model_id = "OpenVINO/Phi-4-mini-instruct-int4-ov"
|
12 |
-
model_path = "Phi-4-mini-instruct-int4-ov"
|
13 |
|
14 |
|
15 |
|
@@ -40,7 +40,8 @@ def generate_stream(prompt):
|
|
40 |
def worker():
|
41 |
# ε¨θζ― thread δΈεζ¨θ«
|
42 |
nonlocal tps_result
|
43 |
-
|
|
|
44 |
tps = gen_result.perf_metrics.get_throughput().mean
|
45 |
tps_result = f"{tps:.2f} tokens/s"
|
46 |
q.put(None) # η΅ζ符θ
|
|
|
6 |
|
7 |
import huggingface_hub as hf_hub
|
8 |
# εε§ε OpenVINO 樑ε
|
9 |
+
model_id = "OpenVINO/Qwen3-0.6B-int4-ov"
|
10 |
+
model_path = "Qwen3-0.6B-int4-ov"
|
11 |
+
#model_id = "OpenVINO/Phi-4-mini-instruct-int4-ov"
|
12 |
+
#model_path = "Phi-4-mini-instruct-int4-ov"
|
13 |
|
14 |
|
15 |
|
|
|
40 |
def worker():
|
41 |
# ε¨θζ― thread δΈεζ¨θ«
|
42 |
nonlocal tps_result
|
43 |
+
prompt = prompt + "/no_think"
|
44 |
+
gen_result = pipe.generate([prompt], streamer=streamer, max_new_tokens=32767)
|
45 |
tps = gen_result.perf_metrics.get_throughput().mean
|
46 |
tps_result = f"{tps:.2f} tokens/s"
|
47 |
q.put(None) # η΅ζ符θ
|