Skip to main content

PredictionTargetOperation

Trait PredictionTargetOperation 

Source
pub trait PredictionTargetOperation<A, B, S>{
    type Output;

    // Required method
    fn apply(
        self,
        architecture: &mut A,
        state: &mut S,
        parallel: Option<&B::ParallelContext>,
        context: &<B::Tensor as Tensor>::Context,
    ) -> Result<Self::Output, A::Error>;
}
Expand description

One typed adapter-owned operation over the authoritative prediction target.

Implementations may execute prediction-only units against target-owned static modules and the currently installed lane state. They cannot replace the target architecture or take ownership of its ordinary prefill/decode lifecycle.

Required Associated Types§

Source

type Output

Operation result retained by the prediction adapter.

Required Methods§

Source

fn apply( self, architecture: &mut A, state: &mut S, parallel: Option<&B::ParallelContext>, context: &<B::Tensor as Tensor>::Context, ) -> Result<Self::Output, A::Error>

Executes against the exact architecture and mutable state owned by the neutral session.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§