pub struct LoraSpec {
pub path: PathBuf,
pub scale: f32,
}Expand description
One --lora FNAME or --lora-scaled FNAME:SCALE, before the file
is opened. Parsed in ONE place for the CLI and the server, so the
two cannot read a:b:0.5 differently.
Fields§
§path: PathBuf§scale: f32Implementations§
Source§impl LoraSpec
impl LoraSpec
Sourcepub fn plain(path: impl Into<PathBuf>) -> Self
pub fn plain(path: impl Into<PathBuf>) -> Self
--lora FNAME: scale 1, as arg.cpp:2869 pushes it.
Sourcepub fn parse_scaled(spec: &str) -> Result<Self, String>
pub fn parse_scaled(spec: &str) -> Result<Self, String>
--lora-scaled FNAME:SCALE (arg.cpp:2878-2885). The LAST colon
splits, so a path with a drive letter or a colon in a directory
name still parses; llama.cpp splits on every colon and refuses
those.
Trait Implementations§
impl StructuralPartialEq for LoraSpec
Auto Trait Implementations§
impl Freeze for LoraSpec
impl RefUnwindSafe for LoraSpec
impl Send for LoraSpec
impl Sync for LoraSpec
impl Unpin for LoraSpec
impl UnsafeUnpin for LoraSpec
impl UnwindSafe for LoraSpec
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> 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