pytorch / pytorch/executorch

Error occurred when running Qwen 3.5 examples

Open
#18,832 12 comments 1 reaction 2 assignees View on GitHub

@kirklandsign is already working on this.

Since Apr 13, 2026.

  • #18857 by @copilot-swe-agent — closed without merging
bug module: llm triaged
Dominant language
Python
Stars
5k
Forks
1.2k
Avg merge
2d 10h
Merged PRs (30d)
581

Description

Excuse me. I'm trying to run the example of Qwen 3.5. I managed to export the .pte model. But when I try to run the native Runner:

python -m executorch.examples.models.llama.runner.native \
  --model qwen3_5_0_8b \
  --pte qwen3_5_0_8b_fp32.pte \
  --tokenizer /path/to/tokenizer.json \
  --tokenizer_config /path/to/tokenizer_config.json \
  --prompt "<|im_start|>user\nHello<|im_end|>\n<|im_start|>assistant\n" \
  --params examples/models/qwen3_5/config/0_8b_config.json \
  --max_len 128 \
  -kv \
  --temperature 0.3

I met the error below:

Traceback (most recent call last):
File "/.../executorch/extension/llm/custom_ops/custom_ops.py", line 26, in
op = torch.ops.llama.sdpa_with_kv_cache.default
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/.../miniforge3/envs/execut_main_new/lib/python3.12/site-packages/torch/_ops.py", line 1379, in getattr
raise AttributeError(
AttributeError: '_OpNamespace' 'llama' object has no attribute 'sdpa_with_kv_cache'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/.../executorch/examples/models/llama/runner/native.py", line 26, in
from executorch.extension.llm.custom_ops import custom_ops # noqa # usort: skip
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/.../executorch/extension/llm/custom_ops/custom_ops.py", line 44, in
assert len(libs) == 1, f"Expected 1 library but got {len(libs)}"
^^^^^^^^^^^^^^
AssertionError: Expected 1 library but got 0

cc @larryliu0820 @mergennachin @cccclai @helunwencser @jackzhxng @digantdesai

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.