Skip to main content

Dory

Struct Dory 

Source
pub struct Dory {
Show 14 fields pub file: Option<Arc<CmfModel>>, pub cfg: DoryCfg, pub embed: QTensor, pub head: QTensor, pub logit_scale: Vec<f32>, pub layers: Vec<Layer>, pub inv_full: Vec<f32>, pub inv_sliding: Vec<f32>, pub attn_layers: usize, pub o1: Option<DoryO1>, pub gate: Option<Gate>, pub prompt_loops: usize, pub exact: Option<ExactRows>, pub spill: Option<PathBuf>,
}

Fields§

§file: Option<Arc<CmfModel>>

The file, for a device that binds its mapping as it is.

§cfg: DoryCfg§embed: QTensor§head: QTensor§logit_scale: Vec<f32>

logit_scale/σ₀

§layers: Vec<Layer>§inv_full: Vec<f32>§inv_sliding: Vec<f32>§attn_layers: usize§o1: Option<DoryO1>§gate: Option<Gate>

How a token leaves the loop early, on the last-loop cache.

§prompt_loops: usize

Passes over a prompt chunk whose logits nobody reads (CMF_DORY_PROMPT_LOOPS): its cache rows are all that stays of it. 0: as many as any other chunk.

§exact: Option<ExactRows>

Rows of a sealed prompt the far field would lose (CMF_DORY_EXACT=FILE:rows).

§spill: Option<PathBuf>

A long prompt’s rows go to files here, and to RAM without it (CMF_O1_SPILL).

Implementations§

Source§

impl Dory

Source

pub fn from_model(model: &Arc<CmfModel>) -> Result<Self, String>

Source

pub fn chunk_loops(&self, loops: usize, want: Want) -> usize

The passes over one chunk of a forward.

Auto Trait Implementations§

§

impl Forget for Dory

§

impl Freeze for Dory

§

impl Move for Dory

§

impl RefUnwindSafe for Dory

§

impl Send for Dory

§

impl Sync for Dory

§

impl Unpin for Dory

§

impl UnsafeUnpin for Dory

§

impl UnwindSafe for Dory

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.

Source§

impl<T> Instrument for T

Source§

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

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

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 = !

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

fn try_from(value: U) -> Result<T, !>

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

impl<T> WithSubscriber for T

Source§

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

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

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