Text Generation
Transformers
Safetensors
grt
chat
conversational
rotational-transformer
givens-rotations
clifford-algebra
matterwave
Instructions to use MatterWaveAI/grt-30m-chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MatterWaveAI/grt-30m-chat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MatterWaveAI/grt-30m-chat") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("MatterWaveAI/grt-30m-chat", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use MatterWaveAI/grt-30m-chat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MatterWaveAI/grt-30m-chat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MatterWaveAI/grt-30m-chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/MatterWaveAI/grt-30m-chat
- SGLang
How to use MatterWaveAI/grt-30m-chat 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-chat" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MatterWaveAI/grt-30m-chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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-chat" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MatterWaveAI/grt-30m-chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use MatterWaveAI/grt-30m-chat with Docker Model Runner:
docker model run hf.co/MatterWaveAI/grt-30m-chat
Download eval_results.json from MatterWaveAI/grt-30m-chat: direct link, hf CLI and curl.
- Browser
- Download file 7.6 kB
-
https://huggingface.co/MatterWaveAI/grt-30m-chat/resolve/main/eval_results.json
- Command line
-
hf download hf://MatterWaveAI/grt-30m-chat/eval_results.json
-
curl -L -o eval_results.json https://huggingface.co/MatterWaveAI/grt-30m-chat/resolve/main/eval_results.json
7.6 kB
| { | |
| "model_id": "MatterWaveAI/grt-30m-chat", | |
| "architecture": "GRTForCausalLM", | |
| "parameters": 29305498, | |
| "nn_linear_layers": 0, | |
| "chat_template": "ChatML (<|im_start|> / <|im_end|>)", | |
| "before_sft": { | |
| "val_loss": 5.2083, | |
| "val_ppl": 182.7854, | |
| "assistant_token_acc": 0.2469, | |
| "assistant_response_margin": 0.4397, | |
| "multiturn_val_loss": 5.348, | |
| "multiturn_val_ppl": 210.1897 | |
| }, | |
| "after_sft": { | |
| "val_loss": 0.2904, | |
| "val_ppl": 1.337, | |
| "pair_adam_100step_val_loss": 0.3129, | |
| "pair_adam_100step_val_ppl": 1.3674, | |
| "assistant_token_acc": 0.9988, | |
| "assistant_response_margin": 1.0754, | |
| "multiturn_val_loss": 1.7855, | |
| "multiturn_val_ppl": 5.9628, | |
| "samples": [ | |
| { | |
| "user": "Can you explain this briefly? What is GRT-30M?", | |
| "target": "GRT-30M is a 29.3M-parameter Givens Rotational Transformer developed by MatterWave AI that replaces every dense nn.Linear matrix with cascaded 2D Givens rotations and butterfly permutations.", | |
| "generated": "GRT-30M is a 29.3M-parameter Givens Rotational Transformer developed by MatterWave AI that replaces every dense nn.Linear matrix with cascaded 2D Givens rotations and butterfly permutations." | |
| }, | |
| { | |
| "user": "Can you explain this briefly? How does a Givens Rotational Transformer replace dense linear layers?", | |
| "target": "Instead of O(D^2) dense matrix multiplications, GRT represents hidden states as planar coordinate pairs and transforms them through butterfly-permuted 2D Givens rotations modulated by Clifford algebra features.", | |
| "generated": "Instead of O(D^2) dense matrix multiplications, GRT represents hidden states as planar coordinate pairs and transforms them through butterfly-permuted 2D Givens rotations modulated by Clifford algebra features." | |
| }, | |
| { | |
| "user": "Can you explain this briefly? What is PearlNorm in the GRT architecture?", | |
| "target": "PearlNorm is a pair-aware RMS normalization layer that divides each planar (x, y) pair by the root-mean-square of pair radii, rescaling magnitudes while preserving every pair's phase angle.", | |
| "generated": "PearlNorm is a pair-aware RMS normalization layer that divides each planar (x, y) pair by the root-mean-square of pair radii, rescaling magnitudes while preserving every pair's phase angle." | |
| }, | |
| { | |
| "user": "Can you explain this briefly? What is RadialGELU?", | |
| "target": "RadialGELU applies a GELU activation to the Euclidean radius r of each 2D coordinate pair as gelu(r) / r, introducing nonlinearity on pair magnitudes without distorting phase directions.", | |
| "generated": "RadialGELU applies a GELU activation to the Euclidean radius r of each 2D coordinate pair as gelu(r) / r, introducing nonlinearity on pair magnitudes without distorting phase directions." | |
| }, | |
| { | |
| "user": "Can you explain this briefly? How are token embeddings parameterized in GRT?", | |
| "target": "Each token in GRTEmbedding is stored as hidden_size // 2 phase angles plus a scalar log-magnitude, emitting exp(log_magnitude) * (cos(theta), sin(theta)) on the hypersphere.", | |
| "generated": "Each token in GRTEmbedding is stored as hidden_size // 2 phase angles plus a scalar log-magnitude, emitting exp(log_magnitude) * (cos(theta), sin(theta)) on the hypersphere." | |
| } | |
| ] | |
| }, | |
| "optimizer_ablations_8way": { | |
| "hessian_pair_adam": { | |
| "variant": "HessianPairAdam (Sophia-Torus Cauchy-Riemann Curvature)", | |
| "final_train_loss": 0.9501, | |
| "val_loss": 0.2904, | |
| "val_ppl": 1.337, | |
| "assistant_token_acc": 0.9988, | |
| "assistant_response_margin": 1.0754, | |
| "assistant_response_seq_margin": 32.9186, | |
| "multiturn_val_loss": 1.7855, | |
| "multiturn_val_ppl": 5.9628, | |
| "multiturn_token_acc": 0.8026, | |
| "step100_val_loss": 0.3522, | |
| "step100_val_ppl": 1.4222, | |
| "elapsed_s": 49.51 | |
| }, | |
| "cyclide_adam": { | |
| "variant": "CyclideAdam (Dupin Cyclide Conic Metric + Deviatoric Twist)", | |
| "final_train_loss": 0.9506, | |
| "val_loss": 0.2932, | |
| "val_ppl": 1.3406, | |
| "assistant_token_acc": 0.9988, | |
| "assistant_response_margin": 0.9446, | |
| "assistant_response_seq_margin": 28.0276, | |
| "multiturn_val_loss": 1.9591, | |
| "multiturn_val_ppl": 7.0933, | |
| "multiturn_token_acc": 0.7487, | |
| "step100_val_loss": 0.3522, | |
| "step100_val_ppl": 1.4222, | |
| "elapsed_s": 50.19 | |
| }, | |
| "pair_adam": { | |
| "variant": "PairAdam (Factored Toroidal Baseline)", | |
| "final_train_loss": 0.9505, | |
| "val_loss": 0.2971, | |
| "val_ppl": 1.346, | |
| "assistant_token_acc": 0.9988, | |
| "assistant_response_margin": 1.0982, | |
| "assistant_response_seq_margin": 32.9333, | |
| "multiturn_val_loss": 2.0593, | |
| "multiturn_val_ppl": 7.8407, | |
| "multiturn_token_acc": 0.7385, | |
| "step100_val_loss": 0.3639, | |
| "step100_val_ppl": 1.439, | |
| "elapsed_s": 48.57 | |
| }, | |
| "huygens_adam": { | |
| "variant": "HuygensAdam (Circular Order Parameter R_p Splay Torque)", | |
| "final_train_loss": 0.9498, | |
| "val_loss": 0.3107, | |
| "val_ppl": 1.3644, | |
| "assistant_token_acc": 1.0, | |
| "assistant_response_margin": 1.0257, | |
| "assistant_response_seq_margin": 30.9379, | |
| "multiturn_val_loss": 1.6645, | |
| "multiturn_val_ppl": 5.2829, | |
| "multiturn_token_acc": 0.8154, | |
| "step100_val_loss": 0.3784, | |
| "step100_val_ppl": 1.4599, | |
| "elapsed_s": 67.79 | |
| }, | |
| "huygens_symplectic_adam": { | |
| "variant": "HuygensSymplecticAdam (Two-Stage Huygens -> Symplectic Curriculum)", | |
| "final_train_loss": 0.9502, | |
| "val_loss": 0.3361, | |
| "val_ppl": 1.3995, | |
| "assistant_token_acc": 0.9988, | |
| "assistant_response_margin": 1.0957, | |
| "assistant_response_seq_margin": 31.8603, | |
| "multiturn_val_loss": 1.7592, | |
| "multiturn_val_ppl": 5.8075, | |
| "multiturn_token_acc": 0.8051, | |
| "step100_val_loss": 0.398, | |
| "step100_val_ppl": 1.4889, | |
| "elapsed_s": 65.69 | |
| }, | |
| "symplectic_adam": { | |
| "variant": "SymplecticAdam (Gromov-Liouville Non-Squeezing Floor + Casimir Cavity)", | |
| "final_train_loss": 0.9502, | |
| "val_loss": 0.3441, | |
| "val_ppl": 1.4108, | |
| "assistant_token_acc": 0.9938, | |
| "assistant_response_margin": 1.1464, | |
| "assistant_response_seq_margin": 34.5992, | |
| "multiturn_val_loss": 1.9487, | |
| "multiturn_val_ppl": 7.0199, | |
| "multiturn_token_acc": 0.7513, | |
| "step100_val_loss": 0.3961, | |
| "step100_val_ppl": 1.4859, | |
| "elapsed_s": 50.95 | |
| }, | |
| "gyric_adam": { | |
| "variant": "GyricAdam (Poinsot-Lande Gyroscopic Projection + Thomas Precession)", | |
| "final_train_loss": 0.9503, | |
| "val_loss": 0.3476, | |
| "val_ppl": 1.4157, | |
| "assistant_token_acc": 0.9975, | |
| "assistant_response_margin": 1.0779, | |
| "assistant_response_seq_margin": 32.9217, | |
| "multiturn_val_loss": 1.8009, | |
| "multiturn_val_ppl": 6.0552, | |
| "multiturn_token_acc": 0.7718, | |
| "step100_val_loss": 0.4194, | |
| "step100_val_ppl": 1.5211, | |
| "elapsed_s": 70.5 | |
| }, | |
| "polar_natural_adam": { | |
| "variant": "PolarNaturalAdam (Riemannian Polar Metric + Cauchy-Riemann Hessian)", | |
| "final_train_loss": 0.9521, | |
| "val_loss": 0.3883, | |
| "val_ppl": 1.4745, | |
| "assistant_token_acc": 0.9913, | |
| "assistant_response_margin": 0.9159, | |
| "assistant_response_seq_margin": 27.5035, | |
| "multiturn_val_loss": 1.8642, | |
| "multiturn_val_ppl": 6.4505, | |
| "multiturn_token_acc": 0.7692, | |
| "step100_val_loss": 0.4398, | |
| "step100_val_ppl": 1.5524, | |
| "elapsed_s": 49.4 | |
| } | |
| } | |
| } | |