pub type ClarkHashConfig = SQuaJLConfig;Expand description
Package-level name for the codec configuration.
Aliased Type§
pub struct ClarkHashConfig {
pub input_dim: usize,
pub sketch_dim: usize,
pub bits: u8,
pub hashes_per_input: u8,
pub clip: f32,
pub seed: u64,
pub metric: SimilarityMetric,
pub norm_log2_min: f32,
pub norm_log2_max: f32,
}Fields§
§input_dim: usizeInput embedding dimension.
sketch_dim: usizeOutput sketch dimension.
Larger values usually improve recall at the cost of more memory.
bits: u8Number of bits per quantized coordinate.
Supported range: 1..=8.
hashes_per_input: u8Number of non-zero sketch updates per input coordinate.
Larger values reduce projection noise but cost more CPU at encode time.
clip: f32Symmetric clip range for the scaled sketch.
Coordinates are clipped to [-clip, clip] before scalar quantization.
seed: u64Global seed used to derive sparse bucket locations and signs.
metric: SimilarityMetricSimilarity objective for scoring.
norm_log2_min: f32Lower bound for log2(norm) when the norm channel is enabled.
norm_log2_max: f32Upper bound for log2(norm) when the norm channel is enabled.