Re: [VOTE] Dimension Limit for KNN Vectors

Mikhail Khludnev <[email protected]> Thu, 14 May 2026 18:00:33 +0300
Newsgroups gmane.comp.jakarta.lucene.devel
Message-ID <CAF8TkC5e=mmRK4APnGNeiACGB8MByq4wbnyeXL_hOfyNO2BF7Q@mail.gmail.com>
--000000000000d889f50651c85d23
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Pardon for raising the dead thread, but it might be interesting

https://openai.com/index/new-embedding-models-and-api-updates/
 text-embedding-3-large embedding can be shortened to a size of 256 while
still outperforming an unshortened text-embedding-ada-002 embedding with a
size of 1536.
It's about Matryoshka Representation Learning (MRL)

On Tue, May 23, 2023 at 12:27=E2=80=AFPM Alessandro Benedetti <a.benedetti@=
sease.io>
wrote:

> Closing the poll after one week, these are the results:
>
> Option 2-4: 9 votes
> make the limit configurable, potentially moving the limit to the
> appropriate place
>
> Option 3: 5 votes
> keep it as it is (1024) but move it lower level in HNSW-specific
> implementation
>
> Option 1: 0 votes
> keep it as it is (1024)
>
> -----
> I was expecting more people to express their preferences, unfortunately,
> many digressed to discussions without expressing any.
> Given that, it seems clear that we want one of the most voted options, so
> let's continue the discussions under the related Pull Requests and then
> proceed to merges when agreement if found!
>
> Thanks to everyone involved!
>
>
> --------------------------
> *Alessandro Benedetti*
> Director @ Sease Ltd.
> *Apache Lucene/Solr Committer*
> *Apache Solr PMC Member*
>
> e-mail: [email protected]
>
>
> *Sease* - Information Retrieval Applied
> Consulting | Training | Open Source
>
> Website: Sease.io <http://sease.io/>
> LinkedIn <https://linkedin.com/company/sease-ltd> | Twitter
> <https://twitter.com/seaseltd> | Youtube
> <https://www.youtube.com/channel/UCDx86ZKLYNpI3gzMercM7BQ> | Github
> <https://github.com/seaseltd>
>
>
> On Mon, 22 May 2023 at 09:17, Bruno Roustant <[email protected]>
> wrote:
>
>> I vote for option 3.
>> Then with a follow up work to have a simple extension codec in the
>> "codecs" package which is
>> 1- not backward compatible, and 2- has a higher or configurable limit.
>> That way users can directly use this codec without any additional code.
>>
>

--=20
Sincerely yours
Mikhail Khludnev

--000000000000d889f50651c85d23
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Pardon for raising the dead thread, but it might be i=
nteresting=C2=A0<br><br></div><div><a href=3D"https://openai.com/index/new-=
embedding-models-and-api-updates/">https://openai.com/index/new-embedding-m=
odels-and-api-updates/</a><br><span style=3D"box-sizing:border-box;border:0=
px solid rgb(229,231,235);margin:0px;padding:0px;color:rgb(0,0,0);font-fami=
ly:&quot;OpenAI Sans&quot;,sans-serif;font-size:17px;font-style:normal;font=
-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-s=
pacing:-0.17px;text-align:start;text-indent:0px;text-transform:none;word-sp=
acing:0px;white-space:normal;background-color:rgb(255,255,255);text-decorat=
ion-style:initial;text-decoration-color:initial"><span>=C2=A0</span></span>=
<code style=3D"box-sizing:border-box;border:0px solid rgb(229,231,235);marg=
in:0px;padding:0px;font-family:&quot;SF Mono&quot;,Consolas,&quot;Liberatio=
n Mono&quot;,ui-monospace,monospace;font-feature-settings:normal;font-size:=
0.875em;color:rgb(0,0,0);border-radius:4px;font-weight:400;font-style:norma=
l;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:-0.=
17px;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;=
white-space:normal;text-decoration-style:initial;text-decoration-color:init=
ial"><span style=3D"box-sizing:border-box;border:0px solid rgb(229,231,235)=
;margin:0px;padding:0px">text-embedding-3-large</span></code><span style=3D=
"box-sizing:border-box;border:0px solid rgb(229,231,235);margin:0px;padding=
:0px;color:rgb(0,0,0);font-family:&quot;OpenAI Sans&quot;,sans-serif;font-s=
ize:17px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:=
normal;font-weight:400;letter-spacing:-0.17px;text-align:start;text-indent:=
0px;text-transform:none;word-spacing:0px;white-space:normal;background-colo=
r:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:init=
ial"><span>=C2=A0</span>embedding can be shortened to a size of 256 while s=
till outperforming an unshortened<span>=C2=A0</span></span><code style=3D"b=
ox-sizing:border-box;border:0px solid rgb(229,231,235);margin:0px;padding:0=
px;font-family:&quot;SF Mono&quot;,Consolas,&quot;Liberation Mono&quot;,ui-=
monospace,monospace;font-feature-settings:normal;font-size:0.875em;color:rg=
b(0,0,0);border-radius:4px;font-weight:400;font-style:normal;font-variant-l=
igatures:normal;font-variant-caps:normal;letter-spacing:-0.17px;text-align:=
start;text-indent:0px;text-transform:none;word-spacing:0px;white-space:norm=
al;text-decoration-style:initial;text-decoration-color:initial"><span style=
=3D"box-sizing:border-box;border:0px solid rgb(229,231,235);margin:0px;padd=
ing:0px">text-embedding-ada-002</span></code><span style=3D"box-sizing:bord=
er-box;border:0px solid rgb(229,231,235);margin:0px;padding:0px;color:rgb(0=
,0,0);font-family:&quot;OpenAI Sans&quot;,sans-serif;font-size:17px;font-st=
yle:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weig=
ht:400;letter-spacing:-0.17px;text-align:start;text-indent:0px;text-transfo=
rm:none;word-spacing:0px;white-space:normal;background-color:rgb(255,255,25=
5);text-decoration-style:initial;text-decoration-color:initial"><span>=C2=
=A0</span>embedding with a size of 1536.</span></div>It&#39;s about Matryos=
hka Representation Learning (MRL) </div><br><div class=3D"gmail_quote gmail=
_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Tue, May 23, 202=
3 at 12:27=E2=80=AFPM Alessandro Benedetti &lt;<a href=3D"mailto:a.benedett=
[email protected]">[email protected]</a>&gt; wrote:<br></div><blockquote class=
=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rg=
b(204,204,204);padding-left:1ex"><div dir=3D"ltr">Closing the poll after on=
e week, these are the results:<div><br></div><div><div>Option 2-4: 9 votes<=
/div><div>make the limit configurable, potentially moving the limit to the =
appropriate place</div><div><br></div><div>Option 3: 5 votes</div><div><div=
>keep it as it is (1024) but move it lower level in HNSW-specific implement=
ation</div><div><br></div><div><div>Option 1: 0 votes</div><div>keep it as =
it is (1024)</div></div></div><div><br></div><div>-----</div><div>I was exp=
ecting more people to express their preferences, unfortunately, many digres=
sed to discussions without expressing any.</div><div>Given that, it seems c=
lear that we want one of the most voted options, so let&#39;s continue the =
discussions under the related Pull Requests and then proceed to merges when=
 agreement if found!</div><div><br></div><div>Thanks to everyone involved!<=
