Skip to content

docs: 4-bit rotational quantization (preview, 1.39) - #527

Merged
g-despot merged 7 commits into
mainfrom
v1-39/main
Aug 27, 2026
Merged

docs: 4-bit rotational quantization (preview, 1.39)#527
g-despot merged 7 commits into
mainfrom
v1-39/main

Conversation

@g-despot

Copy link
Copy Markdown
Contributor

Brings the 4-bit RQ docs from v1-39/main into main. The work merged as #509 but landed on the release branch instead of main, 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#.

g-despot and others added 7 commits August 12, 2026 13:50
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)

@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

@g-despot
g-despot merged commit 1ea05ab into main Aug 27, 2026
13 checks passed
@g-despot
g-despot deleted the v1-39/main branch August 27, 2026 09:45
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.

1 participant