pub enum LoraModule {
QProj,
KProj,
VProj,
OProj,
GateProj,
UpProj,
DownProj,
OutProj,
}Variants§
QProj
KProj
VProj
OProj
GateProj
UpProj
DownProj
OutProj
2026-09-25: The GDN block’s output projection (linear_attn.out_proj),
linear-attention value width to hidden. OProj instead reads the
attention head width and applies only to full-attention layers.
Implementations§
Source§impl LoraModule
impl LoraModule
pub const ALL: [LoraModule; 8]
pub fn is_dense_ffn(&self) -> bool
pub fn is_gdn_out(&self) -> bool
Sourcepub fn applies_to_layer(&self, cfg: &ModelConfig, layer: usize) -> bool
pub fn applies_to_layer(&self, cfg: &ModelConfig, layer: usize) -> bool
2026-09-25: Whether layer can carry this module: q/k/v/o on
full-attention layers; gate/up/down on every layer of a model with no
routed experts (num_experts == 0); out_proj on every other layer.
pool_slot_bytes, module_slot_offsets, pack_slot and the RDMA
landing path all filter by it, so the reserved and the written offsets
agree.
Sourcepub fn peft_name(&self) -> &'static str
pub fn peft_name(&self) -> &'static str
2026-09-25: The module’s name in a PEFT target_modules list.
Sourcepub fn dims(&self, cfg: &ModelConfig) -> (usize, usize)
pub fn dims(&self, cfg: &ModelConfig) -> (usize, usize)
2026-09-25: (out_dim, in_dim) of the base projection. The adapter’s A
is [r, in_dim] and its B is [out_dim, r]. On a gated-attention model
(attn_gated) q_proj’s output includes the gate, so it is twice
num_attention_heads * head_dim.
Trait Implementations§
Source§impl Clone for LoraModule
impl Clone for LoraModule
Source§fn clone(&self) -> LoraModule
fn clone(&self) -> LoraModule
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LoraModule
impl Debug for LoraModule
Source§impl Ord for LoraModule
impl Ord for LoraModule
Source§fn cmp(&self, other: &LoraModule) -> Ordering
fn cmp(&self, other: &LoraModule) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for LoraModule
impl PartialEq for LoraModule
Source§impl PartialOrd for LoraModule
impl PartialOrd for LoraModule
impl Copy for LoraModule
impl Eq for LoraModule
impl StructuralPartialEq for LoraModule
Auto Trait Implementations§
impl Freeze for LoraModule
impl RefUnwindSafe for LoraModule
impl Send for LoraModule
impl Sync for LoraModule
impl Unpin for LoraModule
impl UnwindSafe for LoraModule
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.