Spaces:
Running on Zero
Running on Zero
Separate model loading from CPU warmup
Browse files
app.py
CHANGED
|
@@ -327,10 +327,10 @@ def _run_cpu_smoke(model_filter):
|
|
| 327 |
result["phases"]["download"] = {"ok": False, "elapsed_sec": round(time.time() - t0, 2), "error": str(exc)}
|
| 328 |
return result
|
| 329 |
|
| 330 |
-
command = [cli, "-m", path, "-t", str(result["threads"]), "-ngl", "0", "-c", "256", "-n", "1", "-p", "Say hi.", "--no-display-prompt"]
|
| 331 |
t0 = time.time()
|
| 332 |
try:
|
| 333 |
-
run = subprocess.run(command, capture_output=True, text=True, timeout=
|
| 334 |
result["phases"]["load_and_one_token"] = {
|
| 335 |
"ok": run.returncode == 0,
|
| 336 |
"elapsed_sec": round(time.time() - t0, 2),
|
|
|
|
| 327 |
result["phases"]["download"] = {"ok": False, "elapsed_sec": round(time.time() - t0, 2), "error": str(exc)}
|
| 328 |
return result
|
| 329 |
|
| 330 |
+
command = [cli, "-m", path, "-t", str(result["threads"]), "-ngl", "0", "-c", "256", "-n", "1", "-p", "Say hi.", "--no-display-prompt", "--no-warmup"]
|
| 331 |
t0 = time.time()
|
| 332 |
try:
|
| 333 |
+
run = subprocess.run(command, capture_output=True, text=True, timeout=180, env=env)
|
| 334 |
result["phases"]["load_and_one_token"] = {
|
| 335 |
"ok": run.returncode == 0,
|
| 336 |
"elapsed_sec": round(time.time() - t0, 2),
|