pub struct EngramHasher { /* private fields */ }Expand description
The n-gram hash for one sequence: keeps the compressed ids of every position so decode steps see the prefill’s look-back, exactly as the reference’s cache does.
Implementations§
Source§impl EngramHasher
impl EngramHasher
pub fn new(t: Arc<EngramHashTables>, max_seq: usize) -> Self
pub fn tables(&self) -> &Arc<EngramHashTables>
pub fn reset(&mut self)
Auto Trait Implementations§
impl Freeze for EngramHasher
impl RefUnwindSafe for EngramHasher
impl Send for EngramHasher
impl Sync for EngramHasher
impl Unpin for EngramHasher
impl UnwindSafe for EngramHasher
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