hexoy commited on
Commit
21509e0
·
verified ·
1 Parent(s): a63d660

Add experimental rank-8 LoRA comparison

Browse files
Files changed (1) hide show
  1. README.md +21 -23
README.md CHANGED
@@ -11,13 +11,9 @@ tags:
11
 
12
  # Gemma 4 E2B Monarch 35-MLP
13
 
14
- Private experimental Gemma 4 E2B model with all 35 language-model MLPs
15
- replaced by two-factor Monarch linear maps. Attention, embeddings, and the
16
- multimodal components remain structurally unchanged.
17
-
18
- The Monarch factors were initialized by dense SVD projection and trained with
19
- activation alignment followed by full-model logit distillation. The released
20
- BF16 model has `3,682,268,704` parameters.
21
 
22
  ## 1. Weight Storage
23
 
@@ -26,29 +22,28 @@ BF16 model has `3,682,268,704` parameters.
26
  | Dense Gemma 4 BF16 | Reference | 9.507 GiB | 9.543 GiB | - |
27
  | Four-layer Monarch BF16 | Released | 9.122 GiB | 9.122 GiB | 4.05% |
28
  | 35-layer Monarch BF16 | Released | 6.859 GiB | 6.859 GiB | 27.86% |
 
29
  | 35-layer Monarch + 420 INT8 linears | Released | 6.135 GiB | 6.136 GiB | 35.48% |
30
 
31
- BF16 sizes use two bytes per parameter. Quantized sizes were measured from
32
- physical tensor storage. These values exclude activations, logits, CUDA
33
- workspaces, and allocator overhead.
34
 
35
  ## 2. TinyHellaSwag
36
 
37
- All rows used the same RTX PRO 6000, fixed batch size `32`, seed `1234`,
38
- 100 official examples, 10-shot prompts, and no chat template.
39
 
40
  | Model | Status | GP-IRT accuracy | Raw accuracy | Runtime | Peak VRAM |
41
  | --- | --- | ---: | ---: | ---: | ---: |
42
  | Dense Gemma 4 BF16 | Reference | 39.23% | 29% | 28.50 s | 57.88 GiB |
43
  | Four-layer Monarch BF16 | Released | 37.04% | 27% | 22.96 s | 57.50 GiB |
44
  | 35-layer Monarch BF16 | Released | 32.35% | 22% | 23.33 s | 55.23 GiB |
 
45
  | 35-layer Monarch + INT8 linears | Released | 30.57% | 21% | 23.14 s | 54.51 GiB |
46
 
47
- TinyHellaSwag has only 100 examples, so small score changes are noisy. A good
48
- benchmark score does not override failed logit or generation checks.
49
-
50
- Historical auto-batch runtime and peak-VRAM measurements are omitted because
51
- selected batch sizes differed. The table above uses fixed batch size `32`.
52
 
53
  ## Usage
54
 
@@ -65,15 +60,18 @@ model = AutoModelForImageTextToText.from_pretrained(
65
  )
66
  ```
67
 
68
- This repository contains custom modeling code. Review it before enabling
69
- `trust_remote_code=True`.
 
 
 
70
 
71
  ## Reproducibility
72
 
73
- - Model weights: `f897353fca328b1cc5fd2e12d645773ca637f5f0`
74
- - Current source: [`gemma-distillation`](https://github.com/ratmir-miftachov/gemma-distillation)
75
- - Full private results and hashes:
76
- [`gemma4-monarch-artifacts`](https://huggingface.co/datasets/hexoy/gemma4-monarch-artifacts/tree/main/benchmarks/int8/20260717T110806Z)
77
 
78
  Derived from [google/gemma-4-E2B-it](https://huggingface.co/google/gemma-4-E2B-it).
79
  See `NOTICE` for the modification summary.
 
11
 
12
  # Gemma 4 E2B Monarch 35-MLP
13
 
14
+ Private experimental Gemma 4 E2B model with all 35 language-model MLPs replaced
15
+ by two-factor Monarch maps. The released BF16 model has `3,682,268,704`
16
+ parameters.
 
 
 
 
17
 
18
  ## 1. Weight Storage
19
 
 
22
  | Dense Gemma 4 BF16 | Reference | 9.507 GiB | 9.543 GiB | - |
23
  | Four-layer Monarch BF16 | Released | 9.122 GiB | 9.122 GiB | 4.05% |
24
  | 35-layer Monarch BF16 | Released | 6.859 GiB | 6.859 GiB | 27.86% |
25
+ | 35-layer Monarch + LoRA r8 BF16 | Experimental | 6.876 GiB | 6.877 GiB | 27.68% |
26
  | 35-layer Monarch + 420 INT8 linears | Released | 6.135 GiB | 6.136 GiB | 35.48% |
27
 
28
+ BF16 sizes use two bytes per parameter; serialized LoRA size was audited from
29
+ the two safetensor shards. Values exclude activations and CUDA workspaces.
 
30
 
31
  ## 2. TinyHellaSwag
32
 
33
+ All rows used the same RTX PRO 6000, fixed batch size `32`, seed `1234`, 100
34
+ official examples, 10-shot prompts, and no chat template.
35
 
36
  | Model | Status | GP-IRT accuracy | Raw accuracy | Runtime | Peak VRAM |
37
  | --- | --- | ---: | ---: | ---: | ---: |
38
  | Dense Gemma 4 BF16 | Reference | 39.23% | 29% | 28.50 s | 57.88 GiB |
39
  | Four-layer Monarch BF16 | Released | 37.04% | 27% | 22.96 s | 57.50 GiB |
40
  | 35-layer Monarch BF16 | Released | 32.35% | 22% | 23.33 s | 55.23 GiB |
41
+ | 35-layer Monarch + LoRA r8 BF16 | Experimental | 33.25% | 23% | 24.93 s | 55.25 GiB |
42
  | 35-layer Monarch + INT8 linears | Released | 30.57% | 21% | 23.14 s | 54.51 GiB |
43
 
44
+ Rank-8 LoRA improved the 35-layer source by `0.90` GP-IRT points and one correct
45
+ item, but missed the former `+1.0` point or `+2` item release gate. The
46
+ 100-example benchmark is noisy.
 
 
47
 
48
  ## Usage
49
 
 
60
  )
61
  ```
62
 
63
+ The rank-8 result is published separately at
64
+ [`hexoy/gemma-4-e2b-monarch-35mlp-lora-r8`](https://huggingface.co/hexoy/gemma-4-e2b-monarch-35mlp-lora-r8).
65
+ It is a benchmark-recovery experiment: corrected 64-token generation repeated
66
+ phrases for text and remained malformed or inaccurate for images. It is not a
67
+ general text or multimodal recovery release.
68
 
69
  ## Reproducibility
70
 
71
+ - BF16 model revision: `f897353fca328b1cc5fd2e12d645773ca637f5f0`
72
+ - Source: [`gemma-distillation`](https://github.com/ratmir-miftachov/gemma-distillation)
73
+ - Private LoRA release evidence:
74
+ [`gemma4-monarch-artifacts`](https://huggingface.co/datasets/hexoy/gemma4-monarch-artifacts/tree/main/experiments/lora-recovery-r8-release/20260721T134717Z)
75
 
76
  Derived from [google/gemma-4-E2B-it](https://huggingface.co/google/gemma-4-E2B-it).
77
  See `NOTICE` for the modification summary.