[Bug]: ValueError: There is no module or parameter named 'mlp_AR' in TransformersForCausalLM
🔎 Search before asking
- [x] I have searched the PaddleOCR Docs and found no similar bug report.
- [x] I have searched the PaddleOCR Issues and found no similar bug report.
- [x] I have searched the PaddleOCR Discussions and found no similar bug report.
🐛 Bug (问题描述)
运行vllm上的demo时 load vllm的LLM类时报错 1 from vllm import LLM, SamplingParams ----> 2 llm = LLM(model='/data/pe-task/ai_storage_gcp_dsocr_test/20251118/PaddleOCR-VL-0.9B', trust_remote_code=True)
File ~/.local/lib/python3.10/site-packages/vllm/entrypoints/llm.py:297, in LLM.init(self, model, runner, convert, tokenizer, tokenizer_mode, skip_tokenizer_init, trust_remote_code, allowed_local_media_path, allowed_media_domains, tensor_parallel_size, dtype, quantization, revision, tokenizer_revision, seed, gpu_memory_utilization, swap_space, cpu_offload_gb, enforce_eager, disable_custom_all_reduce, hf_token, hf_overrides, mm_processor_kwargs, pooler_config, override_pooler_config, structured_outputs_config, kv_cache_memory_bytes, compilation_config, logits_processors, **kwargs) 294 log_non_default_args(engine_args) 296 # Create the Engine (autoselects V0 vs V1) --> 297 self.llm_engine = LLMEngine.from_engine_args( 298 engine_args=engine_args, usage_context=UsageContext.LLM_CLASS) 299 self.engine_class = type(self.llm_engine) 301 self.request_counter = Counter()
File ~/.local/lib/python3.10/site-packages/vllm/v1/engine/llm_engine.py:177, in LLMEngine.from_engine_args(cls, engine_args, usage_context, stat_loggers, enable_multiprocessing) 174 enable_multiprocessing = True 176 # Create the LLMEngine. --> 177 return cls(vllm_config=vllm_config, 178 executor_class=executor_class, 179 log_stats=not engine_args.disable_log_stats, 180 usage_context=usage_context, 181 stat_loggers=stat_loggers, 182 multiprocess_mode=enable_multiprocessing)
File ~/.local/lib/python3.10/site-packages/vllm/v1/engine/llm_engine.py:114, in LLMEngine.init(self, vllm_config, executor_class, log_stats, usage_context, stat_loggers, mm_registry, use_cached_outputs, multiprocess_mode) 111 self.output_processor.tracer = tracer 113 # EngineCore (gets EngineCoreRequests and gives EngineCoreOutputs) --> 114 self.engine_core = EngineCoreClient.make_client( 115 multiprocess_mode=multiprocess_mode, 116 asyncio_mode=False, 117 vllm_config=vllm_config, 118 executor_class=executor_class, 119 log_stats=self.log_stats, 120 ) 122 self.logger_manager: Optional[StatLoggerManager] = None 123 if self.log_stats:
File ~/.local/lib/python3.10/site-packages/vllm/v1/engine/core_client.py:80, in EngineCoreClient.make_client(multiprocess_mode, asyncio_mode, vllm_config, executor_class, log_stats) 76 return EngineCoreClient.make_async_mp_client( 77 vllm_config, executor_class, log_stats) 79 if multiprocess_mode and not asyncio_mode: ---> 80 return SyncMPClient(vllm_config, executor_class, log_stats) 82 return InprocClient(vllm_config, executor_class, log_stats)
File ~/.local/lib/python3.10/site-packages/vllm/v1/engine/core_client.py:602, in SyncMPClient.init(self, vllm_config, executor_class, log_stats) 600 def init(self, vllm_config: VllmConfig, executor_class: type[Executor], 601 log_stats: bool): --> 602 super().init( 603 asyncio_mode=False, 604 vllm_config=vllm_config, 605 executor_class=executor_class, 606 log_stats=log_stats, 607 ) 609 self.is_dp = self.vllm_config.parallel_config.data_parallel_size > 1 610 self.outputs_queue = queue.QueueUnion[EngineCoreOutputs, Exception]
File ~/.local/lib/python3.10/site-packages/vllm/v1/engine/core_client.py:448, in MPClient.init(self, asyncio_mode, vllm_config, executor_class, log_stats, client_addresses) 444 self.stats_update_address = client_addresses.get( 445 "stats_update_address") 446 else: 447 # Engines are managed by this client. --> 448 with launch_core_engines(vllm_config, executor_class, 449 log_stats) as (engine_manager, 450 coordinator, 451 addresses): 452 self.resources.coordinator = coordinator 453 self.resources.engine_manager = engine_manager
File /usr/lib/python3.10/contextlib.py:142, in _GeneratorContextManager.exit(self, typ, value, traceback) 140 if typ is None: 141 try: --> 142 next(self.gen) 143 except StopIteration: 144 return False
File ~/.local/lib/python3.10/site-packages/vllm/v1/engine/utils.py:732, in launch_core_engines(vllm_config, executor_class, log_stats, num_api_servers) 729 yield local_engine_manager, coordinator, addresses 731 # Now wait for engines to start. --> 732 wait_for_engine_startup( 733 handshake_socket, 734 addresses, 735 engines_to_handshake, 736 parallel_config, 737 vllm_config.cache_config, 738 local_engine_manager, 739 coordinator.proc if coordinator else None, 740 )
File ~/.local/lib/python3.10/site-packages/vllm/v1/engine/utils.py:785, in wait_for_engine_startup(handshake_socket, addresses, core_engines, parallel_config, cache_config, proc_manager, coord_process) 783 if coord_process is not None and coord_process.exitcode is not None: 784 finished[coord_process.name] = coord_process.exitcode --> 785 raise RuntimeError("Engine core initialization failed. " 786 "See root cause above. " 787 f"Failed core proc(s): {finished}") 789 # Receive HELLO and READY messages from the input socket. 790 eng_identity, ready_msg_bytes = handshake_socket.recv_multipart()
RuntimeError: Engine core initialization failed. See root cause above. Failed core proc(s): {}
🏃♂️ Environment (运行环境)
aiohappyeyeballs 2.6.1 aiohttp 3.12.15 aiosignal 1.4.0 alembic 1.13.3 annotated-types 0.7.0 anyio 3.7.1 argon2-cffi 25.1.0 argon2-cffi-bindings 21.2.0 arrow 1.3.0 asgiref 3.10.0 astor 0.8.1 asttokens 3.0.0 async-generator 1.10 async-lru 2.0.5 async-timeout 5.0.1 attrs 25.3.0 babel 2.17.0 backcall 0.2.0 beautifulsoup4 4.14.0 blake3 1.0.7 bleach 6.2.0 cachetools 6.2.0 cbor2 5.7.0 certifi 2025.10.5 cffi 2.0.0 charset-normalizer 3.4.3 click 8.3.0 cloudpickle 3.1.1 comm 0.2.3 compressed-tensors 0.11.0 cupy-cuda12x 13.6.0 debugpy 1.8.16 decorator 5.2.1 defusedxml 0.7.1 depyf 0.19.0 dill 0.4.0 diskcache 5.6.3 distro 1.9.0 Django 5.2.6 dnspython 2.8.0 einops 0.8.1 email-validator 2.3.0 entrypoints 0.4 exceptiongroup 1.3.0 executing 2.2.1 fastapi 0.118.0 fastapi-cli 0.0.13 fastapi-cloud-cli 0.3.0 fastjsonschema 2.21.2 fastrlock 0.8.3 filelock 3.19.1 flashinfer-python 0.3.0 fqdn 1.5.1 frozendict 2.4.6 frozenlist 1.7.0 fsspec 2024.10.0 gguf 0.17.1 greenlet 3.2.4 h11 0.16.0 hf-xet 1.1.7 httpcore 1.0.9 httptools 0.6.4 httpx 0.28.1 huggingface-hub 0.35.3 idna 3.10 image 1.5.33 interegular 0.3.3 ipykernel 6.17.0 ipython 8.12.0 ipython-genutils 0.2.0 ipywidgets 8.1.7 isoduration 20.11.0 jedi 0.19.2 Jinja2 3.1.6 jiter 0.11.0 joblib 1.5.2 json5 0.12.0 jsonpointer 3.0.0 jsonschema 4.24.0 jsonschema-specifications 2025.9.1 jupyter 1.1.1 jupyter_client 7.4.4 jupyter-console 6.4.4 jupyter-contrib-core 0.4.2 jupyter-contrib-nbextensions 0.7.0 jupyter_core 4.11.2 jupyter-events 0.12.0 jupyter-highlight-selected-word 0.2.0 jupyter-lsp 2.2.5 jupyter_nbextensions_configurator 0.6.4 jupyter-server 1.21.0 jupyter_server_terminals 0.5.3 jupyterhub 1.0.0.dev0 jupyterlab 3.0.16 jupyterlab-pygments 0.2.2 jupyterlab_server 2.27.3 jupyterlab_widgets 3.0.15 lark 1.2.2 llguidance 0.7.30 llvmlite 0.44.0 lm-format-enforcer 0.11.3 lxml 6.0.0 Mako 1.3.10 markdown-it-py 4.0.0 MarkupSafe 3.0.3 matplotlib-inline 0.1.7 mdurl 0.1.2 mistral_common 1.8.5 mistune 2.0.5 mpmath 1.3.0 msgpack 1.1.1 msgspec 0.19.0 multidict 6.6.4 nbclassic 0.5.6 nbclient 0.7.0 nbconvert 7.8.0 nbformat 5.10.3 nest-asyncio 1.6.0 networkx 3.4.2 ninja 1.13.0 notebook 6.4.0 notebook_shim 0.2.4 numba 0.61.2 numpy 1.26.4 nvidia-cublas-cu12 12.8.4.1 nvidia-cuda-cupti-cu12 12.8.90 nvidia-cuda-nvrtc-cu12 12.8.93 nvidia-cuda-runtime-cu12 12.8.90 nvidia-cudnn-cu12 9.10.2.21 nvidia-cudnn-frontend 1.14.1 nvidia-cufft-cu12 11.3.3.83 nvidia-cufile-cu12 1.13.1.3 nvidia-curand-cu12 10.3.9.90 nvidia-cusolver-cu12 11.7.3.90 nvidia-cusparse-cu12 12.5.8.93 nvidia-cusparselt-cu12 0.7.1 nvidia-ml-py 13.580.82 nvidia-nccl-cu12 2.27.3 nvidia-nvjitlink-cu12 12.8.93 nvidia-nvtx-cu12 12.8.90 oauthlib 3.3.1 openai 2.1.0 openai-harmony 0.0.4 opencv-python-headless 4.11.0.86 outlines_core 0.2.11 overrides 7.7.0 packaging 25.0 pamela 1.2.0 pandas 2.2.3 pandocfilters 1.5.1 parso 0.8.5 partial-json-parser 0.2.1.1.post4 pexpect 4.9.0 pickleshare 0.7.5 pillow 11.3.0 pip 25.0.1 platformdirs 4.4.0 prometheus_client 0.23.1 prometheus-fastapi-instrumentator 7.1.0 prompt_toolkit 3.0.52 propcache 0.4.0 protobuf 6.32.1 psutil 7.0.0 ptyprocess 0.7.0 pure_eval 0.2.3 py-cpuinfo 9.0.0 pyarrow 18.0.0 pyavi 0.0.29 pybase64 1.4.2 pycountry 24.6.1 pycparser 2.22 pycryptodomex 3.21.0 pydantic 2.12.0 pydantic_core 2.41.1 pydantic-extra-types 2.10.5 Pygments 2.16.1 pynvml 13.0.1 pyorc 0.9.0 python-dateutil 2.9.0.post0 python-dotenv 1.1.1 python-json-logger 3.3.0 python-multipart 0.0.20 pytz 2025.2 PyYAML 6.0.3 pyzmq 26.4.0 ray 2.49.2 referencing 0.36.2 regex 2025.9.18 requests 2.32.5 rfc3339-validator 0.1.4 rfc3986-validator 0.1.1 rich 14.1.0 rich-toolkit 0.15.1 rignore 0.7.0 rpds-py 0.20.1 safetensors 0.6.2 scikit-learn 1.5.2 scipy 1.15.3 Send2Trash 1.8.3 sentencepiece 0.2.1 sentry-sdk 2.39.0 setproctitle 1.3.7 setuptools 59.6.0 shellingham 1.5.4 six 1.17.0 sniffio 1.3.1 soundfile 0.13.1 soupsieve 2.6 soxr 0.5.0.post1 SQLAlchemy 2.0.43 sqlparse 0.5.3 stack-data 0.6.3 starlette 0.48.0 sympy 1.14.0 terminado 0.17.0 threadpoolctl 3.6.0 tiktoken 0.11.0 tinycss2 1.4.0 tokenizers 0.22.0 tomli 2.2.1 torch 2.8.0 torchaudio 2.8.0 torchvision 0.23.0 tornado 6.2 tqdm 4.67.1 traitlets 5.5.0 transformers 4.57.1 triton 3.4.0 typer 0.19.2 types-python-dateutil 2.9.0.20250708 typing_extensions 4.15.0 typing-inspection 0.4.2 tzdata 2025.2 uri-template 1.3.0 urllib3 2.5.0 uvicorn 0.37.0 uvloop 0.21.0 vllm 0.11.0 watchfiles 1.1.0 wcwidth 0.2.13 webcolors 24.11.1 webencodings 0.5.1 websocket-client 1.8.0 websockets 15.0.1 wheel 0.37.1 widgetsnbextension 4.0.14 xformers 0.0.32.post1 xgrammar 0.1.25 yarl 1.21.0
🌰 Minimal Reproducible Example (最小可复现问题的Demo)
vllm serve PaddlePaddle/PaddleOCR-VL
--trust-remote-code
--max-num-batched-tokens 16384
--no-enable-prefix-caching
--mm-processor-cache-gb 0