pub enum Optimize {
Latency,
Throughput,
Memory,
}Expand description
What the planner is trying to make small.
Distinct from PlacementPolicy, which says how to split. Two clusters
can both be RAM-balanced and want opposite plans: a chat endpoint wants the
fewest hops it can get away with, a batch job wants every stage the same
length so the pipeline never stalls.
Variants§
Latency
Time to first token. Every extra stage is a network hop on the critical path, so this prefers to use as FEW nodes as will hold the model, packing each one full before reaching for the next.
Throughput
Tokens per second. With the pipeline full, throughput is set by the slowest stage, so spread work until stage times match — extra hops cost nothing once they overlap.
Memory
Headroom. Spread as thinly as possible across every node, leaving the most free RAM per machine. For sharing a cluster with other work.
Trait Implementations§
impl Copy for Optimize
Source§impl<'de> Deserialize<'de> for Optimize
impl<'de> Deserialize<'de> for Optimize
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Optimize
impl StructuralPartialEq for Optimize
Auto Trait Implementations§
impl Freeze for Optimize
impl RefUnwindSafe for Optimize
impl Send for Optimize
impl Sync for Optimize
impl Unpin for Optimize
impl UnsafeUnpin for Optimize
impl UnwindSafe for Optimize
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
key and return true if they are equal.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> ⓘ
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> ⓘ
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