Skip to content

feat(vectorIndex): add centered RQ4 quantization support - #468

Open
OsamaAnsar wants to merge 2 commits into
weaviate:mainfrom
OsamaAnsar:feature/rq4-centered-quantization
Open

OsamaAnsar wants to merge 2 commits into
weaviate:mainfrom
OsamaAnsar:feature/rq4-centered-quantization

Conversation

@OsamaAnsar

Copy link
Copy Markdown
Contributor

Closes #467

Adds centering?: boolean and trainingLimit?: number to the RQ quantizer config, for both configure.vectorIndex.quantizer.rq() (create) and reconfigure.vectorIndex.quantizer.rq() (update).

Field shape

Cross-referenced the already-merged Python client implementation (weaviate-python-client#2148) for the exact fields, since the linked server PR (weaviate/weaviate#12502) doesn't expose the REST schema naming directly in its diff. trainingLimit matches the naming convention this client already uses for PQ/SQ quantizers.

Why this was low-risk

RQ quantizer config is a plain hand-written TS type (RQConfig) sent through the REST schema API, not a gRPC message — so no protobuf regeneration was needed, unlike some other "add support for X" issues in this repo where the client-side type can't be safely added until the server's proto is vendored in.

Testing

  • Added dedicated unit tests for both the create and reconfigure rq() builders covering all fields including the two new ones.
  • tsc --noEmit: clean.
  • vitest run src/collections/configure/unit.test.ts: 138/138 passing.

Adds optional centering and trainingLimit fields to the RQ
quantizer config (create + reconfigure), matching the shape
already merged in weaviate-python-client#2148. No wire/proto
changes needed since RQ config is a plain hand-written TS type
sent via the REST schema API.

@orca-security-eu orca-security-eu Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

@weaviate-git-bot

Copy link
Copy Markdown

To avoid any confusion in the future about your contribution to Weaviate, we work with a Contributor License Agreement. If you agree, you can simply add a comment to this PR that you agree with the CLA so that we can merge.

beep boop - the Weaviate bot 👋🤖

PS:
Are you already a member of the Weaviate Forum?

@OsamaAnsar

Copy link
Copy Markdown
Contributor Author

I agree with the CLA

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Centered RQ4 quantization

2 participants