Struct candle_transformers::models::t5::T5ForConditionalGeneration
source · pub struct T5ForConditionalGeneration { /* private fields */ }
Implementations§
source§impl T5ForConditionalGeneration
impl T5ForConditionalGeneration
pub fn load(vb: VarBuilder<'_>, cfg: &Config) -> Result<Self>
pub fn encode(&mut self, input_ids: &Tensor) -> Result<Tensor>
pub fn decode( &mut self, decoder_input_ids: &Tensor, encoder_output: &Tensor ) -> Result<Tensor>
pub fn forward( &mut self, input_ids: &Tensor, decoder_input_ids: &Tensor ) -> Result<Tensor>
pub fn device(&self) -> &Device
pub fn clear_kv_cache(&mut self)
Trait Implementations§
source§impl Clone for T5ForConditionalGeneration
impl Clone for T5ForConditionalGeneration
source§fn clone(&self) -> T5ForConditionalGeneration
fn clone(&self) -> T5ForConditionalGeneration
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 T5ForConditionalGeneration
impl !RefUnwindSafe for T5ForConditionalGeneration
impl Send for T5ForConditionalGeneration
impl Sync for T5ForConditionalGeneration
impl Unpin for T5ForConditionalGeneration
impl !UnwindSafe for T5ForConditionalGeneration
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