Current environment
Python: 3.11.14
OS: Linux
afd-plugin commit: 49f0fe83c7146df83d10e0de80f37d17f08adc11
vLLM version/checkout: v0.19.1
Reproduction
Start an AFD NPU Attention instance with DBO enabled and leave worker_cls at its default value, "auto":
vllm serve "$MODEL" \
--host 0.0.0.0 \
--port 8006 \
--tensor-parallel-size 1 \
--data-parallel-size 1 \
--enable-expert-parallel \
--max_num_batched_tokens 64 \
--max_num_seqs 64 \
--enable-dbo \
--dbo-decode-token-threshold 2 \
--dbo-prefill-token-threshold 12 \
--ubatch-size 2 \
--seed 1024 \
--max-model-len 8192 \
--compilation-config '{"cudagraph_mode": "FULL_DECODE_ONLY", "cudagraph_capture_sizes": ['64']}' \
--additional-config '{
"afd": {
"role": "attention",
"connector": "CAMP2pAFDConnector",
"host": "127.0.0.1",
"port": 29666,
"num_attention_ranks": 1,
"num_ffn_ranks": 1
}
}'
Do not pass --worker-cls.
The issue is not model-specific. It applies when the following conditions are present:
AFD NPU config
worker_cls == "auto"
enable_dbo == True or ubatch_size > 1
enable_sp == False
Expected behavior
worker_cls="auto" should select the role-specific AFD NPU worker:
role=attention
→ afd_plugin.v1.worker.npu.AFDNPUAttentionWorker
role=ffn
→ afd_plugin.v1.worker.npu.AFDNPUFFNWorker
AFD-owned NPU ubatching should pass VllmConfig construction without requiring users to specify --worker-cls manually.
The temporary DeepEP backend used only for native vLLM validation should remain in place until validation completes. The intended AFD runtime backend may then be restored.
Actual behavior and logs
Startup fails while constructing VllmConfig, before any Worker or ModelRunner is created:
(APIServer pid=5884) INFO 08-03 23:04:11 [utils.py:1213] Block size is set to 128 if prefix cache or chunked prefill is enabled.
(APIServer pid=5884) INFO 08-03 23:04:11 [platform.py:566] Set PYTORCH_NPU_ALLOC_CONF=expandable_segments:True
(APIServer pid=5884) Traceback (most recent call last):
(APIServer pid=5884) File "/usr/local/python3.11.14/bin/vllm", line 6, in
(APIServer pid=5884) sys.exit(main())
(APIServer pid=5884) ^^^^^^
(APIServer pid=5884) File "/vllm-workspace/vllm/vllm/entrypoints/cli/main.py", line 75, in main
(APIServer pid=5884) args.dispatch_function(args)
(APIServer pid=5884) File "/vllm-workspace/vllm/vllm/entrypoints/cli/serve.py", line 122, in cmd
(APIServer pid=5884) uvloop.run(run_server(args))
(APIServer pid=5884) File "/usr/local/python3.11.14/lib/python3.11/site-packages/uvloop/init.py", line 92, in run
(APIServer pid=5884) return runner.run(wrapper())
(APIServer pid=5884) ^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=5884) File "/usr/local/python3.11.14/lib/python3.11/asyncio/runners.py", line 118, in run
(APIServer pid=5884) return self._loop.run_until_complete(task)
(APIServer pid=5884) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=5884) File "uvloop/loop.pyx", line 1518, in uvloop.loop.Loop.run_until_complete
(APIServer pid=5884) File "/usr/local/python3.11.14/lib/python3.11/site-packages/uvloop/init.py", line 48, in wrapper
(APIServer pid=5884) return await main
(APIServer pid=5884) ^^^^^^^^^^
(APIServer pid=5884) File "/vllm-workspace/vllm/vllm/entrypoints/openai/api_server.py", line 672, in run_server
(APIServer pid=5884) await run_server_worker(listen_address, sock, args, **uvicorn_kwargs)
(APIServer pid=5884) File "/vllm-workspace/vllm/vllm/entrypoints/openai/api_server.py", line 686, in run_server_worker
(APIServer pid=5884) async with build_async_engine_client(
(APIServer pid=5884) File "/usr/local/python3.11.14/lib/python3.11/contextlib.py", line 210, in aenter
(APIServer pid=5884) return await anext(self.gen)
(APIServer pid=5884) ^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=5884) File "/vllm-workspace/vllm/vllm/entrypoints/openai/api_server.py", line 100, in build_async_engine_client
(APIServer pid=5884) async with build_async_engine_client_from_engine_args(
(APIServer pid=5884) File "/usr/local/python3.11.14/lib/python3.11/contextlib.py", line 210, in aenter
(APIServer pid=5884) return await anext(self.gen)
(APIServer pid=5884) ^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=5884) File "/vllm-workspace/vllm/vllm/entrypoints/openai/api_server.py", line 124, in build_async_engine_client_from_engine_args
(APIServer pid=5884) vllm_config = engine_args.create_engine_config(usage_context=usage_context)
(APIServer pid=5884) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=5884) File "/home/cyj/code/afd-plugin/afd_plugin/compat/patches/config_validation.py", line 66, in create_engine_config
(APIServer pid=5884) config = _original_create_engine_config(
(APIServer pid=5884) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=5884) File "/vllm-workspace/vllm/vllm/engine/arg_utils.py", line 1967, in create_engine_config
(APIServer pid=5884) config = VllmConfig(
(APIServer pid=5884) ^^^^^^^^^^^
(APIServer pid=5884) File "/usr/local/python3.11.14/lib/python3.11/site-packages/pydantic/_internal/_dataclasses.py", line 121, in init
(APIServer pid=5884) s.pydantic_validator.validate_python(ArgsKwargs(args, kwargs), self_instance=s)
(APIServer pid=5884) pydantic_core._pydantic_core.ValidationError: 1 validation error for VllmConfig
(APIServer pid=5884) Assertion failed, Microbatching currently only supports the deepep_low_latency and deepep_high_throughput all2all backend. flashinfer_all2allv is not supported. To fix use --all2all-backend=deepep_low_latency or --all2all-backend=deepep_high_throughput and install the DeepEP kernels. [type=assertion_error, input_value=ArgsKwargs((), {'model_co... 'shutdown_timeout': 0}), input_type=ArgsKwargs]
(APIServer pid=5884) For further information visit https://errors.pydantic.dev/2.13/v/assertion_error
(APIServer pid=5884) [ERROR] 2026-08-03-23:04:11 (PID:5884, Device:-1, RankID:-1) ERR99999 UNKNOWN applicaiton exception
(APIServer pid=5884) sys:1: DeprecationWarning: builtin type swigvarlink has no module attribute
AFD configuration
--additional-config '{
"afd": {
"role": "attention",
"connector": "CAMP2pAFDConnector",
"host": "127.0.0.1",
"port": 29666,
"num_attention_ranks": 1,
"num_ffn_ranks": 1
}
Before submitting
Current environment
Reproduction
Start an AFD NPU Attention instance with DBO enabled and leave worker_cls at its default value, "auto":
Do not pass --worker-cls.
The issue is not model-specific. It applies when the following conditions are present:
Expected behavior
worker_cls="auto" should select the role-specific AFD NPU worker:
AFD-owned NPU ubatching should pass VllmConfig construction without requiring users to specify --worker-cls manually.
The temporary DeepEP backend used only for native vLLM validation should remain in place until validation completes. The intended AFD runtime backend may then be restored.
Actual behavior and logs
AFD configuration
Before submitting