pub struct MtpModule {
pub enorm: Vec<f32>,
pub hnorm: Vec<f32>,
pub eh_proj: QTensor,
pub layer: LayerWeights,
pub final_norm: Vec<f32>,
pub kv: LayerKvCache,
}Expand description
Multi-token-prediction head (DeepSeek/Qwen style, spec §2.1):
x = eh_proj·[enorm(embed(next)); hnorm(hidden)] → one transformer
block over its own KV → shared lm_head. Drafts the token after next;
the main model verifies, so output is exact — MTP only buys speed.
Fields§
§enorm: Vec<f32>§hnorm: Vec<f32>§eh_proj: QTensor[hidden, 2·hidden]
layer: LayerWeights§final_norm: Vec<f32>§kv: LayerKvCacheAuto Trait Implementations§
impl !Freeze for MtpModule
impl !RefUnwindSafe for MtpModule
impl !Sync for MtpModule
impl Send for MtpModule
impl Unpin for MtpModule
impl UnsafeUnpin for MtpModule
impl UnwindSafe for MtpModule
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