Skip to main content

InferenceRpc

Trait InferenceRpc 

Source
pub trait InferenceRpc: Send + Sync {
Show 32 methods // Required methods fn generate_stream<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 GenerationRequest, ) -> Pin<Box<dyn Future<Output = Result<MoqStreamHandle>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn model_info<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<ModelInfo>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn is_ready<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn apply_chat_template<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 ChatTemplateRequest, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn create_lora<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 LoraConfig, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn load_lora<'life0, 'life1, 'async_trait>( &'life0 self, value: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn save_lora<'life0, 'life1, 'async_trait>( &'life0 self, value: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn unload_lora<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn has_lora<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn set_session<'life0, 'life1, 'async_trait>( &'life0 self, value: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn clear_session<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn release_session<'life0, 'life1, 'async_trait>( &'life0 self, value: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn health_check<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<HealthStatus>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn ttt_writeback<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn ttt_evict<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn train_step<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 TrainStepRequest, ) -> Pin<Box<dyn Future<Output = Result<TrainStepResult>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn ttt_zero<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_delta_status<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<DeltaStatusResult>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn save_adaptation<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 SaveAdaptationRequest, ) -> Pin<Box<dyn Future<Output = Result<SaveAdaptationResult>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn snapshot_delta<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<SnapshotDeltaResult>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn train_step_stream<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 TrainStepRequest, ) -> Pin<Box<dyn Future<Output = Result<MoqStreamHandle>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn export_peft_adapter<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 ExportPeftRequest, ) -> Pin<Box<dyn Future<Output = Result<ExportPeftResult>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn merge_lora<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 MergeLoraRequest, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn create_lora_stream<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 LoraConfig, ) -> Pin<Box<dyn Future<Output = Result<MoqStreamHandle>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn load_lora_stream<'life0, 'life1, 'async_trait>( &'life0 self, value: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<MoqStreamHandle>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn save_lora_stream<'life0, 'life1, 'async_trait>( &'life0 self, value: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<MoqStreamHandle>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn save_adaptation_stream<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 SaveAdaptationRequest, ) -> Pin<Box<dyn Future<Output = Result<MoqStreamHandle>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn snapshot_delta_stream<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<MoqStreamHandle>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn export_peft_adapter_stream<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 ExportPeftRequest, ) -> Pin<Box<dyn Future<Output = Result<MoqStreamHandle>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn merge_lora_stream<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 MergeLoraRequest, ) -> Pin<Box<dyn Future<Output = Result<MoqStreamHandle>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn embed<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 EmbedImagesRequest, ) -> Pin<Box<dyn Future<Output = Result<EmbedImagesResponse>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_layer_profile<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<LayerProfileResult>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait;
}
Expand description

Generated RPC trait for the Inference service.

Required Methods§

Source

fn generate_stream<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 GenerationRequest, ) -> Pin<Box<dyn Future<Output = Result<MoqStreamHandle>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn model_info<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<ModelInfo>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn is_ready<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn apply_chat_template<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 ChatTemplateRequest, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn create_lora<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 LoraConfig, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn load_lora<'life0, 'life1, 'async_trait>( &'life0 self, value: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn save_lora<'life0, 'life1, 'async_trait>( &'life0 self, value: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn unload_lora<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn has_lora<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn set_session<'life0, 'life1, 'async_trait>( &'life0 self, value: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn clear_session<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn release_session<'life0, 'life1, 'async_trait>( &'life0 self, value: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn health_check<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<HealthStatus>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn ttt_writeback<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn ttt_evict<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn train_step<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 TrainStepRequest, ) -> Pin<Box<dyn Future<Output = Result<TrainStepResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn ttt_zero<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_delta_status<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<DeltaStatusResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn save_adaptation<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 SaveAdaptationRequest, ) -> Pin<Box<dyn Future<Output = Result<SaveAdaptationResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn snapshot_delta<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<SnapshotDeltaResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn train_step_stream<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 TrainStepRequest, ) -> Pin<Box<dyn Future<Output = Result<MoqStreamHandle>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn export_peft_adapter<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 ExportPeftRequest, ) -> Pin<Box<dyn Future<Output = Result<ExportPeftResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn merge_lora<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 MergeLoraRequest, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn create_lora_stream<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 LoraConfig, ) -> Pin<Box<dyn Future<Output = Result<MoqStreamHandle>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn load_lora_stream<'life0, 'life1, 'async_trait>( &'life0 self, value: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<MoqStreamHandle>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn save_lora_stream<'life0, 'life1, 'async_trait>( &'life0 self, value: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<MoqStreamHandle>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn save_adaptation_stream<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 SaveAdaptationRequest, ) -> Pin<Box<dyn Future<Output = Result<MoqStreamHandle>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn snapshot_delta_stream<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<MoqStreamHandle>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn export_peft_adapter_stream<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 ExportPeftRequest, ) -> Pin<Box<dyn Future<Output = Result<MoqStreamHandle>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn merge_lora_stream<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 MergeLoraRequest, ) -> Pin<Box<dyn Future<Output = Result<MoqStreamHandle>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn embed<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 EmbedImagesRequest, ) -> Pin<Box<dyn Future<Output = Result<EmbedImagesResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_layer_profile<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<LayerProfileResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§