pub struct MergeRule {
pub rank: u32,
pub merged_id: u32,
}Expand description
A learned merge’s priority (rank) and the id it produces.
Rank is a u32 purely to keep this struct small and Copy; ranks come
from a merge list’s position (enumerate()), so u32::MAX merges is
not a real-world constraint (GPT-2/Qwen vocabs have on the order of
10^5 merges).
Fields§
§rank: u32§merged_id: u32Trait Implementations§
impl Copy for MergeRule
impl Eq for MergeRule
impl StructuralPartialEq for MergeRule
Auto Trait Implementations§
impl Freeze for MergeRule
impl RefUnwindSafe for MergeRule
impl Send for MergeRule
impl Sync for MergeRule
impl Unpin for MergeRule
impl UnsafeUnpin for MergeRule
impl UnwindSafe for MergeRule
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