pub struct ModelCandidate {
pub repo: &'static str,
pub quantization: &'static str,
pub weights_bytes: u64,
pub kv_elems_per_token: KvElemsPerToken,
pub context: u64,
pub rationale: &'static str,
}Expand description
One entry in the shortlist.
Weights are recorded as the actual byte size of the quantized file on
Hugging Face — not a rounded “about 18 GB” — because the whole point is to
compare against a real memory figure. The KV shape comes from the model’s
own config so the cache cost is computed by kv_estimate, not restated
here as a second magic number.
Fields§
§repo: &'static strHugging Face repository id, passed verbatim to the download queue.
quantization: &'static strQuantization to request from that repository.
weights_bytes: u64Size of the quantized weights, in bytes.
kv_elems_per_token: KvElemsPerTokenPer-token KV cache element counts, derived from the model’s config.
context: u64Context this candidate is sized for.
rationale: &'static strWhy this model, in the user’s terms. Printed verbatim.
Implementations§
Source§impl ModelCandidate
impl ModelCandidate
Sourcepub const fn required_bytes(&self) -> u64
pub const fn required_bytes(&self) -> u64
Total memory this candidate needs: weights plus KV cache at
context, quantized to the gglib default.
Uses kv_bytes_per_token with KvCacheType::Q8_0 on both sides
because that is what the runtime actually launches with (see
gglib_runtime::llama::args::kv_cache_type). A recommendation computed
against f16 would over-reserve by roughly the KV cache again.
Sourcepub fn min_budget_bytes(&self) -> u64
pub fn min_budget_bytes(&self) -> u64
The smallest memory budget this candidate may be recommended for.
Trait Implementations§
Source§impl Clone for ModelCandidate
impl Clone for ModelCandidate
Source§fn clone(&self) -> ModelCandidate
fn clone(&self) -> ModelCandidate
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ModelCandidate
impl Debug for ModelCandidate
Source§impl PartialEq for ModelCandidate
impl PartialEq for ModelCandidate
Source§fn eq(&self, other: &ModelCandidate) -> bool
fn eq(&self, other: &ModelCandidate) -> bool
self and other values to be equal, and is used by ==.