Skip to content

Commit

Permalink
add PhiMoE
Browse files Browse the repository at this point in the history
  • Loading branch information
CSY-ModelCloud committed Jan 20, 2025
1 parent 2f37666 commit 09ae504
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gptqmodel/models/auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
from .definitions.opt import OPTGPTQ # noqa: E402
from .definitions.ovis import OvisGPTQ # noqa: E402
from .definitions.phi import PhiGPTQ # noqa: E402
from .definitions.phi3 import Phi3GPTQ # noqa: E402
from .definitions.phi3 import Phi3GPTQ, PhiMoEGPTQForCausalLM # noqa: E402
from .definitions.qwen import QwenGPTQ # noqa: E402
from .definitions.qwen2 import Qwen2GPTQ # noqa: E402
from .definitions.qwen2_moe import Qwen2MoeGPTQ # noqa: E402
Expand Down Expand Up @@ -124,6 +124,7 @@
"gemma2": Gemma2GPTQ,
"phi": PhiGPTQ,
"phi3": Phi3GPTQ,
"phimoe": PhiMoEGPTQForCausalLM,
"mpt": MPTGPTQ,
"minicpm": MiniCPMGPTQ,
"minicpm3":MiniCPM3GPTQ,
Expand Down
2 changes: 2 additions & 0 deletions gptqmodel/models/definitions/phi3.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ class Phi3GPTQ(BaseGPTQModel):
]

class PhiMoEGPTQForCausalLM(BaseGPTQModel):
require_pkgs_version = ["transformers<=4.44.2"]

layer_type = "PhiMoEDecoderLayer"
layers_block_name = "model.layers"
base_modules = ["model.embed_tokens", "model.norm"]
Expand Down

0 comments on commit 09ae504

Please sign in to comment.