pub struct ModelParameters {
pub parameters: u64,
pub memory_required: f64,
pub compute_required: f64,
pub prefer_gpu: bool,
pub architecture: Option<String>,
pub quantization: QuantizationLevel,
pub context_length: Option<u32>,
pub batch_size: u32,
}Expand description
Model parameters for AI workloads
Fields§
§parameters: u64Number of parameters in the model
memory_required: f64Memory required in GB
compute_required: f64Compute intensity (0-10 scale)
prefer_gpu: boolPrefer GPU acceleration
architecture: Option<String>Model architecture type
quantization: QuantizationLevelQuantization level
context_length: Option<u32>Context length
batch_size: u32Batch size
Implementations§
Source§impl ModelParameters
impl ModelParameters
Sourcepub fn parameters(self, params: u64) -> Self
pub fn parameters(self, params: u64) -> Self
Set number of parameters
Sourcepub fn memory_required(self, gb: f64) -> Self
pub fn memory_required(self, gb: f64) -> Self
Set memory requirement in GB
Sourcepub fn compute_required(self, compute: f64) -> Self
pub fn compute_required(self, compute: f64) -> Self
Set compute requirement (0-10 scale)
Sourcepub fn prefer_gpu(self, prefer: bool) -> Self
pub fn prefer_gpu(self, prefer: bool) -> Self
Set GPU preference
Sourcepub fn architecture(self, arch: impl Into<String>) -> Self
pub fn architecture(self, arch: impl Into<String>) -> Self
Set model architecture
Sourcepub fn quantization(self, quant: QuantizationLevel) -> Self
pub fn quantization(self, quant: QuantizationLevel) -> Self
Set quantization level
Sourcepub fn context_length(self, length: u32) -> Self
pub fn context_length(self, length: u32) -> Self
Set context length
Sourcepub fn batch_size(self, size: u32) -> Self
pub fn batch_size(self, size: u32) -> Self
Set batch size
Trait Implementations§
Source§impl Clone for ModelParameters
impl Clone for ModelParameters
Source§fn clone(&self) -> ModelParameters
fn clone(&self) -> ModelParameters
Returns a duplicate of the value. Read more
1.0.0 · 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 ModelParameters
impl Debug for ModelParameters
Source§impl Default for ModelParameters
impl Default for ModelParameters
Source§impl<'de> Deserialize<'de> for ModelParameters
impl<'de> Deserialize<'de> for ModelParameters
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
Auto Trait Implementations§
impl Freeze for ModelParameters
impl RefUnwindSafe for ModelParameters
impl Send for ModelParameters
impl Sync for ModelParameters
impl Unpin for ModelParameters
impl UnwindSafe for ModelParameters
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