add embedding api

This commit is contained in:
yichuan520030910320 committed 2025-07-17 22:29:31 -07:00
1 parent 335ae003ac
commit aec2291f04
4 files changed
+323 -7

No files matched your search

+1 -1
View File
@@ -76,7 +76,7 @@ def compute_embeddings_sentence_transformers(chunks: List[str], model_name: str)
# Generate embeddings
# 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
chunks, convert_to_numpy=True, show_progress_bar=True, batch_size=8
)
return embeddings
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.