/div><div><br></div><div><br></div><div><div dir=3D"ltr" class=3D"gmail_sig=
nature"><div dir=3D"ltr"><div dir=3D"ltr"><div><span style=3D"font-size:12.=
8px">--------------------------</span><br><b style=3D"font-size:12.8px;colo=
r:rgb(34,34,34)">Alessandro Benedetti</b></div><div><span style=3D"font-siz=
e:12.8px;color:rgb(34,34,34)">Director @ Sease Ltd.</span></div><div><div><=
i>Apache Lucene/Solr Committer</i></div><div><i>Apache Solr PMC Member</i><=
/div></div><div><br></div><div><span style=3D"font-size:small;color:rgb(34,=
34,34)">e-mail: <a href=3D"mailto:[email protected]" target=3D"_blank">a=
[email protected]</a></span><i style=3D"font-size:12.8px;color:rgb(34,34,=
34)"><br></i><br style=3D"color:rgb(34,34,34)"><div style=3D"font-size:12.8=
px;color:rgb(34,34,34)"><img src=3D"https://drive.google.com/uc?id=3D1fe4RK=
YGn2YotOey-JRREllVsWiGmh9BO&amp;export=3Ddownload" width=3D"200" height=3D"=
81"><br><b>Sease</b>=C2=A0- Information Retrieval Applied<br>Consulting | T=
raining | Open Source<br><br>Website:=C2=A0<a href=3D"http://sease.io/" sty=
le=3D"color:rgb(17,85,204)" target=3D"_blank">Sease.io</a><br><a href=3D"ht=
tps://linkedin.com/company/sease-ltd" style=3D"color:rgb(17,85,204)" target=
=3D"_blank">LinkedIn</a>=C2=A0|=C2=A0<a href=3D"https://twitter.com/seaselt=
d" style=3D"color:rgb(17,85,204)" target=3D"_blank">Twitter</a>=C2=A0|=C2=
=A0<a href=3D"https://www.youtube.com/channel/UCDx86ZKLYNpI3gzMercM7BQ" sty=
le=3D"color:rgb(17,85,204)" target=3D"_blank">Youtube</a>=C2=A0|=C2=A0<a hr=
ef=3D"https://github.com/seaseltd" style=3D"color:rgb(17,85,204)" target=3D=
"_blank">Github</a></div></div></div></div></div></div><br></div></div><br>=
<div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Mon, 22=
 May 2023 at 09:17, Bruno Roustant &lt;<a href=3D"mailto:bruno.roustant@gma=
il.com" target=3D"_blank">[email protected]</a>&gt; wrote:<br></div>=
<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div dir=
=3D"ltr">I vote for option 3.<br>Then with a follow up work to have a simpl=
e extension codec in the &quot;codecs&quot; package which=C2=A0is<br>1- not=
 backward compatible, and 2- has a higher or configurable limit. That way u=
sers can directly use this codec without any additional code.</div></div>
</blockquote></div>
</blockquote></div><div><br clear=3D"all"></div><br><span class=3D"gmail_si=
gnature_prefix">-- </span><br><div dir=3D"ltr" class=3D"gmail_signature"><d=
iv dir=3D"ltr">Sincerely yours<br>Mikhail Khludnev<br></div></div>

--000000000000d889f50651c85d23--