feat: benchmarks (ARC 0.345 z=3.1), charts, card generated from artifacts
Browse files- README.md +95 -0
- arc_gsm8k.png +0 -0
- gsm8k_rolling.png +0 -0
- training_curve.png +0 -0
README.md
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
library_name: materia
|
| 4 |
+
pipeline_tag: text-generation
|
| 5 |
+
tags:
|
| 6 |
+
- materia
|
| 7 |
+
- snn
|
| 8 |
+
- ssm
|
| 9 |
+
- from-scratch
|
| 10 |
+
- 1b
|
| 11 |
+
language:
|
| 12 |
+
- en
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# MATERIA v2 — 1B, trained from scratch
|
| 16 |
+
|
| 17 |
+
A 1.03B decoder built from scratch with three non-standard pieces: a
|
| 18 |
+
parallel **SNN** branch, a **diagonal SSM** branch, and **HSAQ**, an
|
| 19 |
+
adaptive activation-sparsity transform. Not a fine-tune, not a
|
| 20 |
+
distillation: trained on raw text from random initialisation.
|
| 21 |
+
|
| 22 |
+
## Architecture (measured from the weights)
|
| 23 |
+
|
| 24 |
+
| Component | Value |
|
| 25 |
+
|---|---|
|
| 26 |
+
| parameters | 1.03B |
|
| 27 |
+
| dim | 2560 |
|
| 28 |
+
| blocks | 28 |
|
| 29 |
+
| heads / kv-heads | 16 / 4 |
|
| 30 |
+
| MLP (SwiGLU) hidden | 2048 |
|
| 31 |
+
| SNN channels | 448 |
|
| 32 |
+
| positions | RoPE (no learned table, no fixed ceiling) |
|
| 33 |
+
| SNN threshold | calibrated by quantile every 50 steps |
|
| 34 |
+
|
| 35 |
+
## Training
|
| 36 |
+
|
| 37 |
+
- **344M tokens** over 30000 optimizer steps
|
| 38 |
+
- density: **0.33 tokens per parameter**
|
| 39 |
+
- data: `HuggingFaceFW/fineweb-edu` (streaming)
|
| 40 |
+
- context: 1024, micro-batch 6, effective batch 12
|
| 41 |
+
- selected by held-out loss, not training loss
|
| 42 |
+
|
| 43 |
+
For scale: Chinchilla suggests ~20 tokens per parameter. This model saw
|
| 44 |
+
a small fraction of that, so treat it as a working prototype of the
|
| 45 |
+
architecture rather than a capable language model.
|
| 46 |
+
|
| 47 |
+
## Results
|
| 48 |
+
|
| 49 |
+
| Benchmark | Accuracy | Chance |
|
| 50 |
+
|---|---|---|
|
| 51 |
+
| ARC-easy (log-likelihood over 4 choices) | 0.345 (69/200) | 0.250 |
|
| 52 |
+
| GSM8K (greedy, exact match on final number) | 0.000 (0/30) | ~0 |
|
| 53 |
+
|
| 54 |
+
GSM8K used **30 items**, not the full test set: MATERIA has no KV
|
| 55 |
+
cache, so generation is quadratic in tokens. That sample is an
|
| 56 |
+
indicator, not a publishable benchmark figure.
|
| 57 |
+
|
| 58 |
+
## Held-out loss
|
| 59 |
+
|
| 60 |
+
Best validation cross-entropy: **3.8603** (wikitext-style held-out
|
| 61 |
+
slice, 4 fixed batches). Lower is better; the run went from 4.74 to
|
| 62 |
+
3.86 without a single regression over 17 measurements.
|
| 63 |
+
|
| 64 |
+
## Usage
|
| 65 |
+
|
| 66 |
+
This is not a `transformers` architecture. Load it with the MATERIA code:
|
| 67 |
+
|
| 68 |
+
```python
|
| 69 |
+
from eval_standard import MateriaBackend
|
| 70 |
+
backend = MateriaBackend('model.safetensors') # geometry is read from the weights
|
| 71 |
+
print(backend.generate('The capital of France is', max_new_tokens=8))
|
| 72 |
+
```
|
| 73 |
+
|
| 74 |
+
The full loader and training code live in
|
| 75 |
+
[`MethodWhite/materia-core`](https://github.com/MethodWhite/materia-core).
|
| 76 |
+
|
| 77 |
+
## Limits
|
| 78 |
+
|
| 79 |
+
- Trained on a token budget one to two orders of magnitude below what the
|
| 80 |
+
architecture needs; benchmark numbers reflect that, not the design.
|
| 81 |
+
- GSM8K sample is small (see above) and the model has no KV cache.
|
| 82 |
+
- No instruction tuning, no chat template, no safety tuning.
|
| 83 |
+
- The SNN branch was measured contributing at inference (rate ~0.45-0.55
|
| 84 |
+
against a 0.47 target); no ablation of its effect on quality is claimed.
|
| 85 |
+
|
| 86 |
+
## Reproduce
|
| 87 |
+
|
| 88 |
+
```
|
| 89 |
+
train_materia_fast.py --steps 30000 --batch 6 --accum 2 --seq 1024 \
|
| 90 |
+
--dim 2560 --blocks 28 --cycles 1 --hidden 2048 --snn-dim 448 \
|
| 91 |
+
--lr 6e-5 --val-batches 4 --val-every 1000 \
|
| 92 |
+
--dataset HuggingFaceFW/fineweb-edu --out run/
|
| 93 |
+
```
|
| 94 |
+
|
| 95 |
+
Card generated from the run artifacts on 2026-11-29.
|
arc_gsm8k.png
ADDED
|
gsm8k_rolling.png
ADDED
|
training_curve.png
ADDED
|