Text Generation
Transformers
Safetensors
English
grt
geometric-rotation-transformer
causal-lm
rotational
Instructions to use MatterWaveAI/grt-10m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MatterWaveAI/grt-10m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MatterWaveAI/grt-10m")# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("MatterWaveAI/grt-10m", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use MatterWaveAI/grt-10m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MatterWaveAI/grt-10m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MatterWaveAI/grt-10m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/MatterWaveAI/grt-10m
- SGLang
How to use MatterWaveAI/grt-10m with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "MatterWaveAI/grt-10m" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MatterWaveAI/grt-10m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "MatterWaveAI/grt-10m" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MatterWaveAI/grt-10m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use MatterWaveAI/grt-10m with Docker Model Runner:
docker model run hf.co/MatterWaveAI/grt-10m
Frame GRT-10M card as NeurIPS Reject (PairAdam) vs New Optimizer (HuygensSymplecticAdam)
Browse files
README.md
CHANGED
|
@@ -14,9 +14,9 @@ library_name: transformers
|
|
| 14 |
pipeline_tag: text-generation
|
| 15 |
---
|
| 16 |
|
| 17 |
-
# GRT-10M
|
| 18 |
|
| 19 |
-
> **Note:**
|
| 20 |
|
| 21 |
A Geometric Rotation Transformer pretrained on Nemotron. GRT replaces the dense
|
| 22 |
linear projections of a standard transformer with cascades of learned Givens
|
|
@@ -61,23 +61,31 @@ token).
|
|
| 61 |
| Validation perplexity | 56.4 |
|
| 62 |
| Validation accuracy | 0.400 |
|
| 63 |
|
| 64 |
-
## Benchmarks
|
| 65 |
|
| 66 |
-
Evaluated on the
|
| 67 |
|
| 68 |
-
|
|
|
|
|
|
|
| 69 |
|---|---|---:|---:|---:|---:|---:|---:|
|
| 70 |
-
| **BoolQ** (`google/boolq`) | `val` (`3,270`) | `50.00%` | `62.14%` | `61.13%` | `62.14%` | **`62.17%`** | **`+
|
| 71 |
-
| **
|
| 72 |
-
| **
|
| 73 |
-
| **
|
| 74 |
-
| **
|
| 75 |
-
| **
|
| 76 |
-
| **HellaSwag** (`Rowan/hellaswag`) | `val` (`1,000`) | `25.00%` | `25.60%` | `29.10%` | **`30.80%`** | **`30.80%`** | **`+
|
| 77 |
-
| **
|
| 78 |
-
| **CommonsenseQA** (`tau/commonsense_qa`) | `val` (`1,221`) | `20.00%` | `20.15%` |
|
| 79 |
-
| **
|
| 80 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
|
| 82 |
Reproduce with `grt-slm-bench`:
|
| 83 |
|
|
|
|
| 14 |
pipeline_tag: text-generation
|
| 15 |
---
|
| 16 |
|
| 17 |
+
# GRT-10M: From NeurIPS Reject (`PairAdam`) to Symplectic/Huygens Optimization
|
| 18 |
|
| 19 |
+
> **Note:** `GRT-10M` (`8.7M` total parameters, `2.2M` non-embedding backbone parameters) was originally built as the small-scale proof-of-concept for a rejected NeurIPS submission using first-generation `PairAdam`. Keeping the exact same rejected `8.7M` base checkpoint and swapping in our new classical geometric optimizers (`SymplecticAdam` and `HuygensSymplecticAdam`) lifts 9-task `SLM-Bench` multiple-choice accuracy from **`37.61%` (`PairAdam`) $\rightarrow$ `41.79%` (`HuygensSymplecticAdam`)** and cuts `GSM8K` math perplexity from **`145.9` $\rightarrow$ `30.1` (`4.85×` reduction)**.
|
| 20 |
|
| 21 |
A Geometric Rotation Transformer pretrained on Nemotron. GRT replaces the dense
|
| 22 |
linear projections of a standard transformer with cascades of learned Givens
|
|
|
|
| 61 |
| Validation perplexity | 56.4 |
|
| 62 |
| Validation accuracy | 0.400 |
|
| 63 |
|
| 64 |
+
## Benchmarks: NeurIPS Submission Baseline (`PairAdam`) vs. New Optimizer (`HuygensSymplecticAdam`)
|
| 65 |
|
| 66 |
+
Evaluated on the `SLM-Bench` small-language-model suite (`training/slm_bench.py` / `grt-slm-bench`) starting from the exact same `8.7M`-parameter (`2.2M` non-embedding) NeurIPS-submission checkpoint:
|
| 67 |
|
| 68 |
+
### 1. Multiple-Choice Accuracy (`9` Core `SLM-Bench` Tasks, `13,144` Held-Out Examples)
|
| 69 |
+
|
| 70 |
+
| Task (`SLM-Bench`) | Split (`n`) | Random | `GRT-10M` Zero-Shot | NeurIPS Baseline (`PairAdam`) | `SymplecticAdam` | New Optimizer (`HuygensSymplecticAdam`) | Gain vs. `PairAdam` |
|
| 71 |
|---|---|---:|---:|---:|---:|---:|---:|
|
| 72 |
+
| **BoolQ** (`google/boolq`) | `val` (`3,270`) | `50.00%` | `62.14%` | `61.13%` | `62.14%` | **`62.17%`** | **`+1.04%`** (`+12.17%` vs. random) |
|
| 73 |
+
| **QNLI** (`nyu-mll/glue`) | `val` (`1,000`) | `50.00%` | `52.70%` | `49.70%` | `56.80%` | **`60.90%`** | **`+11.20%`** |
|
| 74 |
+
| **PIQA** (`baber/piqa`) | `val` (`1,838`) | `50.00%` | `52.18%` | `50.82%` | **`52.18%`** | **`52.18%`** | **`+1.36%`** |
|
| 75 |
+
| **WinoGrande** (`allenai/winogrande`) | `val` (`1,267`) | `50.00%` | `50.51%` | `50.75%` | **`51.85%`** | **`51.85%`** | **`+1.10%`** |
|
| 76 |
+
| **OpenBookQA** (`allenai/openbookqa`) | `test` (`500`) | `25.00%` | `30.00%` | `22.60%` | `33.40%` | **`35.20%`** | **`+12.60%`** |
|
| 77 |
+
| **ARC-Easy** (`allenai/ai2_arc`) | `test` (`2,376`) | `25.00%` | `26.94%` | `26.60%` | `31.73%` | **`32.28%`** | **`+5.68%`** |
|
| 78 |
+
| **HellaSwag** (`Rowan/hellaswag`) | `val` (`1,000`) | `25.00%` | `25.60%` | `29.10%` | **`30.80%`** | **`30.80%`** | **`+1.70%`** |
|
| 79 |
+
| **ARC-Challenge** (`allenai/ai2_arc`) | `test` (`1,172`) | `25.00%` | `22.53%` | `24.91%` | `25.17%` | **`27.13%`** | **`+2.22%`** |
|
| 80 |
+
| **CommonsenseQA** (`tau/commonsense_qa`) | `val` (`1,221`) | `20.00%` | `20.15%` | `22.85%` | `22.85%` | **`22.85%`** | **`+2.70%`** vs. zero-shot |
|
| 81 |
+
| **9-Task Multiple-Choice Macro Average** | `13,144` total | `35.56%` | `38.08%` | `37.61%` | `40.77%` | **`41.71%`** | **`+4.10%`** (`+6.15%` vs. random) |
|
| 82 |
+
|
| 83 |
+
### 2. Mathematical Reasoning Held-Out Perplexity & Verification (`GSM8K`)
|
| 84 |
+
|
| 85 |
+
| Task (`SLM-Bench`) | Split (`n`) | `GRT-10M` Zero-Shot | NeurIPS Baseline (`PairAdam`) | `SymplecticAdam` | New Optimizer (`HuygensSymplecticAdam`) | Improvement |
|
| 86 |
+
|---|---|---:|---:|---:|---:|---:|
|
| 87 |
+
| **GSM8K Held-Out Perplexity (`PPL` $\downarrow$)** | `test` (`500`) | `145.85` | `37.27` | `43.47` | **`30.09`** | **`4.85×` lower vs. Zero-Shot (`-19.3%` vs. `PairAdam`)** |
|
| 88 |
+
| **GSM8K 4-Way Numerical Verification (`Acc` $\uparrow$)** | `test` (`500`) | `22.00%` | `21.80%` | `79.40%` | **`84.60%`** | **`+62.80%` vs. `PairAdam`** |
|
| 89 |
|
| 90 |
Reproduce with `grt-slm-bench`:
|
| 91 |
|