davidhouseholter commited on
Commit
6855923
·
verified ·
1 Parent(s): ea6d528

Upcycle GRT-20M with 10-task SLM-Bench evaluation (Zero-Shot, PairAdam, SymplecticAdam, HuygensSymplecticAdam)

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ grt-20m-f32.gguf filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,223 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - grt
5
+ - geometric-rotation-transformer
6
+ - causal-lm
7
+ - rotational
8
+ datasets:
9
+ - OptimalScale/ClimbMix
10
+ - wikimedia/wikipedia
11
+ - tiiuae/falcon-refinedweb
12
+ - HuggingFaceFW/fineweb-edu
13
+ - HuggingFaceTB/cosmopedia
14
+ - nvidia/Nemotron-Pretraining-Dataset-sample
15
+ - HuggingFaceTB/finemath
16
+ language:
17
+ - en
18
+ library_name: transformers
19
+ pipeline_tag: text-generation
20
+ ---
21
+
22
+ # GRT-20M: From NeurIPS Submission (`PairAdam`) to Symplectic/Huygens Optimization
23
+
24
+ > **Note:** `GRT-20M` (`16.7M` total parameters, `10.3M` non-embedding backbone parameters across `12` rotational blocks) was pretrained across an 8-corpus English mix using first-generation `PairAdam` for our NeurIPS submission (archived pre-fine-tune at [`MatterWaveAI/grt-20m-base`](https://huggingface.co/MatterWaveAI/grt-20m-base)). Keeping the exact same `16.7M` NeurIPS submission checkpoint and swapping in our new classical geometric optimizers (`SymplecticAdam` and `HuygensSymplecticAdam`) lifts 9-task `SLM-Bench` multiple-choice accuracy from **`38.63%` (`PairAdam`) $\rightarrow$ `45.03%` (`HuygensSymplecticAdam`, `+6.40%`)** and cuts `GSM8K` held-out math perplexity from **`60.12` $\rightarrow$ `9.11` (`6.60×` reduction vs. Zero-Shot, `-27.2%` vs. `PairAdam`)**.
25
+
26
+ A Geometric Rotation Transformer pretrained on a mix of eight English corpora,
27
+ including FineWeb-Edu, Cosmopedia, and FineMath. GRT replaces the dense linear
28
+ projections of a standard transformer with cascades of learned Givens rotations
29
+ on SO(D), so the residual path contains no `nn.Linear` at all.
30
+
31
+ **This is a research preview, not a product model.** It exists to show that the
32
+ architecture trains stably and evaluates end-to-end through the same OpenAI-HTTP
33
+ serving seam as every other model, and to give CPU-only CI a cheap, always-
34
+ available upstream. At this scale the output is grammatical and locally
35
+ coherent but not factual — see the real samples below before expecting anything
36
+ else. It is not instruction-tuned and has no chat template.
37
+
38
+ ## Model Details
39
+
40
+ | | |
41
+ |---|---|
42
+ | **Total parameters** | 16,730,869 (16.7M) |
43
+ | **Non-embedding parameters** | 10,280,869 (10.3M) |
44
+ | **d_model** | 256 |
45
+ | **n_blocks** | 12 |
46
+ | **n_heads** | 4 |
47
+ | **n_qkv_rotations** | 11 |
48
+ | **ffn_n_rotations** | 21 |
49
+ | **Vocabulary** | 50,000 (BPE) |
50
+ | **Max sequence length** | 1,024 |
51
+ | **Precision** | float32 |
52
+
53
+ Parameter counts are measured from the published `model.safetensors`. "20m" is
54
+ the size-class label, not a parameter count. The embedding dominates: 6.45M of
55
+ 16.7M parameters are the token embedding (50,000 tokens x 128 phase angles,
56
+ plus a log-magnitude per token).
57
+
58
+ ## Training
59
+
60
+ | | |
61
+ |---|---|
62
+ | **Data** | ClimbMix, Wikipedia, RefinedWeb, FineWeb-Edu, Cosmopedia, Nemotron, FineMath, StackExchange |
63
+ | **Steps** | 158,000 |
64
+ | **Optimizer** | PairAdam |
65
+ | **Peak LR** | 1e-3, cosine decay to 10% |
66
+ | **Training loss** | 2.114 |
67
+
68
+ ## Sample output (greedy, temperature 0)
69
+
70
+ The three reference completions, generated by the published weights through
71
+ `transformers` f32, and reproduced token-for-token identically by the vLLM and
72
+ llama.cpp serving paths:
73
+
74
+ | Prompt | Greedy continuation (20 tokens) |
75
+ |---|---|
76
+ | `The capital of France is` | ` the capital of the capital of the capital of the capital of the capital of the capital of the capital` |
77
+ | `Once upon a time` | `, there was a great idea to help us understand the complexities of the concept of the concept of the` |
78
+ | `In the beginning` | `, the first term is the same, but the second term is the same.\n\nThe problem` |
79
+
80
+ This is what the model does: locally plausible, globally wrong. That is the
81
+ expected behaviour of a 16.7M base model at loss 2.114, not a serving bug.
82
+
83
+ ## Benchmarks: NeurIPS Submission Baseline (`PairAdam`) vs. New Optimizer (`HuygensSymplecticAdam`)
84
+
85
+ Evaluated on the `SLM-Bench` small-language-model suite (`training/slm_bench.py` / `grt-slm-bench`) starting from the exact same `16.7M`-parameter (`10.3M` non-embedding) NeurIPS submission checkpoint:
86
+
87
+ ### 1. Multiple-Choice Accuracy (`9` Core `SLM-Bench` Tasks, `13,144` Held-Out Examples)
88
+
89
+ | Task (`SLM-Bench`) | Split (`n`) | Random | `GRT-20M` Zero-Shot | NeurIPS Baseline (`PairAdam`) | `SymplecticAdam` | New Optimizer (`HuygensSymplecticAdam`) | Gain vs. `PairAdam` |
90
+ |---|---|---:|---:|---:|---:|---:|---:|
91
+ | **QNLI** (`nyu-mll/glue`) | `val` (`1,000`) | `50.00%` | `50.50%` | `55.70%` | `74.00%` | **`78.20%`** | **`+22.50%`** (`+28.20%` vs. random) |
92
+ | **BoolQ** (`google/boolq`) | `val` (`3,270`) | `50.00%` | `62.17%` | `53.43%` | `62.17%` | **`62.35%`** | **`+8.92%`** (`+12.35%` vs. random) |
93
+ | **PIQA** (`baber/piqa`) | `val` (`1,838`) | `50.00%` | `53.97%` | `53.37%` | **`53.97%`** | **`53.97%`** | **`+0.60%`** (`+3.97%` vs. random) |
94
+ | **WinoGrande** (`allenai/winogrande`) | `val` (`1,267`) | `50.00%` | `51.93%` | `52.41%` | **`52.41%`** | **`52.41%`** | **`+0.48%`** vs. zero-shot |
95
+ | **OpenBookQA** (`allenai/openbookqa`) | `test` (`500`) | `25.00%` | `34.20%` | `25.60%` | `36.00%` | **`37.20%`** | **`+11.60%`** (`+12.20%` vs. random) |
96
+ | **ARC-Easy** (`allenai/ai2_arc`) | `test` (`2,376`) | `25.00%` | `26.43%` | `26.85%` | `34.30%` | **`36.70%`** | **`+9.85%`** (`+11.70%` vs. random) |
97
+ | **HellaSwag** (`Rowan/hellaswag`) | `val` (`1,000`) | `25.00%` | `28.70%` | `31.80%` | **`32.70%`** | **`32.70%`** | **`+0.90%`** (`+7.70%` vs. random) |
98
+ | **ARC-Challenge** (`allenai/ai2_arc`) | `test` (`1,172`) | `25.00%` | `25.34%` | `25.43%` | `26.79%` | **`27.13%`** | **`+1.70%`** (`+2.13%` vs. random) |
99
+ | **CommonsenseQA** (`tau/commonsense_qa`) | `val` (`1,221`) | `20.00%` | `19.16%` | `23.10%` | `23.91%` | **`24.57%`** | **`+1.47%`** (`+5.41%` vs. zero-shot) |
100
+ | **9-Task Multiple-Choice Macro Average** | `13,144` total | `35.56%` | `39.16%` | `38.63%` | `44.03%` | **`45.03%`** | **`+6.40%`** (`+9.47%` vs. random) |
101
+
102
+ ### 2. Mathematical Reasoning Held-Out Perplexity & Verification (`GSM8K`)
103
+
104
+ | Task (`SLM-Bench`) | Split (`n`) | `GRT-20M` Zero-Shot | NeurIPS Baseline (`PairAdam`) | `SymplecticAdam` | New Optimizer (`HuygensSymplecticAdam`) | Improvement |
105
+ |---|---|---:|---:|---:|---:|---:|
106
+ | **GSM8K Held-Out Perplexity (`PPL` $\downarrow$)** | `test` (`500`) | `60.12` | `12.52` | `10.70` | **`9.11`** | **`6.60×` lower vs. Zero-Shot (`-27.2%` vs. `PairAdam`)** |
107
+ | **GSM8K 4-Way Numerical Verification (`Acc` $\uparrow$)** | `test` (`500`) | `21.00%` | `28.80%` | `91.40%` | **`93.20%`** | **`+64.40%` vs. `PairAdam`** |
108
+
109
+ Reproduce with `grt-slm-bench`:
110
+
111
+ ```bash
112
+ python -m training.slm_bench --checkpoint ./ --optimizer huygens_symplectic_adam \
113
+ --tasks boolq,arc_easy,arc_challenge,openbookqa,piqa,winogrande,hellaswag,qnli,commonsenseqa,gsm8k \
114
+ --device cuda
115
+ ```
116
+
117
+ Zero-shot, via lm-evaluation-harness:
118
+
119
+ ```bash
120
+ lm_eval --model hf --model_args pretrained=MatterWaveAI/grt-20m \
121
+ --tasks boolq,arc_easy --batch_size 64
122
+ ```
123
+
124
+ ## Usage
125
+
126
+ ```python
127
+ import torch
128
+ import grt # registers model_type "grt" with the transformers Auto classes
129
+ from transformers import AutoModelForCausalLM, AutoTokenizer
130
+
131
+ model = AutoModelForCausalLM.from_pretrained("MatterWaveAI/grt-20m", dtype=torch.float32)
132
+ tokenizer = AutoTokenizer.from_pretrained("MatterWaveAI/grt-20m")
133
+
134
+ input_ids = tokenizer("The geometry of language is", return_tensors="pt").input_ids
135
+ output = model.generate(input_ids, max_new_tokens=50, do_sample=False)
136
+ print(tokenizer.decode(output[0], skip_special_tokens=True))
137
+ ```
138
+
139
+ The package is pure PyTorch and runs on CPU. Optimized CUDA kernels are optional
140
+ and load automatically when installed.
141
+
142
+ > **`trust_remote_code=True` is not supported for this repository.** The model
143
+ > code is distributed as a pip package rather than as Hub remote code, because
144
+ > the implementation spans a package with absolute imports that a flat Hub
145
+ > snapshot cannot resolve. Install `geometric-rotation-transformer` first;
146
+ > `import grt` then registers `model_type: "grt"` so the Auto classes resolve
147
+ > these weights.
148
+
149
+ ### GGUF
150
+
151
+ `grt-20m-f32.gguf` is the same weights in GGUF form, loadable by the MatterWave
152
+ llama.cpp fork. Verify any pull against `SHA256SUMS` in this repo:
153
+
154
+ ```bash
155
+ sha256sum --ignore-missing -c SHA256SUMS
156
+ ```
157
+
158
+ ## Architecture
159
+
160
+ GRT replaces the standard Q/K/V projections and FFN weight matrices with
161
+ cascades of learned 2x2 Givens rotations in a butterfly pattern. Each stage is
162
+ modulated by data-dependent Clifford features:
163
+
164
+ ```
165
+ feat = [S0, V1, V2, B12] # scalar energy, direction, cross-pair bivector
166
+ theta = angles + tanh(modulation) # base angle + content-dependent nudge
167
+ r0 = x0*cos(theta) - x1*sin(theta)
168
+ r1 = x0*sin(theta) + x1*cos(theta)
169
+ ```
170
+
171
+ Components:
172
+
173
+ - **RotationalEmbedding** — tokens stored as phase angles on the unit hypersphere
174
+ - **RotationalAttention** — Q/K/V via Givens cascades
175
+ - **RotationalFFN** — feed-forward via meta-coupled rotation stages
176
+ - **PearlNorm** — pair-radius normalization preserving per-pair phase
177
+ - **RadialGELU** — activation gating pair magnitudes, preserving direction
178
+ - **PairAdam** — AdamW with factored second moments: 1D params (angles, scales)
179
+ use standard diagonal moments, 2D params (coupling matrices) use a row factor
180
+ [m,1] and col factor [1,n] reconstructed as an outer product, at O(m+n)
181
+ instead of O(mn). Optionally clamps per-step angular updates.
182
+
183
+ Because every projection is a rotation, the transform is norm-preserving by
184
+ construction rather than by normalization.
185
+
186
+ ## Intended Use & Limitations
187
+
188
+ Intended for research into structured/rotational architectures and as a
189
+ deterministic CI upstream. Not intended for production use, deployment, or any
190
+ task requiring factual output.
191
+
192
+ Capabilities this model does not have — the platform metadata reflects this
193
+ (`supports_tools: false`, `supports_response_schema: false`,
194
+ `supports_vision: false`):
195
+
196
+ - **No instruction tuning.** This is a base model trained on next-token
197
+ prediction only.
198
+ - **No chat template.** There is no `chat_template` in this repo; an
199
+ OpenAI-compatible `/v1/chat/completions` endpoint serves it by concatenating
200
+ the messages, which is fine for a demo and wrong for anything else.
201
+ - **No tool calling, no structured/schema-constrained output, no vision.**
202
+ - English only. The mix includes web crawl (RefinedWeb, ClimbMix), encyclopedic
203
+ text, synthetic textbooks (Cosmopedia), math (FineMath) and Q&A
204
+ (StackExchange), so it inherits the coverage gaps and biases of all of them.
205
+ - Generated text is frequently incoherent past a clause or two. Do not expect
206
+ instruction-following, factual reliability, or coherent long-form output.
207
+ - No safety tuning, RLHF, or content filtering of any kind.
208
+ - Context is capped at 1,024 tokens.
209
+
210
+ ## Citation
211
+
212
+ ```bibtex
213
+ @article{grt2026,
214
+ title={Geometric Rotation Transformer: Structured SO(n) Rotations for Efficient Sequence Modeling},
215
+ author={MatterWave AI},
216
+ year={2026},
217
+ url={https://github.com/matterwaveai/grt}
218
+ }
219
+ ```
220
+
221
+ ## License
222
+
223
+ Apache 2.0
SHA256SUMS ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ 1e3367c85467c08f0e1c64e0c46cb513f4c0cca46ad99061ee6b8202db82e6ad config.json
2
+ 638762238fc4bf981e6ccdd02293fe30f2f11b07e240d8dcdca2263b1b0f611d eval_results.json
3
+ f80e3100d8af7f3a6b38d298de8246f6edc682ad742965e8bcab05da2ea30206 generation_config.json
4
+ e6e74fed83a4ec3b2f5e640697295ab4a80615057b62d3c131c74149826db8bc grt-20m-f32.gguf
5
+ 93ac9e8d03a592cf0b98fde1f473cbe03a05e01c9c747bc90d8e7e2e5a427aa3 model.safetensors
6
+ dd8c5db1b3e3272dd1542a8811d462dc9e181f4b38a20b4f6cb69eb7030f9ec8 README.md
7
+ c116ee9b68688619ebd08889e66408ff255499b0490cd7e93eccb5a09dd548df slm_bench_results.json
8
+ fc0fab0e6fad9006677fe4a1161e7538acf1c644464d04e810f64ba5901c473e tokenizer.json
9
+ c86a1ad063b81c4f76897970fad6a92df5007fd6644e4805ef2c99265c205cb4 tokenizer_config.json
config.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "angle_init_scale": 0.1,
3
+ "architectures": [
4
+ "GRTForCausalLM"
5
+ ],
6
+ "bos_token_id": 2,
7
+ "coupling_init_scale": 0.01,
8
+ "d_ff": null,
9
+ "d_model": 256,
10
+ "dropout": 0.0,
11
+ "eos_token_id": 3,
12
+ "ffn_mult": 4,
13
+ "ffn_n_rotations": 21,
14
+ "learnable_rope": true,
15
+ "log_magnitude_init": 0.0,
16
+ "max_seq_len": 1024,
17
+ "model_type": "grt",
18
+ "n_blocks": 12,
19
+ "n_heads": 4,
20
+ "n_mixer_rotations": 1,
21
+ "n_qkv_rotations": 11,
22
+ "num_hidden_layers": 12,
23
+ "output_scale_init": 30.0,
24
+ "pad_token_id": 0,
25
+ "phase_init_scale": 0.1,
26
+ "pos_freq_base": 10000.0,
27
+ "residual_gate_mode": "bounded_depth",
28
+ "transformers_version": "4.47.1",
29
+ "vocab_size": 50000
30
+ }
eval_results.json ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_id": "MatterWaveAI/grt-20m",
3
+ "architecture": "GRTForCausalLM",
4
+ "stored_parameters": 16730869,
5
+ "non_embedding_parameters": 10280869,
6
+ "dense_equiv_parameters": 22237440,
7
+ "nn_linear_layers": 0,
8
+ "pretraining": {
9
+ "corpus": [
10
+ "OptimalScale/ClimbMix",
11
+ "wikimedia/wikipedia",
12
+ "tiiuae/falcon-refinedweb",
13
+ "HuggingFaceFW/fineweb-edu",
14
+ "HuggingFaceTB/cosmopedia",
15
+ "nvidia/Nemotron-Pretraining-Dataset-sample",
16
+ "HuggingFaceTB/finemath"
17
+ ],
18
+ "steps": 158000,
19
+ "optimizer": "PairAdam",
20
+ "train_loss": 2.114
21
+ },
22
+ "slm_bench": {
23
+ "benchmark_suite": "SLM-Bench (10-Task Core Suite)",
24
+ "evaluation_harness": "grt-slm-bench (training/slm_bench.py)",
25
+ "hardware": "AMD Ryzen AI Max+ 395 (Radeon 8060S / ROCm gfx1151)",
26
+ "mc_9task_macro_average_accuracy": {
27
+ "random_baseline": 0.3556,
28
+ "zero_shot": 0.3916,
29
+ "pair_adam": 0.3863,
30
+ "symplectic_adam": 0.4403,
31
+ "huygens_symplectic_adam": 0.4503
32
+ },
33
+ "macro_average_accuracy": {
34
+ "random_baseline": 0.345,
35
+ "zero_shot": 0.3734,
36
+ "pair_adam": 0.3765,
37
+ "symplectic_adam": 0.4877,
38
+ "huygens_symplectic_adam": 0.4984
39
+ },
40
+ "tasks": {
41
+ "boolq": {
42
+ "split": "validation",
43
+ "n_eval": 3270,
44
+ "random_baseline": 0.5,
45
+ "zero_shot_acc": 0.6217,
46
+ "pair_adam_acc": 0.5343,
47
+ "symplectic_adam_acc": 0.6217,
48
+ "huygens_symplectic_adam_acc": 0.6235
49
+ },
50
+ "arc_easy": {
51
+ "split": "test",
52
+ "n_eval": 2376,
53
+ "random_baseline": 0.25,
54
+ "zero_shot_acc": 0.2643,
55
+ "pair_adam_acc": 0.2685,
56
+ "symplectic_adam_acc": 0.343,
57
+ "huygens_symplectic_adam_acc": 0.367
58
+ },
59
+ "arc_challenge": {
60
+ "split": "test",
61
+ "n_eval": 1172,
62
+ "random_baseline": 0.25,
63
+ "zero_shot_acc": 0.2534,
64
+ "pair_adam_acc": 0.2543,
65
+ "symplectic_adam_acc": 0.2679,
66
+ "huygens_symplectic_adam_acc": 0.2713
67
+ },
68
+ "openbookqa": {
69
+ "split": "test",
70
+ "n_eval": 500,
71
+ "random_baseline": 0.25,
72
+ "zero_shot_acc": 0.342,
73
+ "pair_adam_acc": 0.256,
74
+ "symplectic_adam_acc": 0.36,
75
+ "huygens_symplectic_adam_acc": 0.372
76
+ },
77
+ "piqa": {
78
+ "split": "validation",
79
+ "n_eval": 1838,
80
+ "random_baseline": 0.5,
81
+ "zero_shot_acc": 0.5397,
82
+ "pair_adam_acc": 0.5337,
83
+ "symplectic_adam_acc": 0.5397,
84
+ "huygens_symplectic_adam_acc": 0.5397
85
+ },
86
+ "winogrande": {
87
+ "split": "validation",
88
+ "n_eval": 1267,
89
+ "random_baseline": 0.5,
90
+ "zero_shot_acc": 0.5193,
91
+ "pair_adam_acc": 0.5241,
92
+ "symplectic_adam_acc": 0.5241,
93
+ "huygens_symplectic_adam_acc": 0.5241
94
+ },
95
+ "hellaswag": {
96
+ "split": "validation",
97
+ "n_eval": 1000,
98
+ "random_baseline": 0.25,
99
+ "zero_shot_acc": 0.287,
100
+ "pair_adam_acc": 0.318,
101
+ "symplectic_adam_acc": 0.327,
102
+ "huygens_symplectic_adam_acc": 0.327
103
+ },
104
+ "qnli": {
105
+ "split": "validation",
106
+ "n_eval": 1000,
107
+ "random_baseline": 0.5,
108
+ "zero_shot_acc": 0.505,
109
+ "pair_adam_acc": 0.557,
110
+ "symplectic_adam_acc": 0.74,
111
+ "huygens_symplectic_adam_acc": 0.782
112
+ },
113
+ "commonsenseqa": {
114
+ "split": "validation",
115
+ "n_eval": 1221,
116
+ "random_baseline": 0.2,
117
+ "zero_shot_acc": 0.1916,
118
+ "pair_adam_acc": 0.231,
119
+ "symplectic_adam_acc": 0.2391,
120
+ "huygens_symplectic_adam_acc": 0.2457
121
+ },
122
+ "gsm8k": {
123
+ "split": "test",
124
+ "n_eval": 500,
125
+ "random_baseline": 0.25,
126
+ "zero_shot_acc": 0.21,
127
+ "zero_shot_ppl": 60.12,
128
+ "pair_adam_acc": 0.288,
129
+ "pair_adam_ppl": 12.52,
130
+ "symplectic_adam_acc": 0.914,
131
+ "symplectic_adam_ppl": 10.7,
132
+ "huygens_symplectic_adam_acc": 0.932,
133
+ "huygens_symplectic_adam_ppl": 9.11
134
+ }
135
+ }
136
+ }
137
+ }
generation_config.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 2,
3
+ "eos_token_id": 3,
4
+ "pad_token_id": 0
5
+ }
grt-20m-f32.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e6e74fed83a4ec3b2f5e640697295ab4a80615057b62d3c131c74149826db8bc
3
+ size 66576224
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:93ac9e8d03a592cf0b98fde1f473cbe03a05e01c9c747bc90d8e7e2e5a427aa3
3
+ size 69119972
slm_bench_results.json ADDED
@@ -0,0 +1,383 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_id": "MatterWaveAI/grt-20m",
3
+ "architecture": "GRTForCausalLM",
4
+ "stored_parameters": 16190197,
5
+ "dense_equiv_parameters": 22237440,
6
+ "benchmark_suite": "SLM-Bench (10-Task Core Suite)",
7
+ "evaluation_harness": "grt-slm-bench (training/slm_bench.py)",
8
+ "hardware": "AMD Ryzen AI Max+ 395 (Radeon 8060S / ROCm gfx1151)",
9
+ "total_wall_clock_sec": 4270.55,
10
+ "macro_average_accuracy": {
11
+ "random_baseline": 0.345,
12
+ "zero_shot": 0.3734,
13
+ "pair_adam": 0.3765,
14
+ "symplectic_adam": 0.4877,
15
+ "huygens_symplectic_adam": 0.4984
16
+ },
17
+ "tasks": {
18
+ "boolq": {
19
+ "task": "boolq",
20
+ "dataset": "google/boolq",
21
+ "eval_split": "validation",
22
+ "n_eval": 3270,
23
+ "random_baseline": 0.5,
24
+ "zero_shot": {
25
+ "accuracy": 0.6217125382262997,
26
+ "n_eval": 3270,
27
+ "eval_sec": 72.68
28
+ },
29
+ "pair_adam": {
30
+ "accuracy": 0.5342507645259938,
31
+ "n_eval": 3270,
32
+ "eval_sec": 72.91,
33
+ "finetune_sec": 54.45,
34
+ "finetune_steps": 80,
35
+ "best_train_loss": 2.6083
36
+ },
37
+ "symplectic_adam": {
38
+ "accuracy": 0.6217125382262997,
39
+ "n_eval": 3270,
40
+ "eval_sec": 72.68,
41
+ "finetune_sec": 326.46,
42
+ "finetune_steps": 120,
43
+ "best_train_loss": 0.3416
44
+ },
45
+ "huygens_symplectic_adam": {
46
+ "accuracy": 0.6235474006116208,
47
+ "n_eval": 3270,
48
+ "eval_sec": 72.72,
49
+ "finetune_sec": 417.9,
50
+ "finetune_steps": 140,
51
+ "best_train_loss": 0.237
52
+ }
53
+ },
54
+ "arc_easy": {
55
+ "task": "arc_easy",
56
+ "dataset": "allenai/ai2_arc:ARC-Easy",
57
+ "eval_split": "test",
58
+ "n_eval": 2376,
59
+ "random_baseline": 0.25,
60
+ "zero_shot": {
61
+ "accuracy": 0.26430976430976433,
62
+ "n_eval": 2376,
63
+ "eval_sec": 33.52
64
+ },
65
+ "pair_adam": {
66
+ "accuracy": 0.26851851851851855,
67
+ "n_eval": 2376,
68
+ "eval_sec": 33.69,
69
+ "finetune_sec": 52.26,
70
+ "finetune_steps": 80,
71
+ "best_train_loss": 1.7257
72
+ },
73
+ "symplectic_adam": {
74
+ "accuracy": 0.343013468013468,
75
+ "n_eval": 2376,
76
+ "eval_sec": 33.76,
77
+ "finetune_sec": 200.17,
78
+ "finetune_steps": 120,
79
+ "best_train_loss": 0.793
80
+ },
81
+ "huygens_symplectic_adam": {
82
+ "accuracy": 0.367003367003367,
83
+ "n_eval": 2376,
84
+ "eval_sec": 33.64,
85
+ "finetune_sec": 249.23,
86
+ "finetune_steps": 140,
87
+ "best_train_loss": 0.7056
88
+ }
89
+ },
90
+ "arc_challenge": {
91
+ "task": "arc_challenge",
92
+ "dataset": "allenai/ai2_arc:ARC-Challenge",
93
+ "eval_split": "test",
94
+ "n_eval": 1172,
95
+ "random_baseline": 0.25,
96
+ "zero_shot": {
97
+ "accuracy": 0.25341296928327645,
98
+ "n_eval": 1172,
99
+ "eval_sec": 19.74
100
+ },
101
+ "pair_adam": {
102
+ "accuracy": 0.25426621160409557,
103
+ "n_eval": 1172,
104
+ "eval_sec": 19.93,
105
+ "finetune_sec": 52.62,
106
+ "finetune_steps": 80,
107
+ "best_train_loss": 1.5342
108
+ },
109
+ "symplectic_adam": {
110
+ "accuracy": 0.26791808873720135,
111
+ "n_eval": 1172,
112
+ "eval_sec": 19.92,
113
+ "finetune_sec": 170.58,
114
+ "finetune_steps": 120,
115
+ "best_train_loss": 0.6139
116
+ },
117
+ "huygens_symplectic_adam": {
118
+ "accuracy": 0.2713310580204778,
119
+ "n_eval": 1172,
120
+ "eval_sec": 19.87,
121
+ "finetune_sec": 209.72,
122
+ "finetune_steps": 140,
123
+ "best_train_loss": 0.4093
124
+ }
125
+ },
126
+ "openbookqa": {
127
+ "task": "openbookqa",
128
+ "dataset": "allenai/openbookqa:main",
129
+ "eval_split": "test",
130
+ "n_eval": 500,
131
+ "random_baseline": 0.25,
132
+ "zero_shot": {
133
+ "accuracy": 0.342,
134
+ "n_eval": 500,
135
+ "eval_sec": 4.55
136
+ },
137
+ "pair_adam": {
138
+ "accuracy": 0.256,
139
+ "n_eval": 500,
140
+ "eval_sec": 4.69,
141
+ "finetune_sec": 51.98,
142
+ "finetune_steps": 80,
143
+ "best_train_loss": 2.4451
144
+ },
145
+ "symplectic_adam": {
146
+ "accuracy": 0.36,
147
+ "n_eval": 500,
148
+ "eval_sec": 4.7,
149
+ "finetune_sec": 81.83,
150
+ "finetune_steps": 120,
151
+ "best_train_loss": 0.8312
152
+ },
153
+ "huygens_symplectic_adam": {
154
+ "accuracy": 0.372,
155
+ "n_eval": 500,
156
+ "eval_sec": 4.7,
157
+ "finetune_sec": 98.47,
158
+ "finetune_steps": 140,
159
+ "best_train_loss": 0.6025
160
+ }
161
+ },
162
+ "piqa": {
163
+ "task": "piqa",
164
+ "dataset": "baber/piqa",
165
+ "eval_split": "validation",
166
+ "n_eval": 1838,
167
+ "random_baseline": 0.5,
168
+ "zero_shot": {
169
+ "accuracy": 0.5397170837867247,
170
+ "n_eval": 1838,
171
+ "eval_sec": 13.95
172
+ },
173
+ "pair_adam": {
174
+ "accuracy": 0.5337323177366703,
175
+ "n_eval": 1838,
176
+ "eval_sec": 14.0,
177
+ "finetune_sec": 49.49,
178
+ "finetune_steps": 80,
179
+ "best_train_loss": 4.9004
180
+ },
181
+ "symplectic_adam": {
182
+ "accuracy": 0.5397170837867247,
183
+ "n_eval": 1838,
184
+ "eval_sec": 13.95,
185
+ "finetune_sec": 86.21,
186
+ "finetune_steps": 120,
187
+ "best_train_loss": 0.8876
188
+ },
189
+ "huygens_symplectic_adam": {
190
+ "accuracy": 0.5397170837867247,
191
+ "n_eval": 1838,
192
+ "eval_sec": 13.95,
193
+ "finetune_sec": 108.54,
194
+ "finetune_steps": 140,
195
+ "best_train_loss": 0.8785
196
+ }
197
+ },
198
+ "winogrande": {
199
+ "task": "winogrande",
200
+ "dataset": "allenai/winogrande:winogrande_xl",
201
+ "eval_split": "validation",
202
+ "n_eval": 1267,
203
+ "random_baseline": 0.5,
204
+ "zero_shot": {
205
+ "accuracy": 0.5193370165745856,
206
+ "n_eval": 1267,
207
+ "eval_sec": 3.45
208
+ },
209
+ "pair_adam": {
210
+ "accuracy": 0.5240726124704025,
211
+ "n_eval": 1267,
212
+ "eval_sec": 3.09,
213
+ "finetune_sec": 53.91,
214
+ "finetune_steps": 80,
215
+ "best_train_loss": 4.1441
216
+ },
217
+ "symplectic_adam": {
218
+ "accuracy": 0.5240726124704025,
219
+ "n_eval": 1267,
220
+ "eval_sec": 3.09,
221
+ "finetune_sec": 33.62,
222
+ "finetune_steps": 120,
223
+ "best_train_loss": 0.7208
224
+ },
225
+ "huygens_symplectic_adam": {
226
+ "accuracy": 0.5240726124704025,
227
+ "n_eval": 1267,
228
+ "eval_sec": 3.09,
229
+ "finetune_sec": 42.17,
230
+ "finetune_steps": 140,
231
+ "best_train_loss": 0.8362
232
+ }
233
+ },
234
+ "hellaswag": {
235
+ "task": "hellaswag",
236
+ "dataset": "Rowan/hellaswag",
237
+ "eval_split": "validation",
238
+ "n_eval": 1000,
239
+ "random_baseline": 0.25,
240
+ "zero_shot": {
241
+ "accuracy": 0.287,
242
+ "n_eval": 1000,
243
+ "eval_sec": 10.17
244
+ },
245
+ "pair_adam": {
246
+ "accuracy": 0.318,
247
+ "n_eval": 1000,
248
+ "eval_sec": 10.4,
249
+ "finetune_sec": 53.98,
250
+ "finetune_steps": 80,
251
+ "best_train_loss": 4.4042
252
+ },
253
+ "symplectic_adam": {
254
+ "accuracy": 0.327,
255
+ "n_eval": 1000,
256
+ "eval_sec": 10.41,
257
+ "finetune_sec": 110.37,
258
+ "finetune_steps": 120,
259
+ "best_train_loss": 0.7104
260
+ },
261
+ "huygens_symplectic_adam": {
262
+ "accuracy": 0.327,
263
+ "n_eval": 1000,
264
+ "eval_sec": 10.41,
265
+ "finetune_sec": 132.41,
266
+ "finetune_steps": 140,
267
+ "best_train_loss": 1.1398
268
+ }
269
+ },
270
+ "qnli": {
271
+ "task": "qnli",
272
+ "dataset": "nyu-mll/glue:qnli",
273
+ "eval_split": "validation",
274
+ "n_eval": 1000,
275
+ "random_baseline": 0.5,
276
+ "zero_shot": {
277
+ "accuracy": 0.505,
278
+ "n_eval": 1000,
279
+ "eval_sec": 7.59
280
+ },
281
+ "pair_adam": {
282
+ "accuracy": 0.557,
283
+ "n_eval": 1000,
284
+ "eval_sec": 7.8,
285
+ "finetune_sec": 54.27,
286
+ "finetune_steps": 80,
287
+ "best_train_loss": 2.7277
288
+ },
289
+ "symplectic_adam": {
290
+ "accuracy": 0.74,
291
+ "n_eval": 1000,
292
+ "eval_sec": 7.81,
293
+ "finetune_sec": 73.1,
294
+ "finetune_steps": 120,
295
+ "best_train_loss": 0.2444
296
+ },
297
+ "huygens_symplectic_adam": {
298
+ "accuracy": 0.782,
299
+ "n_eval": 1000,
300
+ "eval_sec": 7.84,
301
+ "finetune_sec": 91.88,
302
+ "finetune_steps": 140,
303
+ "best_train_loss": 0.148
304
+ }
305
+ },
306
+ "commonsenseqa": {
307
+ "task": "commonsenseqa",
308
+ "dataset": "tau/commonsense_qa",
309
+ "eval_split": "validation",
310
+ "n_eval": 1221,
311
+ "random_baseline": 0.2,
312
+ "zero_shot": {
313
+ "accuracy": 0.19164619164619165,
314
+ "n_eval": 1221,
315
+ "eval_sec": 11.92
316
+ },
317
+ "pair_adam": {
318
+ "accuracy": 0.23095823095823095,
319
+ "n_eval": 1221,
320
+ "eval_sec": 12.13,
321
+ "finetune_sec": 54.01,
322
+ "finetune_steps": 80,
323
+ "best_train_loss": 3.9139
324
+ },
325
+ "symplectic_adam": {
326
+ "accuracy": 0.23914823914823916,
327
+ "n_eval": 1221,
328
+ "eval_sec": 12.16,
329
+ "finetune_sec": 112.69,
330
+ "finetune_steps": 120,
331
+ "best_train_loss": 1.2686
332
+ },
333
+ "huygens_symplectic_adam": {
334
+ "accuracy": 0.2457002457002457,
335
+ "n_eval": 1221,
336
+ "eval_sec": 12.14,
337
+ "finetune_sec": 138.32,
338
+ "finetune_steps": 140,
339
+ "best_train_loss": 1.1876
340
+ }
341
+ },
342
+ "gsm8k": {
343
+ "task": "gsm8k",
344
+ "dataset": "openai/gsm8k:main",
345
+ "eval_split": "test",
346
+ "n_eval": 500,
347
+ "random_baseline": 0.25,
348
+ "zero_shot": {
349
+ "accuracy": 0.21,
350
+ "perplexity": 60.1165885925293,
351
+ "n_eval": 500,
352
+ "eval_sec": 24.2
353
+ },
354
+ "pair_adam": {
355
+ "accuracy": 0.288,
356
+ "perplexity": 12.520118713378906,
357
+ "n_eval": 500,
358
+ "eval_sec": 24.73,
359
+ "finetune_sec": 57.21,
360
+ "finetune_steps": 80,
361
+ "best_train_loss": 2.2787
362
+ },
363
+ "symplectic_adam": {
364
+ "accuracy": 0.914,
365
+ "perplexity": 10.70208740234375,
366
+ "n_eval": 500,
367
+ "eval_sec": 24.71,
368
+ "finetune_sec": 266.46,
369
+ "finetune_steps": 120,
370
+ "best_train_loss": 0.442
371
+ },
372
+ "huygens_symplectic_adam": {
373
+ "accuracy": 0.932,
374
+ "perplexity": 9.112833023071289,
375
+ "n_eval": 500,
376
+ "eval_sec": 24.71,
377
+ "finetune_sec": 325.33,
378
+ "finetune_steps": 140,
379
+ "best_train_loss": 0.3663
380
+ }
381
+ }
382
+ }
383
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tokenizer_class": "PreTrainedTokenizerFast",
3
+ "bos_token": "<bos>",
4
+ "eos_token": "<eos>",
5
+ "unk_token": "<unk>",
6
+ "pad_token": "<pad>",
7
+ "model_max_length": 1024
8
+ }