pub struct KvCacheEstimateRequest {
pub engine: EngineConfig,
pub max_num_tokens: u32,
pub max_batch_size: u32,
pub kv_cache_memory_fraction: KvCacheMemoryFraction,
pub gpu_memory_capacity_bytes_override: Option<u64>,
pub tolerance_fraction: Option<f64>,
pub options: KvCacheEstimateOptions,
}Expand description
KV-cache memory request. engine reuses the modularised EngineConfig;
the remaining fields describe the runtime sizing budget.
Fields§
§engine: EngineConfig§max_num_tokens: u32§max_batch_size: u32§kv_cache_memory_fraction: KvCacheMemoryFraction§gpu_memory_capacity_bytes_override: Option<u64>Override for unknown SKUs; when Some, it wins over the SystemSpec
capacity reported by the native path.
tolerance_fraction: Option<f64>None = raw estimate only; Some(0.05) = 5% safety margin.
options: KvCacheEstimateOptionsTrait Implementations§
Source§impl Clone for KvCacheEstimateRequest
impl Clone for KvCacheEstimateRequest
Source§fn clone(&self) -> KvCacheEstimateRequest
fn clone(&self) -> KvCacheEstimateRequest
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 KvCacheEstimateRequest
impl Debug for KvCacheEstimateRequest
Source§impl<'de> Deserialize<'de> for KvCacheEstimateRequest
impl<'de> Deserialize<'de> for KvCacheEstimateRequest
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for KvCacheEstimateRequest
impl PartialEq for KvCacheEstimateRequest
Source§impl Serialize for KvCacheEstimateRequest
impl Serialize for KvCacheEstimateRequest
impl StructuralPartialEq for KvCacheEstimateRequest
Auto Trait Implementations§
impl Freeze for KvCacheEstimateRequest
impl RefUnwindSafe for KvCacheEstimateRequest
impl Send for KvCacheEstimateRequest
impl Sync for KvCacheEstimateRequest
impl Unpin for KvCacheEstimateRequest
impl UnsafeUnpin for KvCacheEstimateRequest
impl UnwindSafe for KvCacheEstimateRequest
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