Struct tokenizers::decoders::bpe::BPEDecoder
source · #[non_exhaustive]pub struct BPEDecoder {
pub suffix: String,
}
Expand description
Allows decoding Original BPE by joining all the tokens and then replacing the suffix used to identify end-of-words by whitespaces
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.suffix: String
Implementations§
Trait Implementations§
source§impl Clone for BPEDecoder
impl Clone for BPEDecoder
source§fn clone(&self) -> BPEDecoder
fn clone(&self) -> BPEDecoder
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for BPEDecoder
impl Debug for BPEDecoder
source§impl Decoder for BPEDecoder
impl Decoder for BPEDecoder
source§impl Default for BPEDecoder
impl Default for BPEDecoder
source§impl<'de> Deserialize<'de> for BPEDecoder
impl<'de> Deserialize<'de> for BPEDecoder
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 From<BPEDecoder> for DecoderWrapper
impl From<BPEDecoder> for DecoderWrapper
source§fn from(from: BPEDecoder) -> Self
fn from(from: BPEDecoder) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for BPEDecoder
impl RefUnwindSafe for BPEDecoder
impl Send for BPEDecoder
impl Sync for BPEDecoder
impl Unpin for BPEDecoder
impl UnwindSafe for BPEDecoder
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