![]() |
Signet Forge 0.1.0
C++20 Parquet library with AI-native extensions
|
DEMO |
Dequantizes INT8/INT4 quantized vectors back to float32. More...
#include <quantized_vector.hpp>
Public Member Functions | |
| Dequantizer (QuantizationParams params) | |
| Construct a dequantizer with the given parameters. | |
| void | dequantize (const uint8_t *input, float *output) const |
| Dequantize a single quantized vector to float32. | |
| std::vector< std::vector< float > > | dequantize_batch (const uint8_t *input, size_t num_vectors) const |
| Dequantize a batch of vectors, returning a vector-of-vectors. | |
| std::vector< float > | dequantize_flat (const uint8_t *input, size_t num_vectors) const |
| Flat batch dequantize: returns all floats in one contiguous buffer. | |
| const QuantizationParams & | params () const |
| Access the quantization parameters. | |
| uint64_t | anomaly_count () const |
| EU AI Act Art.12 anomaly tracking: number of dequantized values that fell outside the representable quantization range and were clamped. | |
Dequantizes INT8/INT4 quantized vectors back to float32.
Uses SIMD acceleration (AVX2, SSE2, or NEON) when available, with a scalar fallback.
Definition at line 198 of file quantized_vector.hpp.
|
inlineexplicit |
Construct a dequantizer with the given parameters.
Definition at line 201 of file quantized_vector.hpp.
|
inline |
EU AI Act Art.12 anomaly tracking: number of dequantized values that fell outside the representable quantization range and were clamped.
Definition at line 231 of file quantized_vector.hpp.
|
inline |
Dequantize a single quantized vector to float32.
| input | Pointer to bytes_per_vector() quantized bytes. |
| output | Destination buffer; must hold at least dim floats. |
Definition at line 1172 of file quantized_vector.hpp.
|
inline |
Dequantize a batch of vectors, returning a vector-of-vectors.
| input | Pointer to num_vectors * bytes_per_vector() quantized bytes. |
| num_vectors | Number of vectors to dequantize. |
dim. Definition at line 1206 of file quantized_vector.hpp.
|
inline |
Flat batch dequantize: returns all floats in one contiguous buffer.
| input | Pointer to num_vectors * bytes_per_vector() quantized bytes. |
| num_vectors | Number of vectors to dequantize. |
num_vectors * dim. Definition at line 1222 of file quantized_vector.hpp.
|
inline |
Access the quantization parameters.
Definition at line 227 of file quantized_vector.hpp.