Gemma 4 E4B IT — ONNX for WebGPU in the browser
This is the "Medium" model package behind Axiya. Axiya turns scanned PDFs into accessible HTML. The model runs inside Chrome, on the user's own GPU. No document leaves the computer.
The weights come from Google's Gemma 4 E4B IT QAT release, repacked for ONNX Runtime Web. The graphs need the Axiya onnxruntime-web fork (op SplitMaskedSoftmax, fp32 accumulation). The download is about 4.7 GB.
The build report below lists every input with its revision or sha256.
Gemma 4 E4B Q4 ONNX package (browser, ORT Web)
License: Apache 2.0 (Gemma 4 terms: https://ai.google.dev/gemma/docs/gemma_4_license). The graphs are
our own export with MIT tools (tools/gemma12b/mobius_export.py); the weights are Google's.
Rebuild: browser-prototype/tools/gemma12b/README.md in the BlinkFix repo.
Sources
| Input | Source | Revision / sha256 |
|---|---|---|
| Graph structure | mobius (onnxruntime/mobius 1c2dc4d, MIT) + Olive 0.13.0 k-quant (MIT), from google/gemma-4-E4B-it ee0ef60 (graph files only) | see below |
graph vision_encoder/model.onnx |
BlinkFix-models/mobius-e4b/q4 |
d914968f4dfed8482bec6f0b4c6260d544eb90732822b7bb8723898a2e07b814 (checked) |
Weights gemma-4-E4B-it-qat-UD-Q4_K_XL-plmp64.gguf |
local file | 98c001c1867db9a5475f902ee4a48dcedb919aa5ef5f4b67f7c3a3fdec825bec |
Weights gemma-4-E4B-it-mmproj.gguf |
local file | 7498a37cb619e55f2fcf87eb931f56e99389ed6d432e4c5c66110694c0d65578 |
| Tokenizer, chat template, configs | google/gemma-4-E4B-it |
ee0ef6023621cff504d758262d4e04895a5af4a2 |
| Norm-convention and layout checks (range reads) | google/gemma-4-E4B-it-qat-q4_0-unquantized |
476025a01dbf99361c062bbeca3d6a76bb4c4566 |
| PLE projection (F16, x64.0) | google/gemma-4-E4B-it-qat-q4_0-unquantized@476025a01dbf99361c062bbeca3d6a76bb4c4566 model.language_model.per_layer_model_projection.weight (range read) | bf16 b1896c3fa52dec675d7e8b6e52163c6ef58db513f95ce2dedae995be7a40f9be |
Graphs
| Graph | Inputs | Outputs |
|---|---|---|
vision.onnx |
pixel_values fp16 [1,N,768] (HF Gemma4ImageProcessor patches, 16 px, no padding rows), pixel_position_ids int64 [1,N,2] (x,y) |
image_features fp16 [N/9,2560] |
decoder.onnx |
input_ids int64 [B,S], image_features fp16 [N,2560], ple_rows float32 [B,S,10752] (see ple.json), attention_mask int64 [B,T], position_ids int64 [B,S], num_logits_to_keep int64 scalar. The embedding lookup reads the 4-bit lm_head table (one shared copy). KV cache for layers 0..23 only (layers 24..41 read layer 22 or 23), split layout: stable past_key_values.{0..23}.key fp16 [B,kv,d,P] (transposed), .value [B,kv,P,d]; recent past_recent.{0..23}.* |
logits fp16 [B,num_logits,262144], present.{0..23}.key [B,kv,d,R+S], .value [B,kv,R+S,d] |
kvmerge.onnx (no weights) |
the decoder's stable and recent cache inputs | merged.{0..23}.*: the next stable part |
ple.q4_0_*.bin, ple.json |
not a graph: the per-layer table's raw Q4_0 rows, read per token by the engine |
Files
| File | Bytes | sha256 |
|---|---|---|
chat_template.jinja |
18569 | 0a2c8073c878ab1da004bee933a998606537bbb62016310352c7285c3f01c5b5 |
config.json |
5145 | 33b10c02df3c2e8536cf323d29d53262aaa2f4d11dbe19bc729373fbe90295d4 |
decoder.h0.onnx |
1204047 | 550d928a399f36fbe8e8cfb3c81947e1cb7c5591ccfa6587fb45fe60c98f93e3 |
decoder.onnx |
1195070 | 1bc89f43495cbdd940858a0517937f373b0f8d2b7859658295d9db1c63117a2c |
decoder.onnx_data |
1991554048 | c13b6fa66b2c09d43dea5e2d723eaa5eeca15dcd6e0214fd21a36f132d7d8875 |
decoder.onnx_data_1 |
687087616 | c915a2a40da23464a20bf1f7451761a8400eee1892371addd76ada8de7615ca4 |
drafter.json |
473 | eda3d522305103779aa50fb9b0a9d66d22d07d201ef9929bfd652b882908d2b0 |
drafter.onnx |
29066 | 2826d9748b1d783d293618b40240cc61232c266fa2421273604e313cc2f56289 |
drafter.onnx_data |
69035008 | 2497cebcf38ef21de4fb102d642fa1484a02d67caf00a7b74047df2bba01cfb8 |
generation_config.json |
208 | d4226bbe3117d2d253ba4609720ba82c6c4ce4627a9a6ae05387c78983ac03de |
kvmerge.onnx |
14684 | d9a03f1ea1e8d4d0ec39427bbffef03c1e10a9d219baa65661ef223aadf6a70b |
ple.json |
1126 | 3cce7be1d901a1cf5c41ef1f0343627c25a45a6c06c200c9b19a1b54a3546de2 |
ple.q4_0_0.bin |
1585446912 | 7b2f87bece8df30347ae529ad30764dd3d6ca50587f499f727283d24692b6780 |
processor_config.json |
1689 | 32bdf45d2ad4cc29a0822ddd157a182de76644f0419a6228d151495256e9813c |
tokenizer.json |
32169626 | cc8d3a0ce36466ccc1278bf987df5f71db1719b9ca6b4118264f45cb627bfe0f |
tokenizer_config.json |
3082 | 9f4fec4b1dc6ecddf8f4a92e9caea5971c0e67d81309f3f9066a2bee8c362633 |
vision.onnx |
1246318 | 3810118051c8649fc8b2e8f6116f07a42c922d53a5a4771fee6963fb8f2d00fc |
vision.onnx_data |
359795712 | f74a5a02ad1c46b519b32f8a446b341ff6316621d5efcf5cd8a291531587dacd |
Build log
{
"qk_precision": "fp32",
"decoder": {
"causal_proof": {
"v_decoder.model.Unsqueeze_110": {
"causal": true,
"pad_blocked": true,
"window": 512,
"min_blocked_dist": 512,
"max_allowed_dist": 511
},
"v_decoder.model.Unsqueeze_124": {
"causal": true,
"pad_blocked": true,
"window": null,
"min_blocked_dist": null,
"max_allowed_dist": 1025
}
},
"attention": [
{
"name": "decoder/model/layers.0/self_attn/Attention_node_151",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 256,
"scale": 1.0,
"past_key": "past_key_values.0.key",
"past_value": "past_key_values.0.value",
"present_key": "present.0.key",
"present_value": "present.0.value",
"is_causal": 1
},
{
"name": "decoder/model/layers.1/self_attn/Attention_node_202",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 256,
"scale": 1.0,
"past_key": "past_key_values.1.key",
"past_value": "past_key_values.1.value",
"present_key": "present.1.key",
"present_value": "present.1.value",
"is_causal": 1
},
{
"name": "decoder/model/layers.2/self_attn/Attention_node_253",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 256,
"scale": 1.0,
"past_key": "past_key_values.2.key",
"past_value": "past_key_values.2.value",
"present_key": "present.2.key",
"present_value": "present.2.value",
"is_causal": 1
},
{
"name": "decoder/model/layers.3/self_attn/Attention_node_304",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 256,
"scale": 1.0,
"past_key": "past_key_values.3.key",
"past_value": "past_key_values.3.value",
"present_key": "present.3.key",
"present_value": "present.3.value",
"is_causal": 1
},
{
"name": "decoder/model/layers.4/self_attn/Attention_node_355",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 256,
"scale": 1.0,
"past_key": "past_key_values.4.key",
"past_value": "past_key_values.4.value",
"present_key": "present.4.key",
"present_value": "present.4.value",
"is_causal": 1
},
{
"name": "decoder/model/layers.5/self_attn/Attention_node_406",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 512,
"scale": 1.0,
"past_key": "past_key_values.5.key",
"past_value": "past_key_values.5.value",
"present_key": "present.5.key",
"present_value": "present.5.value",
"is_causal": 1
},
{
"name": "decoder/model/layers.6/self_attn/Attention_node_457",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 256,
"scale": 1.0,
"past_key": "past_key_values.6.key",
"past_value": "past_key_values.6.value",
"present_key": "present.6.key",
"present_value": "present.6.value",
"is_causal": 1
},
{
"name": "decoder/model/layers.7/self_attn/Attention_node_508",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 256,
"scale": 1.0,
"past_key": "past_key_values.7.key",
"past_value": "past_key_values.7.value",
"present_key": "present.7.key",
"present_value": "present.7.value",
"is_causal": 1
},
{
"name": "decoder/model/layers.8/self_attn/Attention_node_559",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 256,
"scale": 1.0,
"past_key": "past_key_values.8.key",
"past_value": "past_key_values.8.value",
"present_key": "present.8.key",
"present_value": "present.8.value",
"is_causal": 1
},
{
"name": "decoder/model/layers.9/self_attn/Attention_node_610",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 256,
"scale": 1.0,
"past_key": "past_key_values.9.key",
"past_value": "past_key_values.9.value",
"present_key": "present.9.key",
"present_value": "present.9.value",
"is_causal": 1
},
{
"name": "decoder/model/layers.10/self_attn/Attention_node_661",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 256,
"scale": 1.0,
"past_key": "past_key_values.10.key",
"past_value": "past_key_values.10.value",
"present_key": "present.10.key",
"present_value": "present.10.value",
"is_causal": 1
},
{
"name": "decoder/model/layers.11/self_attn/Attention_node_712",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 512,
"scale": 1.0,
"past_key": "past_key_values.11.key",
"past_value": "past_key_values.11.value",
"present_key": "present.11.key",
"present_value": "present.11.value",
"is_causal": 1
},
{
"name": "decoder/model/layers.12/self_attn/Attention_node_763",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 256,
"scale": 1.0,
"past_key": "past_key_values.12.key",
"past_value": "past_key_values.12.value",
"present_key": "present.12.key",
"present_value": "present.12.value",
"is_causal": 1
},
{
"name": "decoder/model/layers.13/self_attn/Attention_node_814",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 256,
"scale": 1.0,
"past_key": "past_key_values.13.key",
"past_value": "past_key_values.13.value",
"present_key": "present.13.key",
"present_value": "present.13.value",
"is_causal": 1
},
{
"name": "decoder/model/layers.14/self_attn/Attention_node_865",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 256,
"scale": 1.0,
"past_key": "past_key_values.14.key",
"past_value": "past_key_values.14.value",
"present_key": "present.14.key",
"present_value": "present.14.value",
"is_causal": 1
},
{
"name": "decoder/model/layers.15/self_attn/Attention_node_916",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 256,
"scale": 1.0,
"past_key": "past_key_values.15.key",
"past_value": "past_key_values.15.value",
"present_key": "present.15.key",
"present_value": "present.15.value",
"is_causal": 1
},
{
"name": "decoder/model/layers.16/self_attn/Attention_node_967",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 256,
"scale": 1.0,
"past_key": "past_key_values.16.key",
"past_value": "past_key_values.16.value",
"present_key": "present.16.key",
"present_value": "present.16.value",
"is_causal": 1
},
{
"name": "decoder/model/layers.17/self_attn/Attention_node_1018",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 512,
"scale": 1.0,
"past_key": "past_key_values.17.key",
"past_value": "past_key_values.17.value",
"present_key": "present.17.key",
"present_value": "present.17.value",
"is_causal": 1
},
{
"name": "decoder/model/layers.18/self_attn/Attention_node_1069",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 256,
"scale": 1.0,
"past_key": "past_key_values.18.key",
"past_value": "past_key_values.18.value",
"present_key": "present.18.key",
"present_value": "present.18.value",
"is_causal": 1
},
{
"name": "decoder/model/layers.19/self_attn/Attention_node_1120",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 256,
"scale": 1.0,
"past_key": "past_key_values.19.key",
"past_value": "past_key_values.19.value",
"present_key": "present.19.key",
"present_value": "present.19.value",
"is_causal": 1
},
{
"name": "decoder/model/layers.20/self_attn/Attention_node_1171",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 256,
"scale": 1.0,
"past_key": "past_key_values.20.key",
"past_value": "past_key_values.20.value",
"present_key": "present.20.key",
"present_value": "present.20.value",
"is_causal": 1
},
{
"name": "decoder/model/layers.21/self_attn/Attention_node_1222",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 256,
"scale": 1.0,
"past_key": "past_key_values.21.key",
"past_value": "past_key_values.21.value",
"present_key": "present.21.key",
"present_value": "present.21.value",
"is_causal": 1
},
{
"name": "decoder/model/layers.22/self_attn/Attention_node_1273",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 256,
"scale": 1.0,
"past_key": "past_key_values.22.key",
"past_value": "past_key_values.22.value",
"present_key": "present.22.key",
"present_value": "present.22.value",
"is_causal": 1
},
{
"name": "decoder/model/layers.23/self_attn/Attention_node_1324",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 512,
"scale": 1.0,
"past_key": "past_key_values.23.key",
"past_value": "past_key_values.23.value",
"present_key": "present.23.key",
"present_value": "present.23.value",
"is_causal": 1
},
{
"name": "decoder/model/layers.24/self_attn/Attention_node_1360",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 256,
"scale": 1.0,
"shared_from": "decoder/model/layers.22/self_attn/Attention_node_1273",
"is_causal": 1
},
{
"name": "decoder/model/layers.25/self_attn/Attention_node_1396",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 256,
"scale": 1.0,
"shared_from": "decoder/model/layers.22/self_attn/Attention_node_1273",
"is_causal": 1
},
{
"name": "decoder/model/layers.26/self_attn/Attention_node_1432",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 256,
"scale": 1.0,
"shared_from": "decoder/model/layers.22/self_attn/Attention_node_1273",
"is_causal": 1
},
{
"name": "decoder/model/layers.27/self_attn/Attention_node_1468",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 256,
"scale": 1.0,
"shared_from": "decoder/model/layers.22/self_attn/Attention_node_1273",
"is_causal": 1
},
{
"name": "decoder/model/layers.28/self_attn/Attention_node_1504",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 256,
"scale": 1.0,
"shared_from": "decoder/model/layers.22/self_attn/Attention_node_1273",
"is_causal": 1
},
{
"name": "decoder/model/layers.29/self_attn/Attention_node_1540",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 512,
"scale": 1.0,
"shared_from": "decoder/model/layers.23/self_attn/Attention_node_1324",
"is_causal": 1
},
{
"name": "decoder/model/layers.30/self_attn/Attention_node_1576",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 256,
"scale": 1.0,
"shared_from": "decoder/model/layers.22/self_attn/Attention_node_1273",
"is_causal": 1
},
{
"name": "decoder/model/layers.31/self_attn/Attention_node_1612",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 256,
"scale": 1.0,
"shared_from": "decoder/model/layers.22/self_attn/Attention_node_1273",
"is_causal": 1
},
{
"name": "decoder/model/layers.32/self_attn/Attention_node_1648",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 256,
"scale": 1.0,
"shared_from": "decoder/model/layers.22/self_attn/Attention_node_1273",
"is_causal": 1
},
{
"name": "decoder/model/layers.33/self_attn/Attention_node_1684",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 256,
"scale": 1.0,
"shared_from": "decoder/model/layers.22/self_attn/Attention_node_1273",
"is_causal": 1
},
{
"name": "decoder/model/layers.34/self_attn/Attention_node_1720",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 256,
"scale": 1.0,
"shared_from": "decoder/model/layers.22/self_attn/Attention_node_1273",
"is_causal": 1
},
{
"name": "decoder/model/layers.35/self_attn/Attention_node_1756",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 512,
"scale": 1.0,
"shared_from": "decoder/model/layers.23/self_attn/Attention_node_1324",
"is_causal": 1
},
{
"name": "decoder/model/layers.36/self_attn/Attention_node_1792",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 256,
"scale": 1.0,
"shared_from": "decoder/model/layers.22/self_attn/Attention_node_1273",
"is_causal": 1
},
{
"name": "decoder/model/layers.37/self_attn/Attention_node_1828",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 256,
"scale": 1.0,
"shared_from": "decoder/model/layers.22/self_attn/Attention_node_1273",
"is_causal": 1
},
{
"name": "decoder/model/layers.38/self_attn/Attention_node_1864",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 256,
"scale": 1.0,
"shared_from": "decoder/model/layers.22/self_attn/Attention_node_1273",
"is_causal": 1
},
{
"name": "decoder/model/layers.39/self_attn/Attention_node_1900",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 256,
"scale": 1.0,
"shared_from": "decoder/model/layers.22/self_attn/Attention_node_1273",
"is_causal": 1
},
{
"name": "decoder/model/layers.40/self_attn/Attention_node_1936",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 256,
"scale": 1.0,
"shared_from": "decoder/model/layers.22/self_attn/Attention_node_1273",
"is_causal": 1
},
{
"name": "decoder/model/layers.41/self_attn/Attention_node_1972",
"q_heads": 8,
"kv_heads": 2,
"head_dim": 512,
"scale": 1.0,
"shared_from": "decoder/model/layers.23/self_attn/Attention_node_1324",
"is_causal": 1
}
],
"kv_layout": "split",
"or_replaced": 0,
"mask_chain_on_cpu": [],
"mask_gate_no_bool_broadcast": [
"decoder/model/Where_node_108",
"decoder/model/Where_node_122"
],
"split_softmax_fused": 42,
"sliding_kv_trim": {
"sliding_layers": 35,
"mask_users": {
"SplitMaskedSoftmax": 35
},
"replaced_tile": "v_decoder.model.Unsqueeze_110/tile4",
"mask_source": "v_decoder.model.Unsqueeze_110/f32"
},
"zero_points_dropped": 343,
"sliced_hidden": "v_decoder.model.layers.41.Mul_1996",
"equal": [],
"table_bits": 4,
"decoder_files": [
"decoder.onnx_data",
"decoder.onnx_data_1"
],
"decoder_seconds": 3.5,
"seconds": 10.0
},
"embed": {
"ple_rows_input": {
"table_removed": "embedding.embed_tokens_per_layer.weight",
"input": "ple_rows",
"width": 10752,
"scale": 16.0,
"replaced": [
"embedding/embed_tokens_per_layer/Gather_node_47",
"embedding/embed_tokens_per_layer/Mul_node_48"
]
},
"mask_chain_on_cpu": [
"embedding/Cast_node_5"
],
"embed_equal": [
{
"node": "embedding/Equal_node_3",
"inputs": [
"input_ids",
"v_embedding.Constant_2"
],
"upstream_graph_inputs": [
"input_ids"
],
"upstream_ops": [
"Constant"
],
"action": "left as is"
}
],
"ple_projection": {
"source": "google/gemma-4-E4B-it-qat-q4_0-unquantized@476025a01dbf99361c062bbeca3d6a76bb4c4566 model.language_model.per_layer_model_projection.weight",
"bf16_sha256": "b1896c3fa52dec675d7e8b6e52163c6ef58db513f95ce2dedae995be7a40f9be",
"scale": 64.0,
"dtype": "float16 (exact)"
},
"embed_files": [
"embed.onnx_data"
],
"seconds": 7.0
},
"vision": {
"vision_files": [
"vision.onnx_data"
],
"vision_mmproj_tensors": 659,
"vision_inline_checked": 480,
"vision_layers": 16,
"vision_dtype": [
"float16",
"float32"
],
"seconds": 0.3
},
"ple": {
"ple": {
"files": [
"ple.q4_0_0.bin"
],
"bytes": 1585446912,
"rows": 262144
},
"seconds": 6.8
},
"shared_embed": {
"table_sha256": {
"decoder.lm_head.weight_t_Q4": "ab5e786da6d51af9d1b1512332bde204dca93618207157c9bce46e3a10396a4b",
"decoder.lm_head.weight_t_scales": "7c4327f3f0be8fd2c8153d140122b3f7b602e704b17866a5142eb3f79e0fc03b"
},
"embed_nodes": 27,
"added_initializers": [
"decoder.lm_head.weight_t_scales.gather",
"const_50.59644256269407_f16",
"g12_embed/const_1d_1",
"const_0.01976423537605237_f16",
"const_0.7071067811865476_f16",
"g12_f32_16p0",
"v_embedding.Unsqueeze_14",
"embedding.per_layer_model_projection.weight_t",
"embedding.per_layer_projection_norm.weight",
"g12_embed/rows_shape"
],
"renamed": {
"const_1d_1": "g12_embed/const_1d_1"
},
"lm_scales_dims": [
20971520
],
"gather_scales_dims": [
262144,
80,
1
],
"gather_scales_external": {
"location": "decoder.onnx_data_1",
"offset": "590094336",
"length": "41943040"
},
"table_bits": 4,
"new_inputs": [
"input_ids",
"image_features",
"ple_rows"
],
"external_kept": [
"embedding.per_layer_model_projection.weight_t"
],
"moved_to_decoder_data": [
{
"name": "embedding.per_layer_model_projection.weight_t",
"from": "embed.onnx_data",
"to": "decoder.onnx_data_1",
"offset": 632037376,
"length": 55050240
}
],
"lookup_check": {
"shape": [
1,
246,
2560
],
"bit_identical": true,
"tokens": 246,
"per_output": {
"inputs_embeds": true,
"per_layer_inputs": true
}
}
},
"graph_dir": "BlinkFix-models/mobius-e4b/q4",
"graph_sha256": {
"vision_encoder/model.onnx": "d914968f4dfed8482bec6f0b4c6260d544eb90732822b7bb8723898a2e07b814"
}
}
- Downloads last month
- 28