pub enum ClassLatent {
Start,
Middle,
End,
Custom(usize),
}Expand description
Position marker for a learnable class latent inserted into a layer’s
working sequence (embedding width = d_model).
Variants§
Start
Prepend before the whole sequence (index 0).
Middle
Insert at the middle of the original sequence (index L/2).
Incompatible with step() calls.
End
Append after the whole sequence (index L).
Incompatible with step() calls.
Custom(usize)
Insert at an explicit index into the original sequence.
Trait Implementations§
Source§impl ClassMarker for ClassLatent
impl ClassMarker for ClassLatent
Source§fn insert_pos(&self, orig_len: usize) -> usize
fn insert_pos(&self, orig_len: usize) -> usize
Insertion index measured against the original sequence length
orig_len.Source§fn group_rank(&self) -> usize
fn group_rank(&self) -> usize
Tie-break rank among markers sharing an index (
Start<Middle<End<Custom).Source§fn forbids_step(&self) -> bool
fn forbids_step(&self) -> bool
Whether this marker is incompatible with single-token
step()
(Middle/End create positions a per-token recurrence cannot reproduce).Source§impl Clone for ClassLatent
impl Clone for ClassLatent
Source§impl Config for ClassLatent
impl Config for ClassLatent
§fn load_binary(data: &[u8]) -> Result<Self, ConfigError>
fn load_binary(data: &[u8]) -> Result<Self, ConfigError>
Loads the configuration from a binary buffer. Read more
Source§impl Debug for ClassLatent
impl Debug for ClassLatent
Source§impl<'de> Deserialize<'de> for ClassLatent
impl<'de> Deserialize<'de> for ClassLatent
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
Source§impl Display for ClassLatent
impl Display for ClassLatent
Auto Trait Implementations§
impl Freeze for ClassLatent
impl RefUnwindSafe for ClassLatent
impl Send for ClassLatent
impl Sync for ClassLatent
impl Unpin for ClassLatent
impl UnsafeUnpin for ClassLatent
impl UnwindSafe for ClassLatent
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