weaviate/weaviate · error
RQ centering requires bits=4
Error message
RQ centering requires bits=4
What it means
RestoreRQCompressor validates persisted state before rebuilding an RQ compressor at startup or during restore: the stored configuration includes centering data (a non-nil mean) but a bits value other than 4. Centered RQ is only implemented for 4-bit quantization, so the on-disk configuration is internally inconsistent and cannot be restored.
Source
Thrown at adapters/repos/db/vector/compressionhelpers/compression.go:1023
distance distancer.Provider,
vectorCacheMaxObjects int,
logger logrus.FieldLogger,
dimensions int,
bits int,
outputDim int,
rounds int,
swaps [][]compression.Swap,
signs [][]float32,
rounding []float32,
mean []float32,
store *lsmkv.Store,
allocChecker memwatch.AllocChecker,
makeBucketOptions lsmkv.MakeBucketOptions,
targetVector string,
vectorForID common.VectorForID[float32],
) (VectorCompressor, error) {
if mean != nil && bits != 4 {
return nil, errors.New("RQ centering requires bits=4")
}
var rqVectorsCompressor VectorCompressor
switch bits {
case 1:
quantizer, err := RestoreBinaryRotationalQuantizer(dimensions, outputDim, rounds, swaps, signs, rounding, distance)
if err != nil {
return nil, err
}
rqVectorsCompressor = &quantizedVectorsCompressor[uint64]{
quantizer: quantizer,
compressedStore: store,
storeId: binary.BigEndian.PutUint64,
loadId: binary.BigEndian.Uint64,
targetVector: targetVector,
logger: logger,
makeBucketOptions: makeBucketOptions,
vectorForID: vectorForID,
}View on GitHub (pinned to 75aa4b6d11)
Solutions
- Rebuild the index without centering, or with bits=4 if centering is required
- Restore from a backup taken when the configuration was consistent
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at adapters/repos/db/vector/compressionhelpers/compression.go:1023 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of weaviate/weaviate@75aa4b6d11 (2026-09-04).
Data as JSON: /api/errors/5e08c837850b79aa.
Report an issue: GitHub.