pub struct KvCompressionProfileV1 {Show 14 fields
pub schema_version: String,
pub profile_id: String,
pub shape_digest: String,
pub fib_profile: FibQuantProfileV1,
pub fib_profile_digest: String,
pub codebook_digest: String,
pub rotation_digest: String,
pub role_policy: KvRole,
pub axis_policy: KvAxisPolicyV1,
pub page_geometry: KvPageGeometryV1,
pub protected_policy: KvProtectedPolicyV1,
pub fallback_policy: KvFallbackPolicyV1,
pub quality_budget: KvQualityBudgetV1,
pub calibration_digest: String,
}Expand description
KV compression profile binding shape, FibQuant artifacts, policy, and budgets.
Fields§
§schema_version: StringStable schema marker.
profile_id: StringOperator-chosen profile identifier.
shape_digest: StringDigest of the logical KV shape.
fib_profile: FibQuantProfileV1Embedded FibQuant vector profile.
fib_profile_digest: StringDigest of fib_profile.
codebook_digest: StringDigest of the matching codebook.
rotation_digest: StringDigest of the matching rotation.
role_policy: KvRoleRole this profile targets.
axis_policy: KvAxisPolicyV1Axis/policy declaration.
page_geometry: KvPageGeometryV1Fixed-size page geometry.
protected_policy: KvProtectedPolicyV1Protected raw regions.
fallback_policy: KvFallbackPolicyV1Raw/fail fallback policy.
quality_budget: KvQualityBudgetV1Quality budget.
calibration_digest: StringCalibration artifact digest or a stable missing marker.
Implementations§
Source§impl KvCompressionProfileV1
impl KvCompressionProfileV1
Sourcepub fn from_parts(
profile_id: impl Into<String>,
shape: &KvTensorShapeV1,
fib_profile: FibQuantProfileV1,
codebook_digest: impl Into<String>,
axis_policy: KvAxisPolicyV1,
page_geometry: KvPageGeometryV1,
) -> Result<Self>
pub fn from_parts( profile_id: impl Into<String>, shape: &KvTensorShapeV1, fib_profile: FibQuantProfileV1, codebook_digest: impl Into<String>, axis_policy: KvAxisPolicyV1, page_geometry: KvPageGeometryV1, ) -> Result<Self>
Build a profile from an already built quantizer identity.
Sourcepub fn validate_for_shape(&self, shape: &KvTensorShapeV1) -> Result<()>
pub fn validate_for_shape(&self, shape: &KvTensorShapeV1) -> Result<()>
Validate profile against the expected shape.
Sourcepub fn digest(&self, shape: &KvTensorShapeV1) -> Result<String>
pub fn digest(&self, shape: &KvTensorShapeV1) -> Result<String>
Stable digest for the KV profile.
Trait Implementations§
Source§impl Clone for KvCompressionProfileV1
impl Clone for KvCompressionProfileV1
Source§fn clone(&self) -> KvCompressionProfileV1
fn clone(&self) -> KvCompressionProfileV1
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 KvCompressionProfileV1
impl Debug for KvCompressionProfileV1
Source§impl<'de> Deserialize<'de> for KvCompressionProfileV1
impl<'de> Deserialize<'de> for KvCompressionProfileV1
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 KvCompressionProfileV1
impl PartialEq for KvCompressionProfileV1
Source§fn eq(&self, other: &KvCompressionProfileV1) -> bool
fn eq(&self, other: &KvCompressionProfileV1) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for KvCompressionProfileV1
impl Serialize for KvCompressionProfileV1
impl StructuralPartialEq for KvCompressionProfileV1
Auto Trait Implementations§
impl Freeze for KvCompressionProfileV1
impl RefUnwindSafe for KvCompressionProfileV1
impl Send for KvCompressionProfileV1
impl Sync for KvCompressionProfileV1
impl Unpin for KvCompressionProfileV1
impl UnsafeUnpin for KvCompressionProfileV1
impl UnwindSafe for KvCompressionProfileV1
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.