Skip to content

Conversation

DannyYuyang-quic
Copy link
Contributor

Qualcomm AI Engine Direct - add seq_mse_candidates setting to SmolLM3 and fixed a bug in the graph drawer

Summary

  • add seq_mse_candidates setting to SmolLM3
  • fixed a bug in the graph drawer

Test plan

DrawGraph Unit test

python -m backends.qualcomm.tests.test_qnn_delegate TestQNNFloatingPointUtils.test_qnn_backend_draw_graph -s ${SERIAL_NUM} -m ${SOC_MODEL}  -b build-android -a . --executorch_root .
python -m backends.qualcomm.tests.test_qnn_delegate TestQNNQuantizedUtils.test_qnn_backend_draw_graph -s ${SERIAL_NUM} -m ${SOC_MODEL}  -b build-android -a . --executorch_root .

SmolLM3
script in ./examples/qualcomm/oss_scripts/llama/README.md at SmolLM3 part

Copy link

pytorch-bot bot commented Sep 15, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/14295

Note: Links to docs will display an error until the docs builds have been completed.

❌ 2 New Failures, 1 Cancelled Job

As of commit 11e794c with merge base eec95d0 (image):

NEW FAILURES - The following jobs have failed:

CANCELLED JOB - The following job was cancelled. Please retry:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 15, 2025
@DannyYuyang-quic
Copy link
Contributor Author

Hi @cccclai, this patch adds the default seq_mse_candidates setting following the landing of PR #12700, and also fixes a directory bug in the graph drawer.
Please have a look, thanks!!

@DannyYuyang-quic
Copy link
Contributor Author

@pytorchbot label "release notes: qualcomm"

@pytorch-bot pytorch-bot bot added the release notes: qualcomm Changes to the Qualcomm backend delegate label Sep 15, 2025
@facebook-github-bot
Copy link
Contributor

@cccclai has imported this pull request. If you are a Meta employee, you can view this in D82478041.

ptq = QuantDtype.use_16a4w_block
group_size = 32
masked_softmax = True
seq_mse_candidates = 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does 0 seq_mse_candidates mean

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for asking the question about seq_mse_candidates setting.
Setting seq_mse_candidates = 0 means that SeqMSE is disabled during quantization.
For more details, can refer:
https://github.com/pytorch/executorch/blob/main/examples/qualcomm/oss_scripts/llama/decoder_utils.py#L367-L375

@cccclai cccclai merged commit d61dbb9 into pytorch:main Sep 16, 2025
131 of 137 checks passed
StrycekSimon pushed a commit to nxp-upstream/executorch that referenced this pull request Sep 23, 2025
… and fixed a bug in the graph drawer (pytorch#14295)

Qualcomm AI Engine Direct - add seq_mse_candidates setting to SmolLM3
and fixed a bug in the graph drawer
### Summary
 - add seq_mse_candidates setting to SmolLM3
 - fixed a bug in the graph drawer

### Test plan
DrawGraph Unit test
``` bash
python -m backends.qualcomm.tests.test_qnn_delegate TestQNNFloatingPointUtils.test_qnn_backend_draw_graph -s ${SERIAL_NUM} -m ${SOC_MODEL}  -b build-android -a . --executorch_root .
python -m backends.qualcomm.tests.test_qnn_delegate TestQNNQuantizedUtils.test_qnn_backend_draw_graph -s ${SERIAL_NUM} -m ${SOC_MODEL}  -b build-android -a . --executorch_root .
```
SmolLM3
script in `./examples/qualcomm/oss_scripts/llama/README.md` at SmolLM3
part
@DannyYuyang-quic
Copy link
Contributor Author

@pytorchbot cherry-pick --onto release/1.0 -c critical

pytorchbot pushed a commit that referenced this pull request Sep 25, 2025
… and fixed a bug in the graph drawer (#14295)

Qualcomm AI Engine Direct - add seq_mse_candidates setting to SmolLM3
and fixed a bug in the graph drawer
### Summary
 - add seq_mse_candidates setting to SmolLM3
 - fixed a bug in the graph drawer

### Test plan
DrawGraph Unit test
``` bash
python -m backends.qualcomm.tests.test_qnn_delegate TestQNNFloatingPointUtils.test_qnn_backend_draw_graph -s ${SERIAL_NUM} -m ${SOC_MODEL}  -b build-android -a . --executorch_root .
python -m backends.qualcomm.tests.test_qnn_delegate TestQNNQuantizedUtils.test_qnn_backend_draw_graph -s ${SERIAL_NUM} -m ${SOC_MODEL}  -b build-android -a . --executorch_root .
```
SmolLM3
script in `./examples/qualcomm/oss_scripts/llama/README.md` at SmolLM3
part

(cherry picked from commit d61dbb9)
@pytorchbot
Copy link
Collaborator

Cherry picking #14295

The cherry pick PR is at #14571 and it is recommended to link a critical cherry pick PR with an issue. The following tracker issues are updated:

Details for Dev Infra team Raised by workflow job

@DannyYuyang-quic
Copy link
Contributor Author

This PR fixes the bug in the config for smolLM3 and should be included in release/1.0
Without this fix, an error will occur during smolLM3 model compilation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. release notes: qualcomm Changes to the Qualcomm backend delegate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants