pub struct DflashConfig {Show 17 fields
pub hidden_size: usize,
pub num_hidden_layers: usize,
pub intermediate_size: usize,
pub num_attention_heads: usize,
pub num_key_value_heads: usize,
pub head_dim: usize,
pub vocab_size: usize,
pub draft_vocab_size: Option<usize>,
pub tie_word_embeddings: bool,
pub block_size: usize,
pub dflash_config: Option<DflashSubConfig>,
pub rope_theta: f32,
pub rope_scaling: Option<DflashRopeScaling>,
pub markov_rank: usize,
pub markov_head_type: Option<String>,
pub enable_confidence_head: bool,
pub confidence_head_with_markov: bool,
}Expand description
2026-09-25: The fields of a drafter’s config.json that the engine reads,
under their config.json names. Unknown keys are ignored.
Fields§
§intermediate_size: usize§num_attention_heads: usize§num_key_value_heads: usize§head_dim: usize§vocab_size: usize§draft_vocab_size: Option<usize>§tie_word_embeddings: bool§block_size: usize2026-09-25: Top-level block size γ; 16 when absent. Read it through
DflashConfig::effective_block_size.
dflash_config: Option<DflashSubConfig>§rope_theta: f322026-09-25: Drafter RoPE θ; 10,000,000 when absent.
rope_scaling: Option<DflashRopeScaling>2026-09-25: The rope_scaling block, also read under the key
rope_parameters. None means plain RoPE. With rope_type == "yarn"
the head builds a YaRN inv_freq table; any other block falls back to
plain RoPE with a warning.
markov_rank: usize2026-09-25: DSpark Markov head rank, a top-level key; 0 when absent, which loads no Markov head.
markov_head_type: Option<String>2026-09-25: DSpark Markov head type. When the Markov head loads, any
value other than "vanilla" fails the load.
enable_confidence_head: bool2026-09-25: Load the DSpark confidence head (confidence_head.proj.*)
when the checkpoint has it; false when absent.
confidence_head_with_markov: bool2026-09-25: When true the confidence head reads the hidden state and
then the Markov embedding (hidden_size + markov_rank inputs); when
false, the hidden state only. True when absent.
Implementations§
Source§impl DflashConfig
impl DflashConfig
Sourcepub fn effective_block_size(&self) -> usize
pub fn effective_block_size(&self) -> usize
2026-09-25: Resolved block size γ: dflash_config.block_size when set,
else the top-level field. The sub-config comes first because serde
fills the top-level default of 16 for a checkpoint that never states
it.
Trait Implementations§
Source§impl Clone for DflashConfig
impl Clone for DflashConfig
Source§fn clone(&self) -> DflashConfig
fn clone(&self) -> DflashConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more