Skip to content

Commit 233d94d

Browse files
committed
dequantize
Signed-off-by: usamoi <usamoi@outlook.com>
1 parent b53211c commit 233d94d

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

src/vectorchord/usage/quantization-types.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,26 @@ Refer to
6666
- `SELECT quantize_to_rabitq8('[1,1,1]'::halfvec)`
6767
- Note: This function does not have a corresponding `CAST`. If you really need one, you can create it by `CREATE CAST (halfvec AS rabitq8) WITH FUNCTION quantize_to_rabitq8(halfvec) AS ASSIGNMENT`.
6868

69+
#### `dequantize_to_vector(rabitq8)` <badge type="tip" text="since v1.1.1" />
70+
71+
- Description: Dequantize a quantized vector to `vector`. This function may produce different outputs for the same input with different versions of VectorChord or with different machines. The original vector cannot be precisely reconstructed using this function.
72+
- Result: `vector`, the dequantized vector
73+
- Arguments:
74+
- `rabitq8`, the quantized vector to be dequantized
75+
- Example:
76+
- `SELECT dequantize_to_vector(quantize_to_rabitq8('[1,1,1]'::vector))`
77+
- Note: This function does not have a corresponding `CAST`. If you really need one, you can create it by `CREATE CAST (rabitq8 AS vector) WITH FUNCTION dequantize_to_vector(rabitq8) AS ASSIGNMENT`.
78+
79+
#### `dequantize_to_halfvec(rabitq8)` <badge type="tip" text="since v1.1.1" />
80+
81+
- Description: Dequantize a quantized vector to `halfvec`. This function may produce different outputs for the same input with different versions of VectorChord or with different machines. The original vector cannot be precisely reconstructed using this function.
82+
- Result: `halfvec`, the dequantized vector
83+
- Arguments:
84+
- `rabitq8`, the quantized vector to be dequantized
85+
- Example:
86+
- `SELECT dequantize_to_halfvec(quantize_to_rabitq8('[1,1,1]'::halfvec))`
87+
- Note: This function does not have a corresponding `CAST`. If you really need one, you can create it by `CREATE CAST (rabitq8 AS halfvec) WITH FUNCTION dequantize_to_halfvec(rabitq8) AS ASSIGNMENT`.
88+
6989
#### `quantize_to_rabitq4(vector)` <badge type="tip" text="since v1.1.0" />
7090

7191
- Description: Quantize a vector to `rabitq4`. This function may produce different outputs for the same input with different versions of VectorChord or with different machines.
@@ -86,6 +106,26 @@ Refer to
86106
- `SELECT quantize_to_rabitq4('[1,1,1]'::halfvec)`
87107
- Note: This function does not have a corresponding `CAST`. If you really need one, you can create it by `CREATE CAST (halfvec AS rabitq4) WITH FUNCTION quantize_to_rabitq4(halfvec) AS ASSIGNMENT`.
88108

109+
#### `dequantize_to_vector(rabitq4)` <badge type="tip" text="since v1.1.1" />
110+
111+
- Description: Dequantize a quantized vector to `vector`. This function may produce different outputs for the same input with different versions of VectorChord or with different machines. The original vector cannot be precisely reconstructed using this function.
112+
- Result: `vector`, the dequantized vector
113+
- Arguments:
114+
- `rabitq4`, the quantized vector to be dequantized
115+
- Example:
116+
- `SELECT dequantize_to_vector(quantize_to_rabitq4('[1,1,1]'::vector))`
117+
- Note: This function does not have a corresponding `CAST`. If you really need one, you can create it by `CREATE CAST (rabitq4 AS vector) WITH FUNCTION dequantize_to_vector(rabitq4) AS ASSIGNMENT`.
118+
119+
#### `dequantize_to_halfvec(rabitq4)` <badge type="tip" text="since v1.1.1" />
120+
121+
- Description: Dequantize a quantized vector to `halfvec`. This function may produce different outputs for the same input with different versions of VectorChord or with different machines. The original vector cannot be precisely reconstructed using this function.
122+
- Result: `halfvec`, the dequantized vector
123+
- Arguments:
124+
- `rabitq4`, the quantized vector to be dequantized
125+
- Example:
126+
- `SELECT dequantize_to_halfvec(quantize_to_rabitq4('[1,1,1]'::halfvec))`
127+
- Note: This function does not have a corresponding `CAST`. If you really need one, you can create it by `CREATE CAST (rabitq4 AS halfvec) WITH FUNCTION dequantize_to_halfvec(rabitq4) AS ASSIGNMENT`.
128+
89129
### Operators
90130

91131
#### `<->(rabitq8, rabitq8)` <badge type="tip" text="since v1.1.0" />

0 commit comments

Comments
 (0)