add phimoe to tunner

This commit is contained in:
Prince Canuma
2024-08-24 08:47:11 +02:00
parent 6b1d27a39f
commit 0b20d08d1b

View File

@@ -96,6 +96,7 @@ def linear_to_lora_layers(
"stablelm",
"qwen2",
"qwen2_moe",
"phimoe",
"gemma",
"gemma2",
"starcoder2",
@@ -104,7 +105,7 @@ def linear_to_lora_layers(
"deepseek",
]:
keys = set(["self_attn.q_proj", "self_attn.v_proj"])
if model.model_type == "mixtral":
if model.model_type in ["mixtral", "phimoe"]:
keys.add("block_sparse_moe.gate")
if model.model_type == "qwen2_moe":
keys.add("mlp.gate")