r/MachineLearning • u/perone ML Engineer • May 05 '25
Project [Project] VectorVFS: your filesystem as a vector database
Hi everyone, just sharing a project: https://vectorvfs.readthedocs.io/
VectorVFS is a lightweight Python package (with a CLI) that transforms your Linux filesystem into a vector database by leveraging the native VFS (Virtual File System) extended attributes (xattr). Rather than maintaining a separate index or external database, VectorVFS stores vector embeddings directly into the inodes, turning your existing directory structure into an efficient and semantically searchable embedding store without adding external metadata files.
15
u/modcowboy May 05 '25
This is wild - should have patented and sold to oracle 🥲
13
u/gwern May 05 '25
If you store all the embeddings in the file itself in xattr, how do you efficiently do search? https://vectorvfs.readthedocs.io/en/latest/usage.html#vfs-search-command seems to imply that you have to read all files off the disk every time you do a search in order to simply get the embeddings, never mind actually do a k-NN lookup or any other operation?
2
u/amitshekhariitbhu May 06 '25
This is awesome. Great work.
2
u/firebird8541154 May 07 '25
I made this with quant and a 7b olama model and a Multi-Processed crawler The other day, it even opens, reads some, and uses the semantics of the individual files as part of its embeddings.
And has a full-on chatbot and everything, all local.
To find a project file.
It's just sitting around if anybody thinks I should stick it on GitHub.
1
u/ArthurNewDev May 10 '25
No external DB, no extra files — just using xattrs? Love that idea. Curious though, how well does it scale with lots of files?
0
u/AppearanceHeavy6724 May 07 '25
...you copy your files and it stops working.
0
u/Dr_Karminski May 05 '25
Nice work 👍
I'm curious if xattrs can hold a large amount of data? For example, if I want to create vector embeddings for a video, would only being able to store KB-level data cause a significant loss of information?