pub struct NllbLang {
pub src_lang_id: u32,
pub tgt_lang_id: u32,
pub decoder_start_id: u32,
pub eos_id: u32,
pub pad_id: u32,
}Expand description
Resolved per-deployment translation tokens. src_lang_id/tgt_lang_id come
from --src-lang/--tgt-lang (or a recipe default) resolved through the
tokenizer at serve start; the rest are M2M-100/NLLB architectural constants.
Fields§
§src_lang_id: u32Source-language prefix token prepended to the encoder input.
tgt_lang_id: u32Target-language token forced as the first decoded token (forced_bos).
decoder_start_id: u32Decoder start token (M2M-100 convention: the eos id).
eos_id: u32End-of-sequence / stop token.
pad_id: u32Padding token id (M2M-100 padding_idx = 1).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NllbLang
impl RefUnwindSafe for NllbLang
impl Send for NllbLang
impl Sync for NllbLang
impl Unpin for NllbLang
impl UnwindSafe for NllbLang
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