pub struct LlamaServerApplicator { /* private fields */ }Expand description
llama-server へのモデル適用
Implementations§
Source§impl LlamaServerApplicator
impl LlamaServerApplicator
Sourcepub fn new(config: LlamaServerConfig) -> Self
pub fn new(config: LlamaServerConfig) -> Self
新しい Applicator を作成
Trait Implementations§
Source§impl ModelApplicator for LlamaServerApplicator
impl ModelApplicator for LlamaServerApplicator
Source§fn apply<'life0, 'life1, 'async_trait>(
&'life0 self,
model: &'life1 TrainedModel,
) -> Pin<Box<dyn Future<Output = Result<(), ApplicatorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn apply<'life0, 'life1, 'async_trait>(
&'life0 self,
model: &'life1 TrainedModel,
) -> Pin<Box<dyn Future<Output = Result<(), ApplicatorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
モデルを適用する(非同期)
Source§fn rollback<'life0, 'life1, 'async_trait>(
&'life0 self,
to: &'life1 LoraModelId,
) -> Pin<Box<dyn Future<Output = Result<(), ApplicatorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn rollback<'life0, 'life1, 'async_trait>(
&'life0 self,
to: &'life1 LoraModelId,
) -> Pin<Box<dyn Future<Output = Result<(), ApplicatorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
指定したモデルにロールバック(非同期)
Source§fn current(&self) -> Option<TrainedModel>
fn current(&self) -> Option<TrainedModel>
現在適用中のモデル
Source§fn previous_model_id(&self) -> Option<LoraModelId>
fn previous_model_id(&self) -> Option<LoraModelId>
前のモデル ID(rollback 用)
Auto Trait Implementations§
impl !Freeze for LlamaServerApplicator
impl RefUnwindSafe for LlamaServerApplicator
impl Send for LlamaServerApplicator
impl Sync for LlamaServerApplicator
impl Unpin for LlamaServerApplicator
impl UnwindSafe for LlamaServerApplicator
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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