Add PhpVectorStore — zero-dependency local vector store#519
Open
MauricioPerera wants to merge 1 commit intoneuron-core:3.xfrom
Open
Add PhpVectorStore — zero-dependency local vector store#519MauricioPerera wants to merge 1 commit intoneuron-core:3.xfrom
MauricioPerera wants to merge 1 commit intoneuron-core:3.xfrom
Conversation
Pure PHP vector store using binary Float32/Int8 storage with Matryoshka
multi-stage search. No external services, no C extensions, no SQLite.
- Int8 quantization: 392 bytes per 384d vector (4x compression)
- Matryoshka search: 3-5x faster via 128d→256d→384d progressive stages
- Binary .bin + .json files (no database needed)
- 100% recall on real embeddings (benchmarked with EmbeddingGemma-300m)
- Scales to ~500K vectors on 512MB RAM
Usage:
protected function vectorStore(): VectorStoreInterface {
return new PhpVectorStore(__DIR__ . '/vectors', dimensions: 384);
}
Requires: composer require mauricioperera/php-vector-store
See: https://github.com/MauricioPerera/php-vector-store
Contributor
|
I think this should be a dedicated composer package published on https://neuronhub.dev so we can also share it with the community using our communication channels. Or since the Neuron integration requires no more than one class, you could include it in the default lib in a dedicated namespace, adding Neuron ^2|^3 as a dev and suggested dependency. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
PhpVectorStoreas a newVectorStoreInterfaceimplementation — the first zero-dependency local vector store option for Neuron AI.Uses php-vector-store, a pure PHP vector database with:
Why
All current vector store implementations require either external services (Pinecone, Qdrant, Chroma, Elasticsearch) or are ephemeral (MemoryVectorStore). PhpVectorStore fills the gap: persistent, local, zero-config.
Usage
Installation
Test plan
addDocument/addDocumentsstore vectors to disksimilaritySearchreturns Documents with correct scoresdeleteByfilters by sourceType/sourceName🤖 Generated with Claude Code