Skip to content

Commit

Permalink
add vLLM glm4 fix (intel-analytics#12474)
Browse files Browse the repository at this point in the history
  • Loading branch information
gc-fu authored and przemekmatusiak committed Dec 10, 2024
1 parent 46514b2 commit 1e8ba3d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions python/llm/src/ipex_llm/vllm/xpu/model_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,7 @@ def _ipex_llm_load_model(self) -> None:
from ipex_llm import optimize_model
import os
not_convert_last_mlp = os.getenv("IPEX_LLM_NOT_CONVERT_LAST_MLP", None)
is_glm4_model = "glm-4" in self.model_config.model.lower()
is_codegeex4_model = "codegeex4-all" in self.model_config.model.lower()
if not_convert_last_mlp is not None or is_glm4_model or is_codegeex4_model:
if not_convert_last_mlp is not None:
# only use to avoid nan value in last mlp forward running glm4-9b-chat
modules = ["35.mlp", "36.mlp", "37.mlp", "38.mlp", "39.mlp"]
else:
Expand Down

0 comments on commit 1e8ba3d

Please sign in to comment.