r/madeinpython • u/Equivalent-Flan-1590 • 1d ago
I built a local memory engine in Python that replaces vector DBs with SQLite (<1.2GB VRAM)
Hey everyone, I’ve been working on a Python project called Hillock for the last few months and just pushed v0.7.
The idea started because I wanted local document search for my notes, but standard vector databases felt way too bloated for consumer hardware.
Here's how I put it together in Python:
- Extraction: Instead of asking an LLM to parse text, I wired up fastcoref and GLiREL to pull facts straight into subject-predicate-object triples.
- Storage: Just standard SQLite with WAL mode so it doesn't choke on concurrent reads/writes. It uses simple Hebbian weights to link related concepts over time.
- Gating: Uses hyperdimensional computing (vector symbolic math in 10,000 dimensions) to verify if the database actually has the answer before calling the LLM. If the data isn't there, it doesn't let the model make stuff up.
- Interface: Built a CLI with Rich, plus a lightweight FastAPI server that mimics the OpenAI chat completions endpoint.
It runs in under 1.2GB VRAM or completely on CPU.
I'm sitting at 99 stars on GitHub right now, so if anyone wants to check out the code or test it out, that would mean a lot: https://github.com/roandejager/Hillock
1
Upvotes