Enum rust_bert::pipelines::generation_utils::Cache
source · pub enum Cache {
GPT2Cache(Option<Vec<Tensor>>),
BARTCache(Option<Vec<(Option<BartLayerState>, Option<BartLayerState>)>>),
T5Cache(Option<Vec<(Option<T5LayerState>, Option<T5LayerState>)>>),
LongT5Cache(Option<Vec<(Option<T5LayerState>, Option<T5LayerState>)>>),
XLNetCache(Option<Vec<Option<XLNetLayerState>>>),
ReformerCache(Option<Vec<Option<ReformerLayerState>>>),
ProphetNetCache(Option<Vec<(Option<ProphetNetLayerState>, Option<ProphetNetLayerState>)>>),
GPTNeoCache(Option<Vec<Option<GPTNeoLayerState>>>),
GPTJCache(Option<Vec<Option<GPTJLayerState>>>),
None,
}Variants§
GPT2Cache(Option<Vec<Tensor>>)
BARTCache(Option<Vec<(Option<BartLayerState>, Option<BartLayerState>)>>)
T5Cache(Option<Vec<(Option<T5LayerState>, Option<T5LayerState>)>>)
LongT5Cache(Option<Vec<(Option<T5LayerState>, Option<T5LayerState>)>>)
XLNetCache(Option<Vec<Option<XLNetLayerState>>>)
ReformerCache(Option<Vec<Option<ReformerLayerState>>>)
ProphetNetCache(Option<Vec<(Option<ProphetNetLayerState>, Option<ProphetNetLayerState>)>>)
GPTNeoCache(Option<Vec<Option<GPTNeoLayerState>>>)
GPTJCache(Option<Vec<Option<GPTJLayerState>>>)
None
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Cache
impl Send for Cache
impl !Sync for Cache
impl Unpin for Cache
impl UnwindSafe for Cache
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