#[non_exhaustive]pub struct RepoAdapter {
pub id: String,
pub format: AdapterFormat,
pub files: Vec<RepoFile>,
pub size: u64,
pub architecture: Option<String>,
pub base_model: Option<String>,
pub rank: Option<u32>,
pub alpha: Option<f32>,
}Expand description
One LoRA adapter in a repo (Hub::adapters).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: StringThe GGUF file stem, or the PEFT directory’s name (the repo’s name for one at the root).
format: AdapterFormat§files: Vec<RepoFile>The files to fetch: the GGUF, or adapter_config.json then the weights.
size: u64§architecture: Option<String>general.architecture of a GGUF adapter; PEFT configs don’t say.
base_model: Option<String>The base model as a Hub id: from the GGUF header, PEFT’s base_model_name_or_path, or the
repo’s tags.
rank: Option<u32>PEFT r; GGUF adapters don’t record it.
alpha: Option<f32>adapter.lora.alpha or PEFT lora_alpha.
Trait Implementations§
Source§impl Clone for RepoAdapter
impl Clone for RepoAdapter
Source§impl Debug for RepoAdapter
impl Debug for RepoAdapter
Source§impl<'de> Deserialize<'de> for RepoAdapter
impl<'de> Deserialize<'de> for RepoAdapter
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for RepoAdapter
impl PartialEq for RepoAdapter
Source§impl Serialize for RepoAdapter
impl Serialize for RepoAdapter
impl StructuralPartialEq for RepoAdapter
Auto Trait Implementations§
impl Forget for RepoAdapter
impl Freeze for RepoAdapter
impl Move for RepoAdapter
impl RefUnwindSafe for RepoAdapter
impl Send for RepoAdapter
impl Sync for RepoAdapter
impl Unpin for RepoAdapter
impl UnsafeUnpin for RepoAdapter
impl UnwindSafe for RepoAdapter
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