pub struct LLaDA2Runner {
pub cfg: LLaDA2MoeConfig,
pub weights: LLaDA2Weights,
/* private fields */
}Fields§
§cfg: LLaDA2MoeConfig§weights: LLaDA2WeightsImplementations§
Source§impl LLaDA2Runner
impl LLaDA2Runner
pub fn builder() -> LLaDA2RunnerBuilder
pub fn config(&self) -> &LLaDA2MoeConfig
pub fn device(&self) -> Device
pub fn max_seq(&self) -> usize
pub fn predictive_offload_enabled(&self) -> bool
pub fn jump_steps(&self) -> usize
pub fn predictive_offload_info(&self) -> Option<PredictiveOffloadInfo>
pub fn moe_offload(&self) -> Option<&MoeOffloadState>
pub fn moe_store(&self) -> Option<&MoeExpertStore>
pub fn sync_moe_residency(&self, compiled: &mut CompiledGraph)
pub fn forward_logits( &mut self, input_ids: &[f32], position_ids: &[f32], attn_mask: &[f32], ) -> Result<Vec<f32>, Error>
pub fn block_denoise_loop( &mut self, cfg: BlockDenoiseConfig, ) -> BlockDenoiseLoop<LLaDA2RunnerForward<'_>>
pub fn get_offload_stats(&mut self) -> TideOffloadStats
pub fn reset_offload_step_stats(&mut self)
pub fn generate( &mut self, gen_cfg: &GenerateConfig, prompt_ids: &[u32], ) -> Result<(Vec<u32>, Vec<BlockDenoiseStepStats>), Error>
pub fn offload_stats( &self, residency: Option<&MoeResidencyStats>, ) -> Option<TideOffloadStats>
Trait Implementations§
Source§impl BlockDenoiseSampler for LLaDA2Runner
impl BlockDenoiseSampler for LLaDA2Runner
fn sample_block( &mut self, x: &[u32], window_end: usize, block_length: usize, refresh_experts: bool, gen_cfg: &GenerateConfig, model_cfg: &LLaDA2MoeConfig, step_ctx: DenoiseStepCtx, ) -> Result<(Vec<u32>, Vec<f32>), Error>
Auto Trait Implementations§
impl !RefUnwindSafe for LLaDA2Runner
impl !Sync for LLaDA2Runner
impl !UnwindSafe for LLaDA2Runner
impl Freeze for LLaDA2Runner
impl Send for LLaDA2Runner
impl Unpin for LLaDA2Runner
impl UnsafeUnpin for LLaDA2Runner
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