Instructions to use MatterWaveAI/grt-30m-ner with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MatterWaveAI/grt-30m-ner with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="MatterWaveAI/grt-30m-ner")# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForTokenClassification model = AutoModelForTokenClassification.from_pretrained("MatterWaveAI/grt-30m-ner", device_map="auto") - Notebooks
- Google Colab
- Kaggle
GRT-30M-NER (MatterWaveAI/grt-30m-ner)
GRT-30M-NER (GRTForTokenClassification) is a 100% Native Rotational Named Entity Recognition (NER) Model (29,307,847 parameters, zero nn.Linear layers, zero nn.Conv1d layers) built on MatterWaveAI/grt-30m for CoNLL-2003 9-class BIO entity tagging (O, B-PER, I-PER, B-ORG, I-ORG, B-LOC, I-LOC, B-MISC, I-MISC).
Each token's final GRTPearlNorm representation is L2-normalized onto the unit hypersphere and scored against 9 learned planar-pair phase-angle prototypes (phase_angles of shape [9, 128]) and softplus radial gains (pair_scales of shape [9, 128]) inside GRTCosineClassificationHead (classifier), calibrated by output_scale and per-class bias.
8-Way Classical Geometric Optimizer Ablation (GRTForTokenClassification)
All 8 classical geometric optimizers in transformers.models.grt.optimization_grt were benchmarked under an identical 200-step adaptation protocol (seed = 42, batch_size = 24, backbone_lr = 1.6e-4) unfreezing the top rotational transformer block blocks[-1] (811,651 parameters), final_norm (128 parameters), and classifier (2,350 parameters) for 814,257 total trainable parameters (0 nn.Linear):
| Rank | Optimizer (optimization_grt.py) |
Final Train Loss | Val NLL (val_loss) |
Token Acc (%) |
Entity Token F1 (%) |
Entity Span F1 (%) |
Span Precision (%) |
Span Recall (%) |
Wall Time (200 Steps) |
|---|---|---|---|---|---|---|---|---|---|
| 1 | hessian_pair_adam (HessianPairAdam (Sophia-Torus Cauchy-Riemann Curvature)) |
0.0584 |
0.1851 |
95.38% |
91.29% |
69.16% |
62.03% |
78.12% |
24.74s |
| 2 | polar_natural_adam (PolarNaturalAdam (Riemannian Polar Metric + Cauchy-Riemann Hessian)) |
0.0585 |
0.1854 |
95.38% |
91.29% |
69.16% |
62.03% |
78.12% |
23.07s |
| 3 | pair_adam (PairAdam (Factored Toroidal Baseline)) |
0.0587 |
0.1854 |
95.32% |
91.19% |
69.16% |
62.03% |
78.12% |
25.32s |
| 4 | gyric_adam (GyricAdam (Poinsot-Lande Gyroscopic Projection + Thomas Precession)) |
0.0592 |
0.1863 |
95.32% |
91.19% |
69.16% |
62.03% |
78.12% |
239.15s |
| 5 | symplectic_adam (SymplecticAdam (Gromov-Liouville Non-Squeezing Floor + Casimir Cavity)) |
0.0591 |
0.1863 |
95.27% |
91.08% |
68.78% |
61.63% |
77.81% |
241.02s |
| 6 | huygens_symplectic_adam (HuygensSymplecticAdam (Two-Stage Huygens -> Symplectic Curriculum)) |
0.0591 |
0.1863 |
95.27% |
91.08% |
68.78% |
61.63% |
77.81% |
218.89s |
| 7 | cyclide_adam (CyclideAdam (Dupin Cyclide Conic Metric + Deviatoric Twist)) |
0.0585 |
0.1854 |
95.22% |
90.98% |
68.41% |
61.23% |
77.50% |
75.52s |
| 8 | huygens_adam (HuygensAdam (Circular Order Parameter R_p Splay Torque)) |
0.0584 |
0.1853 |
95.22% |
90.98% |
68.04% |
60.84% |
77.19% |
189.88s |
| β | Step-0 Initialized Rotational Head (Before Adaptation) | β | 0.9752 |
64.88% |
51.84% |
20.11% |
14.44% |
33.12% |
β |
Quickstart (transformers)
import torch
from transformers import AutoTokenizer, GRTForTokenClassification
model_id = "MatterWaveAI/grt-30m-ner"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = GRTForTokenClassification.from_pretrained(model_id)
text = "Lead researcher Elena Rostova from MatterWave AI presented the Apache License 2.0 in San Francisco yesterday."
inputs = tokenizer(text, return_tensors="pt")
with torch.no_grad():
logits = model(**inputs).logits
pred_ids = logits.argmax(dim=-1)[0].tolist()
for tok_id, label_id in zip(inputs.input_ids[0].tolist(), pred_ids):
print(f"{tokenizer.decode([tok_id]):18s} -> {model.config.id2label[label_id]}")
License
Apache 2.0
- Downloads last month
- -
Model tree for MatterWaveAI/grt-30m-ner
Base model
MatterWaveAI/grt-30m