Skip to content

armgit / txtai

Public Imported from GitHub
0

💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows

Update dtype to np.float32

davidmezzettifc579d77aa25
diff --git a/src/python/txtai/scoring/normalize.py b/src/python/txtai/scoring/normalize.py
index f24b9c15..573f3daf 100644
--- a/src/python/txtai/scoring/normalize.py
+++ b/src/python/txtai/scoring/normalize.py
@@ -81,8 +81,8 @@ class Normalize:
"""
# Convert scores to numpy array
- values = np.array([score for _, score in scores], dtype=np.float64)
- probabilities = np.zeros(values.shape[0], dtype=np.float64)
+ values = np.array([score for _, score in scores], dtype=np.float32)
+ probabilities = np.zeros(values.shape[0], dtype=np.float32)
# Follow BB25 candidate-set behavior:
# - estimate statistics on positive-score candidates only