Skip to content

Commit c9ecb7a

Browse files
authored
Fix qwen nan value issue on vllm (#12971)
* add to fix qwen nan value issue * update
1 parent cd109bb commit c9ecb7a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

python/llm/src/ipex_llm/vllm/xpu/model_convert.py

+6
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,12 @@ def _ipex_llm_load_model(self) -> None:
107107
modules = ["35.mlp", "36.mlp", "37.mlp", "38.mlp", "39.mlp"]
108108
else:
109109
modules = None
110+
not_convert_o_proj = os.getenv("IPEX_LLM_NOT_CONVERT_O_PROJ", None)
111+
if not_convert_o_proj is not None:
112+
# only use to avoid nan value in o_proj running DeepSeek-R1-Distill-Qwen-14B
113+
modules = ["o_proj"]
114+
else:
115+
modules = None
110116
if "minicpm" in self.vllm_config.model_config.model.lower():
111117
modules = ["vpm", "resampler"]
112118
if "internvl2" in self.vllm_config.model_config.model.lower():

0 commit comments

Comments
 (0)