pub struct DflashConfig {
pub draft_model: &'static str,
pub gamma: usize,
pub window_size: usize,
pub mask_token_id: u32,
pub target_layer_ids: &'static [usize],
}Expand description
DFlash speculative-decoding pairing for a target model.
Parsed from [dflash] in MODEL.toml at build time. None when the
model has no DFlash drafter associated.
Fields§
§draft_model: &'static strHuggingFace id (or local path) of the drafter checkpoint.
gamma: usizeBlock size γ (parallel draft tokens per step). Defaults to 16.
window_size: usizeDrafter sliding-window size in tokens. 0 = full attention.
mask_token_id: u32Token id used to fill the γ “to-be-predicted” positions during
drafter forward. From the drafter’s dflash_config.mask_token_id.
target_layer_ids: &'static [usize]Target-side layer indices to capture intermediate hidden states from
(shallow-to-deep). The drafter’s fc projection consumes the stack
of these hiddens. From the drafter’s dflash_config.target_layer_ids.
Trait Implementations§
Source§impl Clone for DflashConfig
impl Clone for DflashConfig
Source§fn clone(&self) -> DflashConfig
fn clone(&self) -> DflashConfig
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 moreAuto Trait Implementations§
impl Freeze for DflashConfig
impl RefUnwindSafe for DflashConfig
impl Send for DflashConfig
impl Sync for DflashConfig
impl Unpin for DflashConfig
impl UnwindSafe for DflashConfig
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