Signet Forge 0.1.0
C++20 Parquet library with AI-native extensions
DEMO
Loading...
Searching...
No Matches
signet::forge::Dequantizer Class Reference

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 QuantizationParamsparams () 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.
 

Detailed Description

Dequantizes INT8/INT4 quantized vectors back to float32.

Uses SIMD acceleration (AVX2, SSE2, or NEON) when available, with a scalar fallback.

See also
QuantizationParams, Quantizer

Definition at line 198 of file quantized_vector.hpp.

Constructor & Destructor Documentation

◆ Dequantizer()

signet::forge::Dequantizer::Dequantizer ( QuantizationParams  params)
inlineexplicit

Construct a dequantizer with the given parameters.

Definition at line 201 of file quantized_vector.hpp.

Member Function Documentation

◆ anomaly_count()

uint64_t signet::forge::Dequantizer::anomaly_count ( ) const
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.

◆ dequantize()

void signet::forge::Dequantizer::dequantize ( const uint8_t *  input,
float *  output 
) const
inline

Dequantize a single quantized vector to float32.

Parameters
inputPointer to bytes_per_vector() quantized bytes.
outputDestination buffer; must hold at least dim floats.

Definition at line 1172 of file quantized_vector.hpp.

◆ dequantize_batch()

std::vector< std::vector< float > > signet::forge::Dequantizer::dequantize_batch ( const uint8_t *  input,
size_t  num_vectors 
) const
inline

Dequantize a batch of vectors, returning a vector-of-vectors.

Parameters
inputPointer to num_vectors * bytes_per_vector() quantized bytes.
num_vectorsNumber of vectors to dequantize.
Returns
A vector of float vectors, each of size dim.

Definition at line 1206 of file quantized_vector.hpp.

◆ dequantize_flat()

std::vector< float > signet::forge::Dequantizer::dequantize_flat ( const uint8_t *  input,
size_t  num_vectors 
) const
inline

Flat batch dequantize: returns all floats in one contiguous buffer.

Parameters
inputPointer to num_vectors * bytes_per_vector() quantized bytes.
num_vectorsNumber of vectors to dequantize.
Returns
A flat float buffer of size num_vectors * dim.

Definition at line 1222 of file quantized_vector.hpp.

◆ params()

const QuantizationParams & signet::forge::Dequantizer::params ( ) const
inline

Access the quantization parameters.

Definition at line 227 of file quantized_vector.hpp.


The documentation for this class was generated from the following file: