Package com.spotify.voyager.jni
Enum Index.StorageDataType
- All Implemented Interfaces:
Serializable
,Comparable<Index.StorageDataType>
- Enclosing class:
- Index
The datatype used to use when storing vectors on disk. Affects both precision and memory usage.
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic Index.StorageDataType
Returns the enum constant of this type with the specified name.static Index.StorageDataType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
Float8
An 8-bit floating point data type that expects all values to be on [-1, 1]. This data type provides adequate precision for many use cases, but cuts down memory usage bu a factor of 4x compared to Float32, while also increasing query speed.Float8 provides 8 bits of resolution; i.e.: the distance between successive values is 1/127, or 0.00787. For a variable-precision (i.e.: _actually_ floating point) representation, use E4M3.
-
Float32
A 32-bit floating point ("Float") data type. The default. -
E4M3
A custom 8-bit floating point data type with range [-448, 448] and variable precision. Use this data type to get 4x less memory usage compared to Float32, but when the values of vectors to be stored in an Index may exceed [-1, 1].E4M3 uses a 4-bit exponent and 3-bit mantissa field, and was inspired by the paper "FP8 Formats for Deep Learning" by Micikevicus et al (arXiv:2209.05433).
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-