DflashConfig

Struct DflashConfig 

Source
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§

§hidden_size: usize§num_hidden_layers: usize§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: usize

2026-09-25: Top-level block size γ; 16 when absent. Read it through DflashConfig::effective_block_size.

§dflash_config: Option<DflashSubConfig>§rope_theta: f32

2026-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: usize

2026-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: bool

2026-09-25: Load the DSpark confidence head (confidence_head.proj.*) when the checkpoint has it; false when absent.

§confidence_head_with_markov: bool

2026-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

Source

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

Source§

fn clone(&self) -> DflashConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DflashConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for DflashConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,