Skip to content

Commit 5c0c4bf

Browse files
author
Nitin Kanukolanu
committed
updates
1 parent fb32a56 commit 5c0c4bf

File tree

2 files changed

+86
-90
lines changed

2 files changed

+86
-90
lines changed

python-recipes/vector-search/06_hnsw_to_svs_vamana_migration.ipynb

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
},
8787
{
8888
"cell_type": "code",
89-
"execution_count": 2,
89+
"execution_count": 1,
9090
"metadata": {},
9191
"outputs": [],
9292
"source": [
@@ -110,7 +110,7 @@
110110
},
111111
{
112112
"cell_type": "code",
113-
"execution_count": 3,
113+
"execution_count": 2,
114114
"metadata": {},
115115
"outputs": [
116116
{
@@ -154,7 +154,7 @@
154154
},
155155
{
156156
"cell_type": "code",
157-
"execution_count": 4,
157+
"execution_count": 3,
158158
"metadata": {},
159159
"outputs": [
160160
{
@@ -202,7 +202,7 @@
202202
},
203203
{
204204
"cell_type": "code",
205-
"execution_count": 5,
205+
"execution_count": 4,
206206
"metadata": {},
207207
"outputs": [
208208
{
@@ -254,7 +254,7 @@
254254
},
255255
{
256256
"cell_type": "code",
257-
"execution_count": 6,
257+
"execution_count": 5,
258258
"metadata": {},
259259
"outputs": [
260260
{
@@ -330,22 +330,22 @@
330330
},
331331
{
332332
"cell_type": "code",
333-
"execution_count": 7,
333+
"execution_count": 6,
334334
"metadata": {},
335335
"outputs": [
336336
{
337337
"name": "stdout",
338338
"output_type": "stream",
339339
"text": [
340340
"🔄 Generating embeddings for movie descriptions...\n",
341-
"12:16:47 sentence_transformers.SentenceTransformer INFO Use pytorch device_name: mps\n",
342-
"12:16:47 sentence_transformers.SentenceTransformer INFO Load pretrained SentenceTransformer: all-MiniLM-L6-v2\n"
341+
"14:40:35 sentence_transformers.SentenceTransformer INFO Use pytorch device_name: mps\n",
342+
"14:40:35 sentence_transformers.SentenceTransformer INFO Load pretrained SentenceTransformer: all-MiniLM-L6-v2\n"
343343
]
344344
},
345345
{
346346
"data": {
347347
"application/vnd.jupyter.widget-view+json": {
348-
"model_id": "8b902d9279da4d269fbc39848a8f6240",
348+
"model_id": "dfa2af21d4904b58845f57a9786706e3",
349349
"version_major": 2,
350350
"version_minor": 0
351351
},
@@ -414,7 +414,7 @@
414414
},
415415
{
416416
"cell_type": "code",
417-
"execution_count": 8,
417+
"execution_count": 7,
418418
"metadata": {},
419419
"outputs": [
420420
{
@@ -443,7 +443,7 @@
443443
},
444444
{
445445
"cell_type": "code",
446-
"execution_count": 9,
446+
"execution_count": 8,
447447
"metadata": {},
448448
"outputs": [
449449
{
@@ -494,7 +494,7 @@
494494
},
495495
{
496496
"cell_type": "code",
497-
"execution_count": 10,
497+
"execution_count": 9,
498498
"metadata": {},
499499
"outputs": [
500500
{
@@ -585,7 +585,7 @@
585585
},
586586
{
587587
"cell_type": "code",
588-
"execution_count": 11,
588+
"execution_count": 10,
589589
"metadata": {},
590590
"outputs": [
591591
{
@@ -650,7 +650,7 @@
650650
},
651651
{
652652
"cell_type": "code",
653-
"execution_count": 12,
653+
"execution_count": 11,
654654
"metadata": {},
655655
"outputs": [
656656
{
@@ -705,7 +705,7 @@
705705
},
706706
{
707707
"cell_type": "code",
708-
"execution_count": 13,
708+
"execution_count": 12,
709709
"metadata": {},
710710
"outputs": [
711711
{
@@ -759,7 +759,7 @@
759759
},
760760
{
761761
"cell_type": "code",
762-
"execution_count": 14,
762+
"execution_count": 13,
763763
"metadata": {},
764764
"outputs": [
765765
{
@@ -851,7 +851,7 @@
851851
},
852852
{
853853
"cell_type": "code",
854-
"execution_count": 15,
854+
"execution_count": 14,
855855
"metadata": {},
856856
"outputs": [
857857
{
@@ -882,15 +882,15 @@
882882
},
883883
{
884884
"cell_type": "code",
885-
"execution_count": 16,
885+
"execution_count": 15,
886886
"metadata": {},
887887
"outputs": [
888888
{
889889
"name": "stdout",
890890
"output_type": "stream",
891891
"text": [
892892
"🔍 Testing HNSW search quality...\n",
893-
"HNSW search completed in 0.011 seconds\n"
893+
"HNSW search completed in 0.007 seconds\n"
894894
]
895895
}
896896
],
@@ -918,15 +918,15 @@
918918
},
919919
{
920920
"cell_type": "code",
921-
"execution_count": 17,
921+
"execution_count": 16,
922922
"metadata": {},
923923
"outputs": [
924924
{
925925
"name": "stdout",
926926
"output_type": "stream",
927927
"text": [
928928
"🔍 Testing SVS-VAMANA search quality...\n",
929-
"SVS-VAMANA search completed in 0.008 seconds\n"
929+
"SVS-VAMANA search completed in 0.006 seconds\n"
930930
]
931931
}
932932
],
@@ -963,7 +963,7 @@
963963
},
964964
{
965965
"cell_type": "code",
966-
"execution_count": 18,
966+
"execution_count": 17,
967967
"metadata": {},
968968
"outputs": [
969969
{
@@ -976,9 +976,9 @@
976976
"Recall@10: 0.990 (99.0%)\n",
977977
"\n",
978978
"⏱️ Performance Comparison:\n",
979-
"HNSW query time: 0.011s (1.1ms per query)\n",
980-
"SVS-VAMANA query time: 0.008s (0.8ms per query)\n",
981-
"Speed difference: +23.0%\n",
979+
"HNSW query time: 0.007s (0.7ms per query)\n",
980+
"SVS-VAMANA query time: 0.006s (0.6ms per query)\n",
981+
"Speed difference: +10.4%\n",
982982
"\n",
983983
"🎯 Quality Assessment: 🟢 Excellent - Minimal quality loss\n"
984984
]
@@ -1042,7 +1042,7 @@
10421042
},
10431043
{
10441044
"cell_type": "code",
1045-
"execution_count": 19,
1045+
"execution_count": 18,
10461046
"metadata": {},
10471047
"outputs": [
10481048
{
@@ -1112,7 +1112,7 @@
11121112
},
11131113
{
11141114
"cell_type": "code",
1115-
"execution_count": 20,
1115+
"execution_count": 19,
11161116
"metadata": {},
11171117
"outputs": [
11181118
{
@@ -1203,7 +1203,7 @@
12031203
},
12041204
{
12051205
"cell_type": "code",
1206-
"execution_count": 21,
1206+
"execution_count": 20,
12071207
"metadata": {},
12081208
"outputs": [
12091209
{

0 commit comments

Comments
 (0)