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
2026-09-25: Resolved translation tokens for the deployment. src_lang_id and
tgt_lang_id are the defaults from --src-lang/--tgt-lang; a request’s own
non-zero language ids override them. The factory sets decoder_start_id and
eos_id to the config’s eos_token_id and pad_id to 1.
Fields§
§src_lang_id: u322026-09-25: Source-language token prepended to the encoder input.
tgt_lang_id: u322026-09-25: Target-language token forced as the first decoded token (forced_bos).
decoder_start_id: u322026-09-25: Decoder start token, the first decoder input.
eos_id: u322026-09-25: End-of-sequence token: appended to the encoder input, and it ends a beam hypothesis.
pad_id: u322026-09-25: Padding token id; encoder positions skip it.
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