Skip to content

Qualcomm AI Engine Direct - Gemma4 Text model enablement#20979

Open
DannyYuyang-quic wants to merge 1 commit into
pytorch:mainfrom
CodeLinaro:dev1/danny/gemma4
Open

Qualcomm AI Engine Direct - Gemma4 Text model enablement#20979
DannyYuyang-quic wants to merge 1 commit into
pytorch:mainfrom
CodeLinaro:dev1/danny/gemma4

Conversation

@DannyYuyang-quic

Copy link
Copy Markdown
Contributor

Summary

Gemma4 Text model enablement

Test plan

python examples/qualcomm/oss_scripts/llama/llama.py --build_folder build-android --device ${SERIAL_NUM} --soc_model ${SOC_MODEL} --temperature 0 --model_mode kv--max_seq_len 1024 --prefill_ar_len 128 --decoder_model gemma4-e2b --prompt "I would like to learn python, could you teach me with a simple example?" --calib_tasks wikitext --calib_limit 1 --embedding-quantize '4,32'

Summary:
 - Add a Gemma4 model compatible with static llama
@pytorch-bot

pytorch-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ 1 New Failure, 1 Unrelated Failure, 1 Unclassified Failure

As of commit 507a79d with merge base 5bfbe1d (image):

NEW FAILURE - The following job has failed:

UNCLASSIFIED FAILURE - DrCI could not classify the following job because the workflow did not run on the merge base. The failure may be pre-existing on trunk or introduced by this PR:

FLAKY - The following job failed but was likely due to flakiness present on trunk:

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 Jul 16, 2026
@DannyYuyang-quic

DannyYuyang-quic commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

@psiddh Hi,
This PR adds support for the Gemma4 text model.

We chose a standalone implementation because Gemma4's architecture differs substantially from the current static_llama architecture.

Once more Gemma 4-like architectures (e.g., YOCO or per-layer embedding variants) are supported, perhaps around 4-5 models, it may make sense to revisit the design and refactor them into a unified architecture (static llama path).

cc: @shewu-quic @winskuo-quic @haowhsu-quic @chenweng-quic @abhinaykukkadapu

@DannyYuyang-quic

Copy link
Copy Markdown
Contributor Author

@pytorchbot label "release notes: qualcomm"

@pytorch-bot pytorch-bot Bot added the release notes: qualcomm Changes to the Qualcomm backend delegate label Jul 20, 2026
@DannyYuyang-quic
DannyYuyang-quic marked this pull request as ready for review July 20, 2026 03:51
@psiddh

psiddh commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

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.

2 participants