cleaned code

This commit is contained in:
Yannick Stephan
2025-02-15 22:37:32 +01:00
parent eaf1d553d2
commit 3319db0dba
3 changed files with 4 additions and 9 deletions

View File

@@ -488,7 +488,7 @@ def cosine_similarity(v1, v2):
return dot_product / (norm1 * norm2)
def quantize_embedding(embedding: np.ndarray | list[float], bits: int=8) -> tuple:
def quantize_embedding(embedding: np.ndarray | list[float], bits: int = 8) -> tuple:
"""Quantize embedding to specified bits"""
# Convert list to numpy array if needed
if isinstance(embedding, list):