pub struct LlamaServerConfig {
pub base_model_path: PathBuf,
pub host: String,
pub port: u16,
pub n_gpu_layers: u32,
pub ctx_size: u32,
pub parallel: u32,
pub pid_file: PathBuf,
pub log_file: PathBuf,
pub server_path: String,
}Expand description
llama-server の設定
Fields§
§base_model_path: PathBufベースモデルのパス (GGUF)
host: Stringホスト
port: u16ポート
n_gpu_layers: u32GPU レイヤー数
ctx_size: u32コンテキストサイズ
parallel: u32並列スロット数
pid_file: PathBufPID ファイルパス
log_file: PathBufログファイルパス
server_path: Stringllama-server コマンドパス
Implementations§
Source§impl LlamaServerConfig
impl LlamaServerConfig
Sourcepub fn base_model(self, path: impl Into<PathBuf>) -> Self
pub fn base_model(self, path: impl Into<PathBuf>) -> Self
ベースモデルパスを設定
Sourcepub fn n_gpu_layers(self, n: u32) -> Self
pub fn n_gpu_layers(self, n: u32) -> Self
GPU レイヤー数を設定
Trait Implementations§
Source§impl Clone for LlamaServerConfig
impl Clone for LlamaServerConfig
Source§fn clone(&self) -> LlamaServerConfig
fn clone(&self) -> LlamaServerConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LlamaServerConfig
impl Debug for LlamaServerConfig
Auto Trait Implementations§
impl Freeze for LlamaServerConfig
impl RefUnwindSafe for LlamaServerConfig
impl Send for LlamaServerConfig
impl Sync for LlamaServerConfig
impl Unpin for LlamaServerConfig
impl UnwindSafe for LlamaServerConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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