pub struct LFM2Model {
pub metadata: ModelMetadata,
pub embedding: Embedding,
pub layers: Vec<LFM2Layer>,
pub pooler: Option<Pooler>,
}Fields§
§metadata: ModelMetadata§embedding: Embedding§layers: Vec<LFM2Layer>§pooler: Option<Pooler>Trait Implementations§
Source§impl ModelRunner for LFM2Model
impl ModelRunner for LFM2Model
Source§fn forward(
&self,
input: &ModelInput,
config: &InferenceConfig,
) -> Result<ModelOutput, SparseInferenceError>
fn forward( &self, input: &ModelInput, config: &InferenceConfig, ) -> Result<ModelOutput, SparseInferenceError>
Forward pass with optional sparse computation
Source§fn get_predictor(&self, layer_idx: usize) -> Option<&LowRankPredictor>
fn get_predictor(&self, layer_idx: usize) -> Option<&LowRankPredictor>
Get predictor for a specific layer (if available)
Source§fn calibrate(
&mut self,
_samples: &[ModelInput],
) -> Result<CalibrationStats, SparseInferenceError>
fn calibrate( &mut self, _samples: &[ModelInput], ) -> Result<CalibrationStats, SparseInferenceError>
Calibrate predictors with sample data
Source§fn metadata(&self) -> &ModelMetadata
fn metadata(&self) -> &ModelMetadata
Get model metadata
Auto Trait Implementations§
impl Freeze for LFM2Model
impl RefUnwindSafe for LFM2Model
impl Send for LFM2Model
impl Sync for LFM2Model
impl Unpin for LFM2Model
impl UnwindSafe for LFM2Model
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