pub struct MixFormerSequentialForCausalLM { /* private fields */ }
Implementations§
source§impl MixFormerSequentialForCausalLM
impl MixFormerSequentialForCausalLM
pub fn new_v2(cfg: &Config, vb: VarBuilder) -> Result<Self>
pub fn new(cfg: &Config, vb: VarBuilder) -> Result<Self>
pub fn forward(&mut self, xs: &Tensor) -> Result<Tensor>
pub fn forward_with_img( &mut self, bos_token: &Tensor, xs: &Tensor, img_embeds: &Tensor ) -> Result<Tensor>
pub fn clear_kv_cache(&mut self)
Trait Implementations§
source§impl Clone for MixFormerSequentialForCausalLM
impl Clone for MixFormerSequentialForCausalLM
source§fn clone(&self) -> MixFormerSequentialForCausalLM
fn clone(&self) -> MixFormerSequentialForCausalLM
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 moreAuto Trait Implementations§
impl Freeze for MixFormerSequentialForCausalLM
impl !RefUnwindSafe for MixFormerSequentialForCausalLM
impl Send for MixFormerSequentialForCausalLM
impl Sync for MixFormerSequentialForCausalLM
impl Unpin for MixFormerSequentialForCausalLM
impl !UnwindSafe for MixFormerSequentialForCausalLM
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