Exact binary vector search for RAG in 100 lines of Julia
1–10 of 25 posts
Re: Exact binary vector search for RAG in 100 lines of Julia
#2 for i in 0:7
c += (r >> i) & 1
end
This is just popcnt, surely Julia has a built in for that.Re: Exact binary vector search for RAG in 100 lines of Julia
#3for i in 0:7 c += (r >> i) & 1 end This is just popcnt, surely Julia has a built in for that.
Re: Exact binary vector search for RAG in 100 lines of Julia
#4for i in 0:7 c += (r >> i) & 1 end This is just popcnt, surely Julia has a built in for that.
From what I've heard it's actually faster to create a 256 byte lookup table than to use popcnt.
Re: Exact binary vector search for RAG in 100 lines of Julia
#5Re: Exact binary vector search for RAG in 100 lines of Julia
#6Re: Exact binary vector search for RAG in 100 lines of Julia
#7for i in 0:7 c += (r >> i) & 1 end This is just popcnt, surely Julia has a built in for that.
Re: Exact binary vector search for RAG in 100 lines of Julia
#8I'm not sure what is meant by "exact" here - do they describe their binarisation process at all? This seems more like an XOR benchmark than a rag benchmark, no mention of recall or other relevant performance metrics
Re: Exact binary vector search for RAG in 100 lines of Julia
#9RAG = Retrieval-Augmented Generation
The field is machine learning. Retrieval = get relevant documents. Generation = create answer for user (based on the docs).
Re: Exact binary vector search for RAG in 100 lines of Julia
#10for i in 0:7 c += (r >> i) & 1 end This is just popcnt, surely Julia has a built in for that.
Thanks! With this the timings are even faster. I'll update the post.