Skip to content

Qualcomm AI Engine Direct - Streaming Mimi Enablement #10570

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

winskuo-quic
Copy link
Collaborator

@winskuo-quic winskuo-quic commented Apr 30, 2025

Summary

Stateless(Static) Streaming Mimi Decoder Enablement.

Scripts to run

  1. Run examples/models/moshi/mimi/install_requirements.sh, manually change pip install moshi==0.2.3 for this since we are currently building static mimi decoder on top of 0.2.3 version

  2. Run the example script

  • CPU Encoder with QNN Decoder
    python examples/qualcomm/oss_scripts/moshi/mimi.py -b build-android -s $DEVICE -m SM8650 --use_cpu_encoder

  • QNN Encoder/Decoder
    python examples/qualcomm/oss_scripts/moshi/mimi.py -b build-android -s $DEVICE -m SM8650

Stats for SM8650

  • SQNR Scores Improvement after Streaming Mode Enablement
    • CPU Encoder with QNN Decoder: 4.7 -> 7.8
    • QNN Encoder/Decoder: 0.46 -> 0.88
  • Encoder: 3.0ms/chunk
  • Decoder: 5.9ms/chunk

Follow ups

  • Add README
  • UT and Community CI enablement
  • Inference Speed Optimization
  • Accuracy Improvement

@winskuo-quic winskuo-quic requested a review from cccclai as a code owner April 30, 2025 02:47
Copy link

pytorch-bot bot commented Apr 30, 2025

🔗 Helpful Links

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

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

✅ No Failures

As of commit f373833 with merge base 95a1db5 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@facebook-github-bot facebook-github-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 Apr 30, 2025
@winskuo-quic
Copy link
Collaborator Author

Hi @cccclai, @iseeyuan,
This PR is to enable Stateless (Static) Mimi.
Execution commands and some of the stats are shared in the Summary section.
Also, it would be appreciated if you could confirm the license for this PR is written correctly.
As discussed previously, it requires source code modification in order to enable the model.
The following 4 files listed below involves source code modification.

  • examples/qualcomm/oss_scripts/moshi/model/static_conv.py
  • examples/qualcomm/oss_scripts/moshi/model/static_convtr.py
  • examples/qualcomm/oss_scripts/moshi/model/static_mimi.py
  • examples/qualcomm/oss_scripts/moshi/model/static_seanet_decoder.py

Please let me know if you believe something is not done correctly.
Thanks

@cccclai
Copy link
Contributor

cccclai commented May 29, 2025

Hey there seems to be lint error but those are not related to your changes? Mind rebasing and they should be gone.

@winskuo-quic winskuo-quic force-pushed the dev1/winskuo/streaming_mimi_enablement branch from e44e919 to f373833 Compare June 2, 2025 02:54
@facebook-github-bot
Copy link
Contributor

@cccclai has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@cccclai cccclai added the release notes: qualcomm Changes to the Qualcomm backend delegate label Jun 2, 2025
Copy link
Contributor

@cccclai cccclai left a comment

Choose a reason for hiding this comment

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

Thank you!

@cccclai cccclai merged commit f30a3b1 into pytorch:main Jun 5, 2025
103 of 104 checks passed
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