MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / cold_to_hot

Function cold_to_hot

nodedb-codec/src/vector_quant/ternary/packing.rs:100–103  ·  view source on GitHub ↗

Convert cold-packed trits to hot-packed trits.

(cold: &[u8], dim: usize)

Source from the content-addressed store, hash-verified

98
99/// Convert cold-packed trits to hot-packed trits.
100pub fn cold_to_hot(cold: &[u8], dim: usize) -> Vec<u8> {
101 let trits = unpack_cold(cold, dim);
102 pack_hot(&trits)
103}
104
105/// Quantize a FP32 vector to ternary trits using BitNet absmean scaling.
106///

Callers 3

ensure_hotFunction · 0.85

Calls 2

unpack_coldFunction · 0.85
pack_hotFunction · 0.85

Tested by 2