pub struct BeamReq {
pub prompt_tokens: Vec<u32>,
pub src_lang_id: u32,
pub tgt_lang_id: u32,
pub adapter_slot: i32,
pub num_beams: usize,
pub max_new: usize,
pub length_penalty: f32,
pub early_stopping: bool,
}Expand description
2026-09-26: One beam-search request for a translation model (NLLB): the per-request
parameters the scheduler copies from the sequence. ModelForward::generate_beam_batch runs
the search to completion.
Fields§
§prompt_tokens: Vec<u32>2026-09-25: Source subword ids; the model adds the source-language id and EOS itself.
src_lang_id: u322026-09-25: Source and target language token ids; 0 uses the deployment default.
tgt_lang_id: u32§adapter_slot: i322026-09-25: LoRA slot: >= 0 applies the adapter, -1 runs the base model.
num_beams: usize§max_new: usize§length_penalty: f32§early_stopping: boolTrait Implementations§
Auto Trait Implementations§
impl Freeze for BeamReq
impl RefUnwindSafe for BeamReq
impl Send for BeamReq
impl Sync for BeamReq
impl Unpin for BeamReq
impl UnwindSafe for BeamReq
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