ptwm_core::entropy::context_mixing::mixer
ptwm_core::entropy::context_mixing::mixer
Context-gated logistic mixer. One weight vector per gating context (the partial-byte register c0, bounded to 256). Mixes the models' stretched logits, squashes to a probability, and learns the weights online by logistic gradient. Integer/deterministic.
ptwm_core::entropy::context_mixing::mixer
crates/ptwm-core/src/entropy/context_mixing/mixer.rs:1mod mixerContext-gated logistic mixer. One weight vector per gating context (the partial-byte register `c0`, bounded to 256). Mixes the models' stretched logits, squashes to a probability, and learns the weights online by logistic gradient. Integer/deterministic.
ptwm_core::entropy::context_mixing::mixer::Mixer
crates/ptwm-core/src/entropy/context_mixing/mixer.rs:18pub struct Mixercoder
Bit-level encode/decode driver. Ties the context models + gated mixer to the shared range coder, coding each byte MSB-first. The payload is self-delimiting: a u32 LE length prefix precedes the coded bits, so decode never depends on the container's decoded_len.
model
Four byte-history context models (orders 0–3). Each maps a context — a hash of recent whole bytes combined with the partial-byte register c0 — to an adaptive 12-bit probability counter in a fixed hash table.