quantization

package
v0.2.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2026 License: Unlicense Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	QuantizationError = promauto.NewGaugeVec(prometheus.GaugeOpts{
		Name: "longbow_quantization_error_mse",
		Help: "Mean Squared Error of current quantization bit-depth",
	}, []string{"dataset", "bits"})

	CompressionRatio = promauto.NewGaugeVec(prometheus.GaugeOpts{
		Name: "longbow_compression_ratio",
		Help: "Compression ratio achieved by Turboquant V2",
	}, []string{"dataset"})
)

Functions

This section is empty.

Types

type BitWidthPredictor

type BitWidthPredictor struct {
	// contains filtered or unexported fields
}

BitWidthPredictor estimates the optimal bit-depth for a vector dataset

func NewBitWidthPredictor

func NewBitWidthPredictor(sampleSize int) *BitWidthPredictor

func (*BitWidthPredictor) Predict

func (p *BitWidthPredictor) Predict(vectors [][]float32) int

Predict determines if a vector batch should use 1, 2, 4, or 8 bits based on the variance of a randomly projected sample.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL