DflashWeights

Struct DflashWeights 

Source
pub struct DflashWeights {
Show 13 fields pub config: DflashConfig, pub fc: DenseWeight, pub hidden_norm: DenseWeight, pub norm: DenseWeight, pub layers: Vec<DflashLayerWeights>, pub draft_id_to_target_id: Option<Vec<i64>>, pub markov_w1: Option<DenseWeight>, pub markov_w2: Option<DenseWeight>, pub confidence_proj: Option<DenseWeight>, pub confidence_bias: Option<DenseWeight>, pub selector_pred: Option<DenseWeight>, pub selector_succ: Option<DenseWeight>, pub selector_hidden_proj: Option<DenseWeight>,
}
Expand description

Raw weight bundle for the DFlash drafter, post-load.

Verified against z-lab/Qwen3.6-35B-A3B-DFlash (commit 42d3b34, May 2026): the checkpoint ships 91 BF16 tensors — fc.weight, hidden_norm.weight, norm.weight, plus 11 weights per drafter layer × 8 layers. No embed_tokens or lm_head are in the checkpoint — the drafter shares the target’s embedding and LM head at construction time. This matches the vLLM PR #40898 flow: when those keys are absent, vLLM’s AutoWeightsLoader adds them to skip_substrs, leaving the runtime to slot in the target’s pointers.

Fields§

§config: DflashConfig§fc: DenseWeight

[draft_hidden, len(target_layer_ids) * target_hidden]. Qwen3.6-35B-A3B-DFlash: [2048, 10240].

§hidden_norm: DenseWeight

[draft_hidden] — RMSNorm applied to the projected target context before mixing with token embeddings.

§norm: DenseWeight

[draft_hidden] — final RMSNorm before LM head.

§layers: Vec<DflashLayerWeights>§draft_id_to_target_id: Option<Vec<i64>>

Present iff the drafter has a draft-id → target-id mapping (i.e. draft_vocab_size != target_vocab_size). Absent for Qwen3.6-35B-A3B-DFlash (both vocabs = 248320).

§markov_w1: Option<DenseWeight>

Markov head markov_w1: [vocab, markov_rank] BF16 embedding table (prev-token → latent). Present iff config.markov_rank > 0 and the checkpoint carries the tensor.

§markov_w2: Option<DenseWeight>

Markov head markov_w2: [vocab, markov_rank] BF16 (nn.Linear(rank, vocab, bias=False).weight, i.e. [N, K] for the GEMV convention). Projects the latent back to a full-vocab bias.

§confidence_proj: Option<DenseWeight>

Confidence head weight: [1, hidden(+rank)] BF16.

§confidence_bias: Option<DenseWeight>

Confidence head bias: [1] BF16.

§selector_pred: Option<DenseWeight>

candidate_selector.predecessor_codebook [vocab, selector_rank] BF16.

§selector_succ: Option<DenseWeight>

candidate_selector.successor_codebook [vocab, selector_rank] BF16.

§selector_hidden_proj: Option<DenseWeight>

candidate_selector.hidden_projection.weight [selector_rank, hidden].

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