pub struct RvqDepthDecoder { /* private fields */ }Expand description
The RVQ depth decoder: given the frame’s hidden state and the codes chosen so far, it predicts the next codebook level.
It is a small CAUSAL transformer over a sequence that never exceeds the codebook count — the positional table is 16 rows for 8 levels — with no rotary embedding at all. Attention that forgets the mask here leaks a level’s own answer backwards and the model still samples.
Implementations§
Source§impl RvqDepthDecoder
impl RvqDepthDecoder
pub fn from_cmf(model: &Arc<CmfModel>) -> Result<Self, String>
pub fn codebooks(&self) -> usize
Sourcepub fn project(&self, x: &[f32]) -> Vec<f32>
pub fn project(&self, x: &[f32]) -> Vec<f32>
projection is applied to every element entering the sequence —
the frame hidden, the c0 embedding and each extra embedding.
Auto Trait Implementations§
impl !RefUnwindSafe for RvqDepthDecoder
impl !UnwindSafe for RvqDepthDecoder
impl Freeze for RvqDepthDecoder
impl Send for RvqDepthDecoder
impl Sync for RvqDepthDecoder
impl Unpin for RvqDepthDecoder
impl UnsafeUnpin for RvqDepthDecoder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more