#[repr(u8)]pub enum RetrievalHeadRole {
Local = 0,
Retrieval = 1,
}Expand description
Head role classification for RTPurbo sparse decode.
Only ~15% of attention heads (“retrieval heads”) need full long-context access. The remaining ~85% (“local heads”) attend only to local context + attention sinks.
Variants§
Local = 0
Local head — sliding window + sink tokens only, no full KV scan.
Retrieval = 1
Retrieval head — low-dim projection + dynamic top-p token selection.
Trait Implementations§
Source§impl Clone for RetrievalHeadRole
impl Clone for RetrievalHeadRole
Source§fn clone(&self) -> RetrievalHeadRole
fn clone(&self) -> RetrievalHeadRole
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 RetrievalHeadRole
Source§impl Debug for RetrievalHeadRole
impl Debug for RetrievalHeadRole
Source§impl Default for RetrievalHeadRole
impl Default for RetrievalHeadRole
Source§fn default() -> RetrievalHeadRole
fn default() -> RetrievalHeadRole
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RetrievalHeadRole
impl<'de> Deserialize<'de> for RetrievalHeadRole
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
impl Eq for RetrievalHeadRole
Source§impl PartialEq for RetrievalHeadRole
impl PartialEq for RetrievalHeadRole
Source§impl Serialize for RetrievalHeadRole
impl Serialize for RetrievalHeadRole
impl StructuralPartialEq for RetrievalHeadRole
Auto Trait Implementations§
impl Freeze for RetrievalHeadRole
impl RefUnwindSafe for RetrievalHeadRole
impl Send for RetrievalHeadRole
impl Sync for RetrievalHeadRole
impl Unpin for RetrievalHeadRole
impl UnsafeUnpin for RetrievalHeadRole
impl UnwindSafe for RetrievalHeadRole
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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