mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-10-23 22:18:06 +08:00
chore(lora): support mixtral in lora example (#343)
This commit is contained in:
@@ -56,6 +56,8 @@ if __name__ == "__main__":
|
||||
for l in model.model.layers[-lora_layers:]:
|
||||
l.self_attn.q_proj = LoRALinear.from_linear(l.self_attn.q_proj)
|
||||
l.self_attn.v_proj = LoRALinear.from_linear(l.self_attn.v_proj)
|
||||
if hasattr(l, "block_sparse_moe"):
|
||||
l.block_sparse_moe.gate = LoRALinear.from_linear(l.block_sparse_moe.gate)
|
||||
|
||||
model.update(tree_unflatten(adapters))
|
||||
fused_linears = [
|
||||
|
Reference in New Issue
Block a user