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)
  • 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)
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® 8 Elite Gen 5 For Galaxy Mobile 512 18.244492
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® 8 Elite Gen 5 For Galaxy Mobile 512 17.336764
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® 8 Elite Gen 5 For Galaxy Mobile 512 18.636821
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® 8 Elite Gen 5 For Galaxy Mobile 4096 12.730099
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® 8 Elite Gen 5 For Galaxy Mobile 4096 14.417882
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® 8 Elite Gen 5 For Galaxy Mobile 4096 17.162125
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® 8 Elite For Galaxy Mobile 512 17.744435
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® 8 Elite For Galaxy Mobile 512 16.910439
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® 8 Elite For Galaxy Mobile 512 15.030141
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® 8 Elite For Galaxy Mobile 4096 11.486791
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® 8 Elite For Galaxy Mobile 4096 7.027658
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® 8 Elite For Galaxy Mobile 4096 13.515597
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® X2 Elite 512 30.268126
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® X2 Elite 512 16.89168
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® X2 Elite 512 25.608482
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® X2 Elite 4096 24.387679
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® X2 Elite 4096 15.132514
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Snapdragon® X2 Elite 4096 24.611664
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Qualcomm® Dragonwing™ IQ-X7181 512 27.931407
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Qualcomm® Dragonwing™ IQ-X7181 512 16.844902
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Qualcomm® Dragonwing™ IQ-X7181 512 10.97035
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Qualcomm® Dragonwing™ Q-8750 512 17.744435
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Qualcomm® Dragonwing™ Q-8750 512 16.910439
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Qualcomm® Dragonwing™ Q-8750 512 15.030141
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Qualcomm® Dragonwing™ IQ-X7181 4096 21.643968
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Qualcomm® Dragonwing™ IQ-X7181 4096 13.121695
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Qualcomm® Dragonwing™ IQ-X7181 4096 9.931811
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Qualcomm® Dragonwing™ Q-8750 4096 11.486791
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Qualcomm® Dragonwing™ Q-8750 4096 7.027658
Gemma-4-E4B-it GENIEX_LLAMACPP q4_0 Qualcomm® Dragonwing™ Q-8750 4096 13.515597

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