Commit cec9dec3 by PLN (Algolia)

fix(vibe): warm-up runs a real text forward (absorb torch lazy-init)

Loading weights wasn't enough — the first forward still cost ~30s on torch's
one-time graph/thread init. Warm now runs a throwaway _embed_texts() so the first
USER query is ~1.5s, not 30s.
parent e3b1fecc
...@@ -179,8 +179,9 @@ if __name__ == "__main__": ...@@ -179,8 +179,9 @@ if __name__ == "__main__":
def _warm(): def _warm():
try: try:
print(" vibe : warming CLAP…", flush=True) print(" vibe : warming CLAP…", flush=True)
_vibe_load() V = _vibe_load()
print(" vibe : ready (/vibe, /similar)", flush=True) V["S"]._embed_texts(["warm up"]) # exercise the text tower (torch
print(" vibe : ready (/vibe, /similar)", flush=True) # lazy-inits once)
except Exception as e: except Exception as e:
print(f" vibe : disabled — {e}", flush=True) print(f" vibe : disabled — {e}", flush=True)
threading.Thread(target=_warm, daemon=True).start() threading.Thread(target=_warm, daemon=True).start()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment