Update README.md
Browse files
README.md
CHANGED
@@ -64,7 +64,7 @@ from scipy.spatial.distance import cdist
|
|
64 |
retriever = pipeline('feature-extraction', 'cmarkea/bloomz-3b-retriever')
|
65 |
|
66 |
# Inportant: take only last token!
|
67 |
-
infer = lambda x: [ii[0][-1] for ii in retriever(x)]
|
68 |
|
69 |
list_of_contexts = [...]
|
70 |
emb_contexts = np.concatenate(infer(list_of_contexts), axis=0)
|
|
|
64 |
retriever = pipeline('feature-extraction', 'cmarkea/bloomz-3b-retriever')
|
65 |
|
66 |
# Inportant: take only last token!
|
67 |
+
infer = lambda x: [np.array(ii[0][-1]).reshape(1,-1) for ii in retriever(x)]
|
68 |
|
69 |
list_of_contexts = [...]
|
70 |
emb_contexts = np.concatenate(infer(list_of_contexts), axis=0)
|