bluuebunny commited on
Commit
05fee2d
·
verified ·
1 Parent(s): 8a1172f

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +15 -0
README.md ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Created vector embeddings for the `abstract` field for the dataset: [bluuebunny/crossref_metadata_2025_split](https://huggingface.co/datasets/bluuebunny/crossref_metadata_2025_split) using [mixedbread-ai/mxbai-embed-large-v1](https://huggingface.co/mixedbread-ai/mxbai-embed-large-v1) and binarised it using:
2
+ ```python
3
+ # Function to binarise float embeddings
4
+ def binarise(row):
5
+ # Make it a numpy array, since batching sends it as list
6
+ float_vector = np.array(row['vector'], dtype=np.float32)
7
+
8
+ # Binarise
9
+ binary_vector = np.where(float_vector >= 0, 1, 0)
10
+
11
+ # Pack it to make it milvus compatible
12
+ row['vector'] = np.packbits(binary_vector).tobytes()
13
+
14
+ return row
15
+ ```