FP32 (Baseline)
fp32 stores every coordinate as a 32-bit IEEE-754 float — the same layout
as the input vectors. It is the only fully lossless option in VSAG and
serves as the reference baseline that all other quantizers are compared
against.
Implementation:
src/quantization/fp32_quantizer.cpp, parameter filefp32_quantizer_parameter.cpp.
When to use it
- Reorder / precise store.
precise_quantization_type: "fp32"is the default precise store whenuse_reorder: true; the graph walk uses a cheap base quantizer and the top-K candidates are re-scored exactly against the fp32 copy. - Reference / ground truth. Building an index with
base_quantization_type: "fp32"gives the highest possible recall for that index type and is the standard baseline for benchmarking other quantizers (docs/docs/en/src/resources/eval.md). - Small datasets where memory is not the bottleneck.
- BruteForce with raw-vector retrieval.
SUPPORT_GET_RAW_VECTOR_BY_IDSis only advertised whenbase_quantization_typeisfp32and the metric allows it (src/index/brute_force.cpp).
Memory cost
4 × dim bytes per vector for the codes alone. When fp32 is used as a
precise store on top of a base quantizer, the per-vector cost is
base codes + 4 × dim.
Parameters
fp32 has no quantizer-specific JSON parameters.
{
"dtype": "float32",
"metric_type": "l2",
"dim": 128,
"index_param": {
"base_quantization_type": "fp32",
"max_degree": 32,
"ef_construction": 300
}
}
Training
Not required. fp32 does not set NEED_TRAIN.
Metric compatibility
l2, ip, cosine — all supported with no special handling.
Related pages
- Quantization overview
- HGraph index — see
precise_quantization_type - Memory Management