Gemma-4-E4B-it: Optimized for Qualcomm Devices

Gemma is a family of open models built by Google DeepMind. Gemma 4 models are multimodal, handling text and image input (with audio supported on small models) and generating text output. This release includes open-weights models in both pre-trained and instruction-tuned variants. Gemma 4 features a context window of up to 256K tokens and maintains multilingual support in over 140 languages.

This is based on the implementation of Gemma-4-E4B-it found here. This repository contains pre-exported model files optimized for Qualcomm® devices. You can use the Qualcomm® AI Hub Models library to export with custom configurations. More details on model performance across various devices, can be found here.

Qualcomm AI Hub Models uses Qualcomm AI Hub Workbench to compile, profile, and evaluate this model. Sign up to run these models on a hosted Qualcomm® device.

Deploying Gemma-4-E4B-it on-device

Follow the GenieX quickstart to install GenieX and deploy the model on a target device.

See the LLM-on-Genie tutorial to run with the Genie runtime. Note: Genie support will be deprecated soon.

Getting Started

There are two ways to deploy this model on your device:

Option 1: Download Pre-Exported Models

Below are pre-exported model assets ready for deployment.

Runtime Precision Chipset SDK Versions Download
GENIEX_LLAMACPP q4_0 Universal Download

For more device-specific assets and performance metrics, visit Gemma-4-E4B-it on Qualcomm® AI Hub.

Option 2: Export with Custom Configurations

Use the Qualcomm® AI Hub Models Python library to compile and export the model with your own:

  • Custom weights (e.g., fine-tuned checkpoints)
  • Custom input shapes
  • Target device and runtime configurations

This option is ideal if you need to customize the model beyond the default configuration provided here.

See our repository for Gemma-4-E4B-it on GitHub for usage instructions.

Model Details

Model Type: Model_use_case.text_generation

Model Stats:

  • Input sequence length for Prompt Processor: 128
  • Minimum QNN SDK version required: 2.45.0
  • Model architecture: Transformer with SigLIP-style ViT Vision Encoder, Per-Layer Embeddings (PLE), interleaved sliding-window/global attention with Grouped Query Attention (GQA), and shared KV layers.
  • Number of parameters: 4B (effective)
  • Precision: w4a16
  • Response Rate: Rate of response generation after the first response token.
  • Supported languages: Multilingual (trained on 140+ languages)
  • TTFT: Time To First Token is the time it takes to generate the first response token. This is expressed as a range because it varies based on the length of the prompt.
  • Use: Initiate conversation with prompt-processor and then token generator for subsequent iterations.

Performance Summary

