pub struct PackedTokenBatch<B: Backend> {
pub input_ids: Tensor<B, 1, Int>,
pub attention_mask: Tensor<B, 1, Bool>,
pub position_ids: Tensor<B, 1, Int>,
pub boundaries: Vec<usize>,
}Available on crate feature
std only.Expand description
Actual flat document inputs without labels or synthetic separator tokens.
Fields§
§input_ids: Tensor<B, 1, Int>Flat actual tokenizer IDs.
attention_mask: Tensor<B, 1, Bool>Actual input visibility; ordinary packed collation marks every real token visible.
position_ids: Tensor<B, 1, Int>Actual per-document positions reset to zero.
boundaries: Vec<usize>Cumulative source/decoder boundaries, independently beginning at zero.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<B> Freeze for PackedTokenBatch<B>
impl<B> RefUnwindSafe for PackedTokenBatch<B>
impl<B> Send for PackedTokenBatch<B>
impl<B> Sync for PackedTokenBatch<B>
impl<B> Unpin for PackedTokenBatch<B>
impl<B> UnsafeUnpin for PackedTokenBatch<B>
impl<B> UnwindSafe for PackedTokenBatch<B>
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