gemma-4

This repository hosts the gemma-4 models exported for the React Native ExecuTorch library as ExecuTorch .pte programs, ready to run on device.

Variants

Path Backend Precision Context length
e2b/mlx/gemma_4_e2b_mlx_int4.pte mlx int4 4,096
e2b/vulkan/gemma_4_e2b_vulkan_8da4w.pte vulkan 8da4w 2,048
e2b/xnnpack/gemma_4_e2b_xnnpack_8da4w.pte xnnpack 8da4w + fp16 4,096

Repository structure

config.json                                28 B
e2b/mlx/config.json                        1.2 KiB
e2b/mlx/gemma_4_e2b_mlx_int4.pte           2.4 GiB
e2b/tokenizer.json                         30.7 MiB
e2b/tokenizer_config.json                  21.8 KiB
e2b/vulkan/config.json                     1.3 KiB
e2b/vulkan/gemma_4_e2b_vulkan_8da4w.pte    2.8 GiB
e2b/xnnpack/config.json                    1.3 KiB
e2b/xnnpack/gemma_4_e2b_xnnpack_8da4w.pte  3.0 GiB

XNNPACK precision

The XNNPACK export uses mixed precision: MLP and language-model head linears use 8da4w, while attention projections and the PLE residual output projections remain fp16. Token embeddings remain int4. The small PLE context projection weights are materialized from their quantized values before lowering to preserve dequantization semantics. The model filename and runtime API remain unchanged; maximum prefill is 512 tokens and context length is 4,096 tokens.

Compatibility

These files are published for the ExecuTorch v1.4.1 runtime. ExecuTorch gives no forward compatibility guarantee, so an older runtime may fail to load them.

To use them in React Native ExecuTorch, pass the model constant shipped in the library's model registry to the corresponding task pipeline. See the documentation.

To load these files in your own ExecuTorch runtime, read the compatibility note first.

Downloads last month
5,428
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for software-mansion/react-native-executorch-gemma-4

Quantized
(46)
this model

Collection including software-mansion/react-native-executorch-gemma-4