pub struct QStarPolicy { /* private fields */ }Expand description
The split policy for one served model.
Implementations§
Source§impl QStarPolicy
impl QStarPolicy
Sourcepub fn fixed_cap(max_fetch: usize) -> Self
pub fn fixed_cap(max_fetch: usize) -> Self
A fixed cap of max_fetch experts fetched per layer per step.
This is what an unbenchmarked machine gets, with max_fetch == 1: enough to keep the cache warming without betting the step on
a link whose speed nobody measured. max_fetch == 0 never
fetches (pure CPU); a very large cap is effectively pure
offload.
Sourcepub fn from_fraction(fraction: f64) -> Self
pub fn from_fraction(fraction: f64) -> Self
A measured fetch fraction. Replaces the cap entirely.
pub fn fraction_q16(&self) -> u64
Sourcepub fn split(&self, missing: usize) -> QStarSplit
pub fn split(&self, missing: usize) -> QStarSplit
Split missing cache misses between the link and the CPU.
Trait Implementations§
Source§impl Clone for QStarPolicy
impl Clone for QStarPolicy
Source§fn clone(&self) -> QStarPolicy
fn clone(&self) -> QStarPolicy
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 moreimpl Copy for QStarPolicy
Source§impl Debug for QStarPolicy
impl Debug for QStarPolicy
impl Eq for QStarPolicy
Source§impl PartialEq for QStarPolicy
impl PartialEq for QStarPolicy
impl StructuralPartialEq for QStarPolicy
Auto Trait Implementations§
impl Freeze for QStarPolicy
impl RefUnwindSafe for QStarPolicy
impl Send for QStarPolicy
impl Sync for QStarPolicy
impl Unpin for QStarPolicy
impl UnsafeUnpin for QStarPolicy
impl UnwindSafe for QStarPolicy
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<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