You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been prototyping an optional exact late-interaction reranking path for
VectorChord. The goal is to let PostgreSQL/vchordrq generate and govern a
candidate set while a pluggable backend computes exact MaxSim over full
multi-vector tensors. A CUDA sidecar and quantized tensor representations are
possible implementations, but neither would be required by the core extension.
Before opening implementation PRs, I would like feedback on whether the
maintainers consider these extension points compatible with VectorChord's
scope.
Motivation
The existing multi-vector index is effective for candidate generation, but
some applications also retain the original per-token tensor and want an exact
late-interaction score:
score(q, d) = sum over query tokens i of max over document tokens j dot(q_i, d_j)
Keeping candidate generation in PostgreSQL preserves filters, MVCC-visible
identities, and the existing index path. Keeping exact scoring behind a small
backend interface allows a CPU implementation, an external accelerator, or no
reranking at all without changing default behavior.
Prior work and attribution
The GPU scoring direction and the TileMaxSim name in this prototype are based on and inspired by Ashutosh Sharma’s ashutoshuiuc/tilemaxsim work, including its IO-aware tiled MaxSim formulation, dimension tiling, and fused product-quantized scoring.
This RFC does not claim those core GPU scoring ideas as original contributions. The work proposed here focuses on integrating this scoring model with VectorChord/PostgreSQL: a versioned backend boundary, external tensor metadata, bounded GPU/host/disk cache tiers, cache admission and eviction, multi-user fairness and priority scheduling, database-visible candidate binding, operational failure handling, and additional quantized kernel/runtime experiments.
The current Rust/CUDA implementation is an independent systems implementation and does not vendor the upstream Triton repository. The upstream repository currently does not publish a license file, so no upstream source code should be copied or adapted without explicit permission; any future reuse must also retain all applicable copyright and license notices.
Proposed boundaries
Planner statistics and cost model
Track indexed token counts without changing tuple layout compatibility.
Estimate candidate generation and optional exact reranking separately.
Keep all non-MaxSim opfamilies on the current upstream cost path.
Pluggable exact reranking interface
A narrow internal trait consumes the query tensor and explicit candidate
identities.
A CPU reference backend defines correctness and fallback behavior.
Existing behavior remains the default.
Optional external tensor source
PostgreSQL stores governed metadata and immutable content references, not
arbitrary accelerator state.
The request always contains an explicit candidate set; the scorer does not
perform an implicit full-corpus search.
Versioned framing, bounded request sizes, timeouts, and fail-closed
descriptor validation.
Optional GPU sidecar
Separate Rust/CUDA service and build target.
No CUDA dependency in the default extension build.
Bounded GPU/host caches, observable scheduling, and explicit fallback.
Optional scoring representations
Exact FP16 first; INT8/FP8 and PQ/OPQ/residual-PQ only as later backends.
A request binds an immutable quantization contract.
Quantization changes scoring precision only; it does not silently prune
the candidate set.
Non-goals
Tenant authorization inside the scoring daemon. Authorization remains an
application/database concern; scheduler tenant IDs are resource hints only.
Replacing vchordrq candidate generation.
Requiring a GPU for normal VectorChord use.
Making external storage or a particular model part of the core API.
Compatibility and failure behavior
Default GUCs preserve the current upstream path.
External protocols are explicitly versioned.
Candidate and byte limits are enforced before allocation.
Missing, inactive, mismatched, or corrupted tensor/quantization artifacts
fail explicitly.
CPU fallback is opt-in and never presented as equivalent precision when it
is not.
SQL upgrades preserve old metadata and treat absent new statistics as
unknown rather than invalid.
Validation performed in the prototype
PostgreSQL 16 release extension build from a clean container.
Unit tests for planner estimates, descriptor validation, protocol versions,
cache admission, fairness/priority scheduling, artifact activation and
rollback.
Real CUDA comparisons against CPU oracles for exact FP16, INT8, FP8, PQ,
OPQ rotation, and multi-stage residual PQ.
Tests for small-cache eviction, bounded batching, concurrent scheduling, and
content-addressed artifact integrity.
The current full prototype is available on the integration/upstream-main-tilemaxsim-v2
branch. It is intentionally not proposed as one PR: it is too broad and
also contains fork-specific documentation, packaging, benchmarks, and release
configuration.
Proposed upstream PR sequence
Planner statistics/cost model only.
Pluggable exact reranking trait plus CPU reference backend.
External tensor source registry and stable bounded protocol.
Optional GPU sidecar, if the external boundary is accepted.
Quantized GPU profiles, if the sidecar is accepted.
Each PR would be based independently on the latest upstream main, retain the
upstream CLA/workflows/README/release ownership, and include focused tests.
Questions for maintainers
Is exact reranking over an explicit vchordrq candidate set within the
intended scope of VectorChord?
Would you prefer the backend interface to remain internal initially, or be
exposed as a versioned extension API?
Is an optional external tensor descriptor registry acceptable, or should
tensor storage remain entirely outside the extension?
If a CUDA implementation is acceptable, should it live in this repository,
a separate repository, or only as a protocol-compatible example?
Would you like the first PR to contain only planner statistics, or planner
statistics plus the CPU correctness backend?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Summary
I have been prototyping an optional exact late-interaction reranking path for
VectorChord. The goal is to let PostgreSQL/
vchordrqgenerate and govern acandidate set while a pluggable backend computes exact MaxSim over full
multi-vector tensors. A CUDA sidecar and quantized tensor representations are
possible implementations, but neither would be required by the core extension.
Before opening implementation PRs, I would like feedback on whether the
maintainers consider these extension points compatible with VectorChord's
scope.
Motivation
The existing multi-vector index is effective for candidate generation, but
some applications also retain the original per-token tensor and want an exact
late-interaction score:
Keeping candidate generation in PostgreSQL preserves filters, MVCC-visible
identities, and the existing index path. Keeping exact scoring behind a small
backend interface allows a CPU implementation, an external accelerator, or no
reranking at all without changing default behavior.
Prior work and attribution
The GPU scoring direction and the
TileMaxSimname in this prototype are based on and inspired by Ashutosh Sharma’s ashutoshuiuc/tilemaxsim work, including its IO-aware tiled MaxSim formulation, dimension tiling, and fused product-quantized scoring.This RFC does not claim those core GPU scoring ideas as original contributions. The work proposed here focuses on integrating this scoring model with VectorChord/PostgreSQL: a versioned backend boundary, external tensor metadata, bounded GPU/host/disk cache tiers, cache admission and eviction, multi-user fairness and priority scheduling, database-visible candidate binding, operational failure handling, and additional quantized kernel/runtime experiments.
The current Rust/CUDA implementation is an independent systems implementation and does not vendor the upstream Triton repository. The upstream repository currently does not publish a license file, so no upstream source code should be copied or adapted without explicit permission; any future reuse must also retain all applicable copyright and license notices.
Proposed boundaries
Planner statistics and cost model
Pluggable exact reranking interface
identities.
Optional external tensor source
arbitrary accelerator state.
perform an implicit full-corpus search.
descriptor validation.
Optional GPU sidecar
Optional scoring representations
the candidate set.
Non-goals
application/database concern; scheduler tenant IDs are resource hints only.
vchordrqcandidate generation.Compatibility and failure behavior
fail explicitly.
is not.
unknown rather than invalid.
Validation performed in the prototype
cache admission, fairness/priority scheduling, artifact activation and
rollback.
OPQ rotation, and multi-stage residual PQ.
content-addressed artifact integrity.
The current full prototype is available on the
integration/upstream-main-tilemaxsim-v2branch. It is intentionally not proposed as one PR: it is too broad and
also contains fork-specific documentation, packaging, benchmarks, and release
configuration.
Proposed upstream PR sequence
Each PR would be based independently on the latest upstream
main, retain theupstream CLA/workflows/README/release ownership, and include focused tests.
Questions for maintainers
vchordrqcandidate set within theintended scope of VectorChord?
exposed as a versioned extension API?
tensor storage remain entirely outside the extension?
a separate repository, or only as a protocol-compatible example?
statistics plus the CPU correctness backend?
All reactions