pub struct LoraAdapter {
pub path: PathBuf,
pub arch: String,
pub alpha: f32,
pub task_name: String,
pub prompt_prefix: String,
pub pairs: BTreeMap<String, LoraPair>,
pub skipped_norms: Vec<String>,
}Expand description
A parsed adapter file, not yet matched against a base model.
Fields§
§path: PathBuf§arch: Stringgeneral.architecture, compared against the base’s.
alpha: f32adapter.lora.alpha, 0.0 when the file carries none.
task_name: Stringadapter.lora.task_name / adapter.lora.prompt_prefix, the two
metadata strings GET /lora-adapters reports upstream
(common.cpp:1274-1277, server-task.cpp:1616-1617); empty
when absent, as there.
prompt_prefix: String§pairs: BTreeMap<String, LoraPair>Base tensor name -> its pair, in name order so an attach walks deterministically.
skipped_norms: Vec<String>_norm.weight tensors the file carries and llama.cpp ignores.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LoraAdapter
impl RefUnwindSafe for LoraAdapter
impl Send for LoraAdapter
impl Sync for LoraAdapter
impl Unpin for LoraAdapter
impl UnsafeUnpin for LoraAdapter
impl UnwindSafe for LoraAdapter
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> 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