cazyundee commited on
Commit
005dc00
·
verified ·
1 Parent(s): a903372

Separate model loading from CPU warmup

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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=45, env=env)
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),