MCPcopy
hub / github.com/OpenBMB/VoxCPM / LoRAConfig

Class LoRAConfig

src/voxcpm/model/voxcpm.py:92–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90
91
92class LoRAConfig(BaseModel):
93 enable_lm: bool = False # Apply LoRA to base_lm + residual_lm
94 enable_dit: bool = False # Apply LoRA to VoxCPMLocDiT
95 enable_proj: bool = False # Apply LoRA to projection Linear layers
96
97 r: int = 8
98 alpha: int = 16
99 dropout: float = 0.0
100
101 # Target linear layer names for LM & DiT (matched by attribute name)
102 target_modules_lm: list[str] = ["q_proj", "v_proj", "k_proj", "o_proj"]
103 target_modules_dit: list[str] = ["q_proj", "v_proj", "k_proj", "o_proj"]
104 # Projection layer attribute names to find on VoxCPMModel
105 target_proj_modules: list[str] = ["enc_to_lm_proj", "lm_to_dit_proj", "res_to_dit_proj"]
106
107
108VoxCPMConfig.model_rebuild()

Callers 6

get_default_lora_configFunction · 0.90
load_modelFunction · 0.90
mainFunction · 0.90
__init__Method · 0.50
trainFunction · 0.50

Calls

no outgoing calls

Tested by 1

mainFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…