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,
}Fields§
§prompt_tokens: Vec<u32>Raw source subword ids (the model adds [src_lang] … </s> itself).
src_lang_id: u32Per-request source/target language token ids (0 = deployment default).
tgt_lang_id: u32§adapter_slot: i32Per-request LoRA slot (>=0 apply, -1 base).
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