docs: 4-bit rotational quantization (preview, 1.39) - #527
Merged
Conversation
Completes the 1.39 4-bit RQ page: the Go, Java and C# tabs of the "Enable compression for new collection" and "Enable compression for existing collection" sections under 4-bit RQ now have real snippets, matching the Python and TypeScript examples already in place. - Go, C#: set bits to 4 and raise the rescore limit to 50. Both clients put the rescore limit on the wire under the name the server reads. - Java: sets bits to 4 only. The Java client serialises the rescore limit under a name the server ignores, so an example that set it would not do anything (tracked separately). - No flat-index example at 4 bits: the flat index rejects it. Also removes the Java rescore caveat include and its usage from the page. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Verifier findings on the 4-bit RQ branch. - Starter guide claimed "8-bit and 1-bit RQ work with every index type in the table". False for the HFresh column: hfresh accepts 1-bit only (entities/vectorindex/hfresh/config.go:142-144 at v1.39.0). Restate the support per index type: hnsw 8/4/1, flat 8/1, hfresh 1 only, dynamic per side. - The shared RQ parameters include named only the flat restriction, so a reader on the vector index reference (where it renders directly below the HFresh section) was told 8, 4 and 1 are all valid for HFresh. Name all three index types. Also state the fixed 1-bit width on the HFresh rq row. - Remove the TypeScript tab from the 4-bit "existing collection" example. It rendered an empty code block because the TS client's reconfigure path takes no bits value. The swizzled Tabs component now shows the honest "not yet available" message instead. - Rename the Go marker UpdateSchemaToEnableRQ to 8BitUpdateSchema so no marker name is a prefix of another, since FilteredTextBlock matches markers by substring. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…unt example Review feedback on PR #509. - Replace the "4-bit RQ limitations" subsection with a short note under "## 4-bit RQ" carrying the hnsw-only constraint. The per-index bit widths and the immutability of `bits` are already documented in the RQ parameters table and the compression starter guide. - Keep the RQ distance metric support statement by moving it into the "RQ parameters" section; it applies to all RQ variants, not just 4-bit. - Remove the 1536-dimensional byte-count example from the RQ characteristics section of the vector quantization concepts page. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The "RQ comes in three bit widths" paragraph linked only the 4-bit mention. Link the first 8-bit and 1-bit mentions to the matching headings on the RQ compression reference page, using the same absolute path form as the existing 4-bit link. Later mentions of each width stay unlinked, following the first-mention convention. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
… headroom Two review findings from PR #509. The compression starter-guide include claimed 98-99% recall "without any configuration" for RQ as a whole. That is an 8-bit figure. This branch extended the include to cover 4-bit, which inherits rescoreLimit 20 and does not reach that recall at its defaults. Scope the claim to 8-bit and point the narrower widths at the rescore guidance. The same broadening had reached three neighbouring claims on the host page (memory saving, the typical-recall list, and "RQ can run without rescoring"), so scope those too. The 4-bit rescoreLimit guidance said "at least the largest query limit", which permits rescoreLimit == limit. At v1.39.0 the HNSW rescore path truncates the candidate pool to rescoreLimit when rescoreLimit >= k, so that setting rescores exactly as many candidates as it returns: it can reorder the results but cannot recover a neighbour the compressed distances dropped. A query with limit 20 against the 4-bit default of 20 lands on that zero-headroom case. Require a value strictly greater than the largest query limit, give ef as the ceiling, and keep the warning that 0 disables rescoring. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Review response to #509. The docs no longer tell readers to raise or explicitly set rescoreLimit: the caution advising a higher value is gone, along with the sentences instructing an explicit setting and warning against disabling rescoring for the narrower widths. The 4-bit examples now set the parameter to the server default of 20, matching their 8-bit siblings, and the Go assertions follow. Also corrects the 4-bit introduction, which claimed the variant makes up for its coarser distances by rescoring more candidates. Both 4-bit and 8-bit default to a rescore limit of 20, so that only holds if the reader raises it, which the docs no longer ask for.
docs: 4-bit rotational quantization (preview, 1.39)
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
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.
Brings the 4-bit RQ docs from
v1-39/mainintomain. The work merged as #509 but landed on the release branch instead ofmain, so none of it is published.Covers the concepts page, the compression config page, RQ parameters,
DEFAULT_QUANTIZATION, the starter guide, and enable-RQ examples for Python, TypeScript, Go, Java and C#.