Bartosz Hanc commited on
Commit
67cb176
·
1 Parent(s): 89a3e9e

fix(xnnpack): bound ring-cache prefill to 512 tokens

Browse files
README.md CHANGED
@@ -23,10 +23,12 @@ library as ExecuTorch `.pte` programs, ready to run on device.
23
  | --- | --- | --- | --- |
24
  | `e2b/mlx/gemma_4_e2b_mlx_int4.pte` | mlx | int4 | 2,048 |
25
  | `e2b/vulkan/gemma_4_e2b_vulkan_8da4w.pte` | vulkan | 8da4w | 2,048 |
26
- | `e2b/xnnpack/gemma_4_e2b_xnnpack_8da4w.pte` | xnnpack | 8da4w | 4,048 |
27
 
28
 
29
 
 
 
30
  ## Repository structure
31
 
32
  ```
 
23
  | --- | --- | --- | --- |
24
  | `e2b/mlx/gemma_4_e2b_mlx_int4.pte` | mlx | int4 | 2,048 |
25
  | `e2b/vulkan/gemma_4_e2b_vulkan_8da4w.pte` | vulkan | 8da4w | 2,048 |
26
+ | `e2b/xnnpack/gemma_4_e2b_xnnpack_8da4w.pte` | xnnpack | 8da4w | 4,096 |
27
 
28
 
29
 
30
+ XNNPACK accepts prefill chunks of up to **512 tokens** within its 4,096-token context. The chunk bound prevents sliding-window ring-cache eviction during long prefills. The exported binary, embedded model schema, and companion config use the same bound.
31
+
32
  ## Repository structure
33
 
34
  ```
e2b/xnnpack/config.json CHANGED
@@ -22,7 +22,7 @@
22
  50
23
  ],
24
  "get_max_context_len": 4096,
25
- "get_max_seq_len": 1024,
26
  "get_vocab_size": 262144,
27
  "use_kv_cache": true,
28
  "has_ple": true,
@@ -43,7 +43,7 @@
43
  1,
44
  {
45
  "min": 1,
46
- "max": 1024
47
  }
48
  ],
49
  "dtype": "int64"
@@ -84,7 +84,7 @@
84
  1,
85
  {
86
  "min": 1,
87
- "max": 1024
88
  },
89
  1536
90
  ],
@@ -96,7 +96,7 @@
96
  1,
97
  {
98
  "min": 1,
99
- "max": 1024
100
  },
101
  35,
102
  256
@@ -108,7 +108,7 @@
108
  "shape": [
109
  {
110
  "min": 1,
111
- "max": 1024
112
  }
113
  ],
114
  "dtype": "int64"
 
22
  50
23
  ],
24
  "get_max_context_len": 4096,
25
+ "get_max_seq_len": 512,
26
  "get_vocab_size": 262144,
27
  "use_kv_cache": true,
28
  "has_ple": true,
 
43
  1,
44
  {
45
  "min": 1,
46
+ "max": 512
47
  }
48
  ],
49
  "dtype": "int64"
 
84
  1,
85
  {
86
  "min": 1,
87
+ "max": 512
88
  },
89
  1536
90
  ],
 
96
  1,
97
  {
98
  "min": 1,
99
+ "max": 512
100
  },
101
  35,
102
  256
 
108
  "shape": [
109
  {
110
  "min": 1,
111
+ "max": 512
112
  }
113
  ],
114
  "dtype": "int64"
e2b/xnnpack/gemma_4_e2b_xnnpack_8da4w.pte CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:2e0381d531c6db6e8d175652dcd88198729129c74e33b54ea6aca2cbca88aa21
3
- size 3212918656
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a5799ecbed3db94029a5c2ce847b138159c1d2b6c0f09f2f153a790211eb6409
3
+ size 3213090176
e2b/xnnpack/validation.json ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "passed": true,
3
+ "metadata_verified": true,
4
+ "sha256": "a5799ecbed3db94029a5c2ce847b138159c1d2b6c0f09f2f153a790211eb6409",
5
+ "date": "2026-10-15",
6
+ "device": {
7
+ "model": "Samsung SM-G986B",
8
+ "soc": "Exynos 990",
9
+ "gpu": "Mali-G77"
10
+ },
11
+ "backend": "XNNPACK",
12
+ "max_prefill_tokens": 512,
13
+ "max_context_tokens": 4096,
14
+ "transfer_sha256_verified": true,
15
+ "prefill_513_rejected": true,
16
+ "checks": {
17
+ "omni_tool": {
18
+ "finite_logits": true,
19
+ "output": "The weather in Warsaw is 18 degrees and sunny.<turn|>",
20
+ "first_token": 818,
21
+ "termination_token": 106
22
+ },
23
+ "omni_long": {
24
+ "finite_logits": true,
25
+ "output": "The weather in Warsaw is 8 degrees and sunny.<turn|>",
26
+ "first_token": 818,
27
+ "termination_token": 106
28
+ },
29
+ "transcription": {
30
+ "finite_logits": true,
31
+ "output": "And so my fellow Americans, ask not what your country can do for you, ask what you can do for your country.<turn|>",
32
+ "first_token": 3133,
33
+ "termination_token": 106
34
+ }
35
+ },
36
+ "limitations": [
37
+ "The 2,102-token repetitive tool fixture answers 8 degrees instead of the supplied 18 degrees, also observed with the previous published model. This verifies continuation and finite logits, not factual accuracy.",
38
+ "These fixtures did not reproduce the reported immediate EOS; they do not establish correctness for every prompt."
39
+ ]
40
+ }