-
Notifications
You must be signed in to change notification settings - Fork 619
Open
Labels
BugSomething isn't workingSomething isn't working
Description
启动脚本为
model_path="/root/paddlejob/workspace/env_run/output/EB45T-21B-Paddle"
python -m fastdeploy.entrypoints.openai.api_server --model ${model_path} \
--max-num-seqs 256 --max-model-len 32768 \
--port 8888 --engine-worker-queue-port 7102 \
--metrics-port 7203 --tensor-parallel-size 4 \
报错为
Traceback (most recent call last):
File "/root/paddlejob/workspace/env_run/output/liujundong01/FastDeploy/fastdeploy/engine/../worker/worker_process.py", line 758, in <module>
run_worker_proc()
File "/root/paddlejob/workspace/env_run/output/liujundong01/FastDeploy/fastdeploy/engine/../worker/worker_process.py", line 739, in run_worker_proc
worker_proc.load_model()
File "/root/paddlejob/workspace/env_run/output/liujundong01/FastDeploy/fastdeploy/engine/../worker/worker_process.py", line 432, in load_model
self.worker.load_model()
File "/root/paddlejob/workspace/env_run/output/liujundong01/FastDeploy/fastdeploy/worker/gpu_worker.py", line 164, in load_model
self.model_runner.load_model()
File "/root/paddlejob/workspace/env_run/output/liujundong01/FastDeploy/fastdeploy/worker/gpu_model_runner.py", line 751, in load_model
self.model = get_model_from_loader(fd_config=self.fd_config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/paddlejob/workspace/env_run/output/liujundong01/FastDeploy/fastdeploy/model_executor/model_loader.py", line 51, in get_model_from_loader
model = model_loader.load_model(fd_config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/paddlejob/workspace/env_run/output/liujundong01/FastDeploy/fastdeploy/model_executor/model_loader.py", line 119, in load_model
model.set_state_dict(state_dict)
File "/root/paddlejob/workspace/env_run/output/liujundong01/FastDeploy/fd_ljd_py312/lib/python3.12/site-packages/decorator.py", line 235, in fun
return caller(func, *(extras + args), **kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/paddlejob/workspace/env_run/output/liujundong01/FastDeploy/fd_ljd_py312/lib/python3.12/site-packages/paddle/base/dygraph/base.py", line 396, in _decorate_function
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/root/paddlejob/workspace/env_run/output/liujundong01/FastDeploy/fastdeploy/model_executor/models/ernie4_5_moe.py", line 414, in set_state_dict
self.ernie.load_state_dict(state_dict)
File "/root/paddlejob/workspace/env_run/output/liujundong01/FastDeploy/fastdeploy/model_executor/models/ernie4_5_moe.py", line 355, in load_state_dict
self.layers[i].load_state_dict(state_dict)
File "/root/paddlejob/workspace/env_run/output/liujundong01/FastDeploy/fastdeploy/model_executor/models/ernie4_5_moe.py", line 271, in load_state_dict
self.self_attn.load_state_dict(state_dict)
File "/root/paddlejob/workspace/env_run/output/liujundong01/FastDeploy/fastdeploy/model_executor/models/ernie4_5_moe.py", line 204, in load_state_dict
self.qkv_proj.load_state_dict(state_dict)
File "/root/paddlejob/workspace/env_run/output/liujundong01/FastDeploy/fastdeploy/model_executor/layers/linear.py", line 488, in load_state_dict
self.load_weight(state_dict)
File "/root/paddlejob/workspace/env_run/output/liujundong01/FastDeploy/fastdeploy/model_executor/layers/linear.py", line 472, in load_weight
self.weight.set_value(weight_tensor)
File "/root/paddlejob/workspace/env_run/output/liujundong01/FastDeploy/fd_ljd_py312/lib/python3.12/site-packages/paddleformers/utils/paddle_patch.py", line 125, in enhance_set_value
return origin_set_value(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/paddlejob/workspace/env_run/output/liujundong01/FastDeploy/fd_ljd_py312/lib/python3.12/site-packages/decorator.py", line 235, in fun
return caller(func, *(extras + args), **kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/paddlejob/workspace/env_run/output/liujundong01/FastDeploy/fd_ljd_py312/lib/python3.12/site-packages/paddle/base/wrapped_decorator.py", line 40, in __impl__
return wrapped_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/paddlejob/workspace/env_run/output/liujundong01/FastDeploy/fd_ljd_py312/lib/python3.12/site-packages/paddle/base/framework.py", line 722, in __impl__
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/root/paddlejob/workspace/env_run/output/liujundong01/FastDeploy/fd_ljd_py312/lib/python3.12/site-packages/paddle/base/dygraph/tensor_patch_methods.py", line 226, in set_value
assert self.shape == list(
^^^^^^^^^^^^^^^^^^^
AssertionError: Variable Shape not match, Variable [ qkv_parallel_linear_0.w_0 ] need tensor with shape [2560, 896] but load set tensor with shape [2560, 3584]
当Python环境为3.10不会有这个问题。
Python3.12的问题通过拉取最新源创建新分支重新编译,重复过多次都可稳定可复现。
Copilot
Metadata
Metadata
Labels
BugSomething isn't workingSomething isn't working