pub struct TopologyDraftMapper<'a> { /* private fields */ }Expand description
Cold-path vocabulary bridge: 10D concept hashes → GGUF token ids.
Implementations§
Source§impl<'a> TopologyDraftMapper<'a>
impl<'a> TopologyDraftMapper<'a>
pub fn new(tokenizer: &'a GgufTokenizer) -> Self
Sourcepub fn concept_to_token_id(&self, concept_hash: u64) -> u32
pub fn concept_to_token_id(&self, concept_hash: u64) -> u32
Map a concept fingerprint to a draft token id (stable across runs for a given vocab).
Sourcepub fn fill_draft_batch(
&self,
concept_hashes: &[u64],
gamma: usize,
) -> TopologyDraftBatch
pub fn fill_draft_batch( &self, concept_hashes: &[u64], gamma: usize, ) -> TopologyDraftBatch
Fill a draft batch from concept hashes (γ ≤ MAX_DRAFT_LEN).
Auto Trait Implementations§
impl<'a> Freeze for TopologyDraftMapper<'a>
impl<'a> RefUnwindSafe for TopologyDraftMapper<'a>
impl<'a> Send for TopologyDraftMapper<'a>
impl<'a> Sync for TopologyDraftMapper<'a>
impl<'a> Unpin for TopologyDraftMapper<'a>
impl<'a> UnsafeUnpin for TopologyDraftMapper<'a>
impl<'a> UnwindSafe for TopologyDraftMapper<'a>
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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