Model Runtime Precision Chipset Context Length Response Rate (tokens per second) Time To First Token (range, seconds)
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® 8 Elite Gen 5 For Galaxy Mobile 512 16.954635 1.3684773333333333 - 5.473909333333333
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® 8 Elite Gen 5 For Galaxy Mobile 512 17.146292 0.5495743333333333 - 2.198297333333333
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® 8 Elite Gen 5 For Galaxy Mobile 512 17.602489 0.11555166666666665 - 0.4622066666666666
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® 8 Elite Gen 5 For Galaxy Mobile 4096 12.985192 2.1392613548387094 - 68.4563633548387
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® 8 Elite Gen 5 For Galaxy Mobile 4096 12.62247 0.8456005806451612 - 27.059218580645158
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® 8 Elite Gen 5 For Galaxy Mobile 4096 16.119912 0.1393976451612903 - 4.46072464516129
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® 8 Elite For Galaxy Mobile 512 17.193389 1.2445173333333333 - 4.978069333333333
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® 8 Elite For Galaxy Mobile 512 14.849922 0.6911736666666667 - 2.7646946666666667
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® 8 Elite For Galaxy Mobile 512 14.937384 0.13882733333333333 - 0.5553093333333333
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® 8 Elite For Galaxy Mobile 4096 11.908334 2.243354870967742 - 71.78735587096774
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® 8 Elite For Galaxy Mobile 4096 11.831827 0.9855867741935483 - 31.538776774193547
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® 8 Elite For Galaxy Mobile 4096 13.356142 0.17591751612903225 - 5.629360516129032
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® X2 Elite 512 29.167487 0.29066666666666663 - 1.1626666666666665
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® X2 Elite 512 16.218531 0.291628 - 1.166512
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® X2 Elite 512 16.145522 0.102197 - 0.408788
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® X2 Elite 4096 25.823924 0.36572687096774187 - 11.70325987096774
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® X2 Elite 4096 13.554605 0.31662596774193547 - 10.132030967741935
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® X2 Elite 4096 15.877584 0.10571687096774193 - 3.382939870967742
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® X Elite 512 27.931407 0.48403566666666664 - 1.9361426666666666
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® X Elite 512 16.844902 0.5613933333333333 - 2.245573333333333
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® X Elite 512 10.97035 0.24684566666666666 - 0.9873826666666666
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® X Elite 4096 21.643968 0.817821064516129 - 26.17027406451613
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® X Elite 4096 13.121695 0.6896633225806451 - 22.069226322580644
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® X Elite 4096 9.931811 0.23839499999999997 - 7.628639999999999
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Qualcomm® Dragonwing™ IQ-8275 512 6.30344 4.350470666666666 - 17.401882666666666
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Qualcomm® Dragonwing™ IQ-8275 512 1.754613 6.338600333333333 - 25.354401333333332
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Qualcomm® Dragonwing™ IQ-8275 512 1.39194 0.676997 - 2.707988
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Qualcomm® Dragonwing™ IQ-8275 4096 3.513769 5.411270838709677 - 173.16066683870966
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Qualcomm® Dragonwing™ IQ-8275 4096 1.4437 7.12685729032258 - 228.05943329032257
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Qualcomm® Dragonwing™ IQ-8275 4096 1.380948 0.49993090322580647 - 15.997788903225807
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Qualcomm® Dragonwing™ IQ-9075 512 13.439978 1.7480915 - 6.992366
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Qualcomm® Dragonwing™ IQ-9075 512 13.431804 1.75437625 - 7.017505
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Qualcomm® Dragonwing™ IQ-9075 512 8.859328 0.3919085 - 1.567634
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Qualcomm® Dragonwing™ IQ-X7181 512 27.931407 0.48403566666666664 - 1.9361426666666666
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Qualcomm® Dragonwing™ IQ-X7181 512 16.844902 0.5613933333333333 - 2.245573333333333
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Qualcomm® Dragonwing™ IQ-X7181 512 10.97035 0.24684566666666666 - 0.9873826666666666
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Qualcomm® Dragonwing™ Q-8750 512 17.193389 1.2445173333333333 - 4.978069333333333
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Qualcomm® Dragonwing™ Q-8750 512 14.849922 0.6911736666666667 - 2.7646946666666667
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Qualcomm® Dragonwing™ Q-8750 512 14.937384 0.13882733333333333 - 0.5553093333333333
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Qualcomm® Dragonwing™ IQ-9075 4096 10.071341 2.1266885312499997 - 68.05403299999999
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Qualcomm® Dragonwing™ IQ-9075 4096 10.054127 2.0949564375 - 67.038606
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Qualcomm® Dragonwing™ IQ-9075 4096 7.626485 0.5007065625 - 16.02261
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Qualcomm® Dragonwing™ IQ-X7181 4096 21.643968 0.817821064516129 - 26.17027406451613
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Qualcomm® Dragonwing™ IQ-X7181 4096 13.121695 0.6896633225806451 - 22.069226322580644
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Qualcomm® Dragonwing™ IQ-X7181 4096 9.931811 0.23839499999999997 - 7.628639999999999
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Qualcomm® Dragonwing™ Q-8750 4096 11.908334 2.243354870967742 - 71.78735587096774
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Qualcomm® Dragonwing™ Q-8750 4096 11.831827 0.9855867741935483 - 31.538776774193547
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Qualcomm® Dragonwing™ Q-8750 4096 13.356142 0.17591751612903225 - 5.629360516129032

License

  • The license for the original implementation of Gemma-4-E4B-it can be found here.

References

Community

Usage and Limitations

This model may not be used for or in connection with any of the following applications:

  • Accessing essential private and public services and benefits;
  • Administration of justice and democratic processes;
  • Assessing or recognizing the emotional state of a person;
  • Biometric and biometrics-based systems, including categorization of persons based on sensitive characteristics;
  • Education and vocational training;
  • Employment and workers management;
  • Exploitation of the vulnerabilities of persons resulting in harmful behavior;
  • General purpose social scoring;
  • Law enforcement;
  • Management and operation of critical infrastructure;
  • Migration, asylum and border control management;
  • Predictive policing;
  • Real-time remote biometric identification in public spaces;
  • Recommender systems of social media platforms;
  • Scraping of facial images (from the internet or otherwise); and/or
  • Subliminal manipulation
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support