pub struct ModelVariant {
pub batch: usize,
pub seq: usize,
pub past_seq: Option<usize>,
pub phase: ModelPhase,
pub extra: Vec<(u32, usize)>,
}Expand description
Concrete shape bucket for compile-once / specialize-at-runtime workflows.
Fields§
§batch: usize§seq: usize§past_seq: Option<usize>§phase: ModelPhase§extra: Vec<(u32, usize)>Extra dynamic symbols beyond batch/seq/past (e.g. custom ragged axes).
Implementations§
Source§impl ModelVariant
impl ModelVariant
pub fn prefill(batch: usize, seq: usize) -> ModelVariant
Sourcepub fn decode(batch: usize, past_seq: usize, new_tokens: usize) -> ModelVariant
pub fn decode(batch: usize, past_seq: usize, new_tokens: usize) -> ModelVariant
Single-step decode: seq is the new token count (often 1); past_seq is KV length.
pub fn encoder(batch: usize, seq: usize) -> ModelVariant
pub fn with_extra(self, symbol: u32, size: usize) -> ModelVariant
Sourcepub fn dim_binding(&self) -> DimBinding
pub fn dim_binding(&self) -> DimBinding
Symbol bindings used by crate::dynamic::bind_graph / compile specialization.
Trait Implementations§
Source§impl Clone for ModelVariant
impl Clone for ModelVariant
Source§fn clone(&self) -> ModelVariant
fn clone(&self) -> ModelVariant
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModelVariant
impl Debug for ModelVariant
Source§impl PartialEq for ModelVariant
impl PartialEq for ModelVariant
Source§fn eq(&self, other: &ModelVariant) -> bool
fn eq(&self, other: &ModelVariant) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ModelVariant
impl StructuralPartialEq for ModelVariant
Auto Trait Implementations§
impl Freeze for ModelVariant
impl RefUnwindSafe for ModelVariant
impl Send for ModelVariant
impl Sync for ModelVariant
impl Unpin for ModelVariant
impl UnsafeUnpin for ModelVariant
impl UnwindSafe for ModelVariant
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more