add email test code

This commit is contained in:
yichuan520030910320
2025-07-11 23:59:47 -07:00
parent eb6f504789
commit 74ffd7ec64
4 changed files with 21 additions and 6 deletions

View File

@@ -39,7 +39,8 @@ def compute_embeddings(chunks: List[str], model_name: str) -> np.ndarray:
model = model.to("mps")
# Generate embeddings
embeddings = model.encode(chunks, convert_to_numpy=True, show_progress_bar=True, batch_size=64)
# give use an warning if OOM here means we need to turn down the batch size
embeddings = model.encode(chunks, convert_to_numpy=True, show_progress_bar=True, batch_size=256)
return embeddings