Instructions to use MatterWaveAI/grt-30m-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MatterWaveAI/grt-30m-lora with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MatterWaveAI/grt-30m-lora")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("MatterWaveAI/grt-30m-lora", device_map="auto") - PEFT
How to use MatterWaveAI/grt-30m-lora with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use MatterWaveAI/grt-30m-lora with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf MatterWaveAI/grt-30m-lora:F16 # Run inference directly in the terminal: llama cli -hf MatterWaveAI/grt-30m-lora:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf MatterWaveAI/grt-30m-lora:F16 # Run inference directly in the terminal: llama cli -hf MatterWaveAI/grt-30m-lora:F16
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf MatterWaveAI/grt-30m-lora:F16 # Run inference directly in the terminal: ./build/bin/llama cli -hf MatterWaveAI/grt-30m-lora:F16
Use Docker
docker model run hf.co/MatterWaveAI/grt-30m-lora:F16
- Llama new
- LM Studio
- Jan
- vLLM
How to use MatterWaveAI/grt-30m-lora with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MatterWaveAI/grt-30m-lora" # 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-30m-lora", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/MatterWaveAI/grt-30m-lora:F16
- SGLang
How to use MatterWaveAI/grt-30m-lora 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-30m-lora" \ --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-30m-lora", "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-30m-lora" \ --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-30m-lora", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use MatterWaveAI/grt-30m-lora with Ollama:
ollama run hf.co/MatterWaveAI/grt-30m-lora:F16
- Unsloth Desktop
- Docker Model Runner
How to use MatterWaveAI/grt-30m-lora with Docker Model Runner:
docker model run hf.co/MatterWaveAI/grt-30m-lora:F16
- Lemonade
How to use MatterWaveAI/grt-30m-lora with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull MatterWaveAI/grt-30m-lora:F16
Run and chat with the model
lemonade run user.grt-30m-lora-F16
List all available models
lemonade list
- Atomic Chat
GRT-30M-LoRA (MatterWaveAI/grt-30m-lora)
GRT-30M-LoRA is the canonical Toroidal Low-Rank Adaptation (GRTRotationalLoRA) release for MatterWaveAI/grt-30m (29,305,498 base parameters, 0 nn.Linear layers, 0 nn.Conv1d layers).
Because every projection in a Geometric Rotation Transformer is parameterized by phase angles on the flat torus $\mathbb{T}^P = (S^1)^P$ and radial scales rather than dense Euclidean weight matrices, standard linear LoRA ($W + BA$) cannot be applied without violating orthogonal/unitary manifold invariants. GRTRotationalLoRA instead attaches low-rank phase-shift matrices lora_A and lora_B directly to the butterfly rotation angle tensors:
At inference time, merge_grt_lora(model) folds $\Delta\theta = \frac{\alpha}{r} A B$ directly into $\theta_{\text{base}}$ with bit-exact equivalence (max_abs_diff = 0.0) and zero runtime latency or parameter overhead.
Key Highlights & Metrics
| Metric | Value |
|---|---|
| Adapter Class | GRTRotationalLoRA (transformers.models.grt.lora_grt) |
| Base Checkpoint | MatterWaveAI/grt-30m (29,305,498 params) |
| LoRA Rank ($r$) / Alpha ($\alpha$) | r = 8, lora_alpha = 16.0 (scaling = 2.0) |
| Trainable LoRA + Scale Parameters | 140,741 (0.48% of base model) |
| Adapter Checkpoint Size | 573.3 KB (grt_lora_adapter.safetensors) |
nn.Linear / nn.Conv1d Layers |
0 / 0 (100% Rotational Purity) |
| Optimizer | HessianPairAdam (Sophia-Torus analytic Gauss-Newton curvature) |
| Domain Assistant Loss (Before $\rightarrow$ After) | 6.1720 $\rightarrow$ 4.7464 |
| Domain Perplexity (Before $\rightarrow$ After) | 479.14 $\rightarrow$ 115.16 |
| Token Accuracy (Before $\rightarrow$ After) | 19.5% $\rightarrow$ 28.8% |
Pre-Merge vs. Post-Merge max_abs_diff |
0.0e+00 (bit-exact) |
Quickstart (transformers)
1. Load & Merge MatterWaveAI/grt-30m-lora into MatterWaveAI/grt-30m
import torch
from huggingface_hub import snapshot_download
from transformers import AutoTokenizer
from transformers.models.grt import GRTForCausalLM, load_grt_lora_pretrained
base_id = "MatterWaveAI/grt-30m"
adapter_dir = snapshot_download("MatterWaveAI/grt-30m-lora")
tokenizer = AutoTokenizer.from_pretrained(base_id)
model = GRTForCausalLM.from_pretrained(base_id, torch_dtype=torch.float32)
# Attach and fold the toroidal LoRA phase shifts into base_angles (0 inference overhead)
load_grt_lora_pretrained(model, adapter_dir, merge=True)
prompt = "<|im_start|>user\nExplain how GRTRotationalLoRA adapts a Geometric Rotation Transformer without linear layers.<|im_end|>\n<|im_start|>assistant\n"
inputs = tokenizer(prompt, return_tensors="pt", add_special_tokens=False)
out_ids = model.generate(**inputs, max_new_tokens=64, do_sample=False)
print(tokenizer.decode(out_ids[0, inputs["input_ids"].shape[1]:], skip_special_tokens=True))
2. Train Your Own Toroidal LoRA Adapter
from transformers.models.grt import (
GRTForCausalLM,
attach_grt_lora,
build_grt_optimizer,
merge_grt_lora,
save_grt_lora_pretrained,
)
model = GRTForCausalLM.from_pretrained("MatterWaveAI/grt-30m")
attach_grt_lora(model, r=8, lora_alpha=16.0, tune_scales=True)
optimizer = build_grt_optimizer(model, lr=1e-2, weight_decay=0.0, hessian_mode=True)
# ... training loop ...
save_grt_lora_pretrained(model, "./my-grt-lora")
merge_grt_lora(model) # zero-overhead merged inference
Complete MatterWaveAI/grt-30m* Research Suite on Hugging Face
- Base Causal LM:
MatterWaveAI/grt-30m - Chat Fine-Tune:
MatterWaveAI/grt-30m-chat - 4-Expert Mixture-of-Rotations (
MoR):MatterWaveAI/grt-30m-mor - Circular-Pooled Sentence Embedding:
MatterWaveAI/grt-30m-embedding - Cross-Encoder Reranker:
MatterWaveAI/grt-30m-reranker - Vision-Language (
GRTVL):MatterWaveAI/grt-30m-vl - Canonical Tokenizer & Polar Embedding Bank:
MatterWaveAI/grt-30m-tokenizer - Rotational Text-to-Speech (
GRTTTS):MatterWaveAI/grt-30m-tts - Multimodal Vision-Audio-Language-Speech (
GRTOmni):MatterWaveAI/grt-30m-omni - Toroidal Rotational LoRA (
GRTRotationalLoRA):MatterWaveAI/grt-30m-lora - Rotational Speech-to-Text ASR (
GRTASR):MatterWaveAI/grt-30m-asr
- Whitepaper: The Geometric Rotation Transformer (GRT): A Purely Rotational Foundation Architecture (
GRT_Whitepaper.pdf)
License
Apache 2.0
Citation
@techreport{householter2026grt,
title = {The Geometric Rotation Transformer: A Purely Rotational Foundation Architecture},
author = {Householter, David},
institution = {MatterWave AI},
year = {2026},
url = {https://matterwave.ai}
}
- Downloads last month
- 52
16-bit
32-bit
Model tree for MatterWaveAI/grt-30m-lora
Base model
MatterWaveAI/grt-30m