pub struct BackboneModel {
pub seed: Option<u32>,
/* private fields */
}Fields§
§seed: Option<u32>Implementations§
Source§impl BackboneModel
impl BackboneModel
pub fn weights_path(&self) -> &Path
pub fn load(path: &Path, n_ctx: u32) -> Result<BackboneModel, Error>
pub fn load_on( path: &Path, n_ctx: u32, device: Device, ) -> Result<BackboneModel, Error>
pub fn load_on_with( path: &Path, n_ctx: u32, device: Device, opts: BackboneLoadOptions, ) -> Result<BackboneModel, Error>
pub fn generate_codes( &self, prompt: &str, cfg: &GenerationConfig, ) -> Result<Vec<i32>, Error>
pub fn generate_codes_from_prompt( &self, prompt_ids: &[u32], cfg: &GenerationConfig, ) -> Result<Vec<i32>, Error>
pub fn generate_codes_from_prompt_streaming( &self, prompt_ids: &[u32], cfg: &GenerationConfig, on_code: impl FnMut(i32) -> Result<(), Error>, ) -> Result<(), Error>
Auto Trait Implementations§
impl !Freeze for BackboneModel
impl RefUnwindSafe for BackboneModel
impl Send for BackboneModel
impl Sync for BackboneModel
impl Unpin for BackboneModel
impl UnsafeUnpin for BackboneModel
impl UnwindSafe for BackboneModel
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more