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 3.05 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
3.05 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 | |
| }, | |
| "after_sft": { | |
| "val_loss": 0.3129, | |
| "val_ppl": 1.3674, | |
| "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." | |
| } | |
| ] | |
| } | |
| } | |