pub struct RlxNomicModel { /* private fields */ }Expand description
RLX-compiled NomicBERT with shape-bucketed compile cache.
Implementations§
Source§impl RlxNomicModel
impl RlxNomicModel
pub fn load_sized_on( config_path: &Path, weights_path: &str, batch: usize, seq: usize, device: Device, ) -> Result<Self>
pub fn load_sized_with_policy( config_path: &Path, weights_path: &str, batch: usize, seq: usize, device: Device, policy: Option<PrecisionPolicy>, ) -> Result<Self>
pub fn load_sized( config_path: &Path, weights_path: &str, batch: usize, seq: usize, ) -> Result<Self>
pub fn load(config_path: &Path, weights_path: &str) -> Result<Self>
pub fn recompile(&mut self, batch: usize, seq: usize) -> Result<()>
pub fn forward( &mut self, input_ids: &[f32], attention_mask: &[f32], token_type_ids: &[f32], ) -> Vec<f32>
pub fn forward_slots( &mut self, input_ids: &[f32], attention_mask: &[f32], token_type_ids: &[f32], ) -> (*const f32, usize)
pub fn forward_pipelined( &mut self, input_sets: &[(Vec<f32>, Vec<f32>, Vec<f32>)], ) -> Vec<Vec<Vec<f32>>>
Auto Trait Implementations§
impl !RefUnwindSafe for RlxNomicModel
impl !Sync for RlxNomicModel
impl !UnwindSafe for RlxNomicModel
impl Freeze for RlxNomicModel
impl Send for RlxNomicModel
impl Unpin for RlxNomicModel
impl UnsafeUnpin for RlxNomicModel
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
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