pub struct ModelPlacement {
pub size_vram_bytes: u64,
pub total_bytes: u64,
pub suggested_num_ctx: Option<u32>,
}Expand description
Where a loaded model actually sits in memory, from a post-turn probe (Ollama
/api/ps). total_bytes is weights + KV + buffers; size_vram_bytes is the
part resident in VRAM. size_vram_bytes < total_bytes means the model spilled
to CPU/RAM (partial offload → slow). Only Ollama reports this.
Fields§
§size_vram_bytes: u64§total_bytes: u64§suggested_num_ctx: Option<u32>Auto-converge target: when the model spilled, the largest num_ctx that
would fit instead — or None if it already fits or shrinking can’t help
(weights-bound). Computed against the measured footprint.
Trait Implementations§
Source§impl Clone for ModelPlacement
impl Clone for ModelPlacement
Source§fn clone(&self) -> ModelPlacement
fn clone(&self) -> ModelPlacement
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 ModelPlacement
Auto Trait Implementations§
impl Freeze for ModelPlacement
impl RefUnwindSafe for ModelPlacement
impl Send for ModelPlacement
impl Sync for ModelPlacement
impl Unpin for ModelPlacement
impl UnsafeUnpin for ModelPlacement
impl UnwindSafe for ModelPlacement
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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