pub enum KvStorageFormat {
F16,
Int8PerTokenHeadF32ScaleV1,
}Expand description
Versioned storage of causal K/V state, independent of activation arithmetic. INT8 uses a separate F32 scale for each K/V token and head. Its encoder first rounds to the existing F16 KV boundary, then uses max-abs / 127 and ties-even rounding to [-127, 127]. A zero vector has scale 1; non-finite input fails.
Variants§
Implementations§
Trait Implementations§
Source§impl Clone for KvStorageFormat
impl Clone for KvStorageFormat
Source§fn clone(&self) -> KvStorageFormat
fn clone(&self) -> KvStorageFormat
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 KvStorageFormat
Source§impl Debug for KvStorageFormat
impl Debug for KvStorageFormat
Source§impl Default for KvStorageFormat
impl Default for KvStorageFormat
Source§fn default() -> KvStorageFormat
fn default() -> KvStorageFormat
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for KvStorageFormat
impl<'de> Deserialize<'de> for KvStorageFormat
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<KvStorageFormat, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<KvStorageFormat, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for KvStorageFormat
impl Display for KvStorageFormat
impl Eq for KvStorageFormat
Source§impl PartialEq for KvStorageFormat
impl PartialEq for KvStorageFormat
Source§impl Serialize for KvStorageFormat
impl Serialize for KvStorageFormat
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for KvStorageFormat
Source§impl TryFrom<KvCacheDtype> for KvStorageFormat
impl TryFrom<KvCacheDtype> for KvStorageFormat
Source§fn try_from(
dtype: KvCacheDtype,
) -> Result<KvStorageFormat, <KvStorageFormat as TryFrom<KvCacheDtype>>::Error>
fn try_from( dtype: KvCacheDtype, ) -> Result<KvStorageFormat, <KvStorageFormat as TryFrom<KvCacheDtype>>::Error>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for KvStorageFormat
impl RefUnwindSafe for KvStorageFormat
impl Send for KvStorageFormat
impl Sync for KvStorageFormat
impl Unpin for KvStorageFormat
impl UnsafeUnpin for KvStorageFormat
impl UnwindSafe for KvStorageFormat
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