pub enum MtpQuantization {
Nvfp4,
Fp8,
Bf16,
}Expand description
2026-09-25: Precision of the MTP head’s projection weights.
Variants§
Implementations§
Source§impl MtpQuantization
impl MtpQuantization
Sourcepub fn supports_drafter_prefill(self) -> bool
pub fn supports_drafter_prefill(self) -> bool
2026-09-25: Whether the batched drafter prefill can run at this precision. The
prefill itself re-checks the weight variants and kernel handles; this
lets the caller skip the max_seq_len x hidden BF16 prompt-hidden buffer
for a head that could never use it. quantize_proj produces
ProjectionWeight::Bf16 only for MtpQuantization::Bf16.
Sourcepub fn effective_for_head(self, dense_ffn_head: bool) -> Self
pub fn effective_for_head(self, dense_ffn_head: bool) -> Self
2026-09-25: The precision the head’s forward runs at (KV dtype, forward arms,
drafter prefill). A dense-FFN head under Self::Nvfp4 runs the BF16
forward, so it reports Self::Bf16; every other combination reports
itself. MtpHead::new, the MTP KV-pool reserve and the prompt-capture
allocation all ask here.
Trait Implementations§
Source§impl Clone for MtpQuantization
impl Clone for MtpQuantization
Source§fn clone(&self) -> MtpQuantization
fn clone(&self) -> MtpQuantization
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MtpQuantization
impl Debug for MtpQuantization
Source§impl FromStr for MtpQuantization
impl FromStr for MtpQuantization
Source§impl PartialEq for MtpQuantization
impl PartialEq for MtpQuantization
impl Copy for MtpQuantization
impl Eq for MtpQuantization
impl StructuralPartialEq for MtpQuantization
Auto Trait Implementations§
impl Freeze for MtpQuantization
impl RefUnwindSafe for MtpQuantization
impl Send for MtpQuantization
impl Sync for MtpQuantization
impl Unpin for MtpQuantization
impl UnwindSafe for MtpQuantization
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.