sunsethunter86 commited on
Commit
3a8b5d7
Β·
verified Β·
1 Parent(s): 6352e54

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +53 -27
README.md CHANGED
@@ -12,59 +12,85 @@ library_name: llama.cpp
12
 
13
  # Gemma LITE (E2B) β€” a smaller dictionary, the same mind
14
 
15
- A **Model Derivative** of Google's Gemma 3n E2B, made for phones that cannot
16
- hold the original in memory.
17
 
18
- **Nothing about the model's reasoning was changed.** All 35 transformer blocks
19
- are byte-for-byte the quantisation they started as. The only modification is to
20
- one tensor.
21
 
22
  ## What was modified
23
 
24
- `per_layer_token_embd.weight` β€” requantised from **q6_K to q2_K**.
 
25
 
26
  That single tensor is **57% of the original file**: 1,837 MiB of a 3,179 MiB
27
- model, shaped `[8960, 262144]`. It is a *lookup table* β€” one row of about 7 KB
28
- is read per token β€” and it was being stored at **higher precision than the
29
- layers that do the reasoning**, every one of which is q4_0.
30
 
31
  ```
32
  llama-quantize --allow-requantize \
33
- --tensor-type per_layer_token_embd=q2_K \
34
- gemma-3n-E2B-it-q4_0.gguf gemma-lite-e2b-q2.gguf Q4_0
35
  ```
36
 
37
  | | file | `per_layer_token_embd` |
38
  |---|---|---|
39
  | source (E2B q4_0) | 3.12 GiB | 1,837 MiB (q6_K) |
40
- | **LITE** | **2.04 GiB** | **735 MiB (q2_K)** |
41
 
42
- ## Why it exists
43
 
44
- Measured on a Galaxy S22 Ultra (8 GB): the unmodified model was killed by
45
- Android's low-memory killer **eleven times**, never finishing load. It needs
46
- roughly every spare byte the phone has.
47
 
48
- Measured on a ROG Phone 8 Pro with llama.cpp and OpenCL, 8192 context:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
 
50
  | | |
51
  |---|---|
52
- | system memory held | **~510 MiB** |
53
- | unevictable (anonymous) | **0.17 GiB** |
54
  | prompt eval | **211 tok/s** |
55
  | generation | **10.7 tok/s** |
56
 
57
  A ~3,800-token system prompt prefills in about **18 seconds**.
58
 
 
 
 
 
59
  ## Quality
60
 
61
- Auditioned against the unmodified model β€” same seed, same temperature, same
62
- 2,400-token character prompt. Both replies were in character and of comparable
63
- quality; the LITE build was, if anything, more faithful to the prompt's register.
64
 
65
- ☠️ **This is one sample, not a benchmark.** No perplexity or standardised
66
- evaluation has been run. q2_K is applied to token embeddings β€” how the model
67
- represents word *meaning* β€” so if you need measured quality, measure it.
68
 
69
  ## What it cannot do
70
 
@@ -76,8 +102,8 @@ The source GGUF carries **no vision or audio encoder tensors**, so this is a
76
  Gemma 3n is provided under and subject to the **Gemma Terms of Use**:
77
  https://ai.google.dev/gemma/terms
78
 
79
- This is a **modified** version. The modification is described above and is
80
- limited to the requantisation of a single tensor. The Gemma Terms, including the
81
  Prohibited Use Policy, apply to this derivative and to anything derived from it.
82
 
83
  Base model: `google/gemma-3n-E2B-it`.
 
12
 
13
  # Gemma LITE (E2B) β€” a smaller dictionary, the same mind
14
 
15
+ A **Model Derivative** of Google's Gemma 3n E2B, made for phones that cannot hold
16
+ the original in memory.
17
 
18
+ **Nothing about the model's reasoning was changed.** All 35 transformer blocks are
19
+ byte-for-byte the quantisation they started as. The only modification is to one
20
+ tensor.
21
 
22
  ## What was modified
23
 
24
+ `per_layer_token_embd.weight` β€” requantised from **q6_K to q4_0**, matching the
25
+ precision of every layer that does the actual reasoning.
26
 
27
  That single tensor is **57% of the original file**: 1,837 MiB of a 3,179 MiB
28
+ model, shaped `[8960, 262144]`. It is a *lookup table* β€” one row of about 7 KB is
29
+ read per token β€” and it was stored at **higher precision than the layers doing the
30
+ thinking**, every one of which is q4_0.
31
 
32
  ```
33
  llama-quantize --allow-requantize \
34
+ --tensor-type per_layer_token_embd=q4_0 \
35
+ gemma-3n-E2B-it-q4_0.gguf gemma-lite-e2b-q4.gguf Q4_0
36
  ```
37
 
38
  | | file | `per_layer_token_embd` |
39
  |---|---|---|
40
  | source (E2B q4_0) | 3.12 GiB | 1,837 MiB (q6_K) |
41
+ | **LITE** | **2.56 GiB** | 1,270 MiB (q4_0) |
42
 
43
+ ## ⚠️ A q2_K version of this model was published here and has been withdrawn
44
 
45
+ An earlier build took the same tensor down to **q2_K**, reaching 2.04 GiB. It
46
+ passed a single-turn audition and **failed badly over a real conversation.** It
47
+ was replaced on 2026-08-12 and should not be used.
48
 
49
+ Over 30 turns, q2_K against this q4_0 build:
50
+
51
+ | | q2_K (withdrawn) | **q4_0 (this file)** |
52
+ |---|---|---|
53
+ | repetition, second half (4-gram overlap) | 0.175, peaking **0.43** | **0.000** |
54
+ | replies containing malformed control tokens | **17 of 30** | 3 of 30 |
55
+ | corrupted words (`It't what it is`) | throughout | none |
56
+ | latency, second half | 5,600 ms | 3,963 ms |
57
+
58
+ q2_K collapsed into a verbal tic β€” *"That's what it is"* in nearly every reply
59
+ after turn 12 β€” emitted malformed control tokens such as `<end_of_of_turn>` into
60
+ visible output, and confidently misremembered the conversation it was in.
61
+
62
+ ☠️ **The lesson, if you are quantising embeddings yourself: a single-turn test
63
+ cannot see this.** The damage only appears once enough context has to be held at
64
+ once. Test over a long conversation, not one reply.
65
+
66
+ ## Measured
67
+
68
+ Galaxy S22 Ultra (8 GB): the **unmodified** model was killed by Android's
69
+ low-memory killer eleven times and never finished loading.
70
+
71
+ ROG Phone 8 Pro, llama.cpp with OpenCL, 8192 context:
72
 
73
  | | |
74
  |---|---|
75
+ | unevictable (anonymous) memory | **~178 MiB** |
76
+ | GPU / shmem | ~80 MiB |
77
  | prompt eval | **211 tok/s** |
78
  | generation | **10.7 tok/s** |
79
 
80
  A ~3,800-token system prompt prefills in about **18 seconds**.
81
 
82
+ ☠️ The GPU path is not an optimisation β€” it is why this fits. On CPU the same
83
+ model holds **1,642 MiB** of unevictable memory, roughly 9Γ— more, which is the
84
+ shape of failure that killed the unmodified model on 8 GB.
85
+
86
  ## Quality
87
 
88
+ ☠️ **No perplexity or standardised benchmark has been run.** What exists is a
89
+ 30-turn conversational soak and a 17-prompt content probe, both single-sample. If
90
+ you need measured quality, measure it.
91
 
92
+ Note the numbers above are for this file at 4,300 tokens of context; behaviour at
93
+ the full 8,192 has not been characterised.
 
94
 
95
  ## What it cannot do
96
 
 
102
  Gemma 3n is provided under and subject to the **Gemma Terms of Use**:
103
  https://ai.google.dev/gemma/terms
104
 
105
+ This is a **modified** version. The modification is described above and is limited
106
+ to the requantisation of a single tensor. The Gemma Terms, including the
107
  Prohibited Use Policy, apply to this derivative and to anything derived from it.
108
 
109
  Base model: `google/gemma-3n-E2B-it`.