Text Generation
Transformers
Safetensors
grt
code
python
tool-calling
function-calling
rotational-transformer
givens-rotations
clifford-algebra
matterwave
Run this model with HF Jobs
Run MatterWaveAI/grt-30m-code on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/MatterWaveAI/grt-30m-code. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/MatterWaveAI/grt-30m-code on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/MatterWaveAI/grt-30m-code. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/MatterWaveAI/grt-30m-code. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use MatterWaveAI/grt-30m-code with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MatterWaveAI/grt-30m-code with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MatterWaveAI/grt-30m-code")# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("MatterWaveAI/grt-30m-code", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use MatterWaveAI/grt-30m-code with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MatterWaveAI/grt-30m-code" # 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-code", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/MatterWaveAI/grt-30m-code
- SGLang
How to use MatterWaveAI/grt-30m-code 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-code" \ --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-code", "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-code" \ --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-code", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use MatterWaveAI/grt-30m-code with Docker Model Runner:
docker model run hf.co/MatterWaveAI/grt-30m-code
Fix model card formatting (replace raw LaTeX with clean Unicode and code spans)
Browse files24 unmodified lines2526272829303132333435361 unmodified line3839404142434424 unmodified lines## Code & Tool-Calling Alignment Metrics- **Held-Out Code & Tool-Call Validation Perplexity**: `54.93` (`val_loss = 4.0061` base) $\rightarrow$ **`1.7632`** (`val_loss = 0.5672` w/ `HuygensAdam`; `1.8253` w/ `PairAdam`, `1.8619` w/ `GyricAdam`)- **Held-Out Python Code Token Top-1 Accuracy**: `46.80%` $\rightarrow$ **`99.07%`** (`HuygensAdam`; `98.93%` w/ `CyclideAdam`, `98.53%` w/ `GyricAdam`)- **Held-Out Python AST Syntax Validity (`ast.parse`)**: `0.00%` $\rightarrow$ **`91.67%`** (`HuygensAdam`; `83.33%` w/ `CyclideAdam`)- **Held-Out Structured Tool-Call Token Top-1 Accuracy**: `36.44%` $\rightarrow$ **`90.69%`** (`HuygensAdam` & `PairAdam`; `89.50%` w/ `CyclideAdam`)- **Held-Out JSON Tool-Call Schema Match Rate**: `0.00%` $\rightarrow$ **`83.33%`** (`HuygensAdam` & `PairAdam`; `75.00%` w/ `CyclideAdam`, `GyricAdam`, `HuygensSymplecticAdam`)- **Code Signature/Docstring Conditioning Margin ($\Delta\mathcal{L}$)**: `0.8998` $\rightarrow$ **`1.6597` nats/tok** (`PairAdam`) / **`1.5766` nats/tok** (`SymplecticAdam`)---1 unmodified lineWe benchmarked all 8 classical geometric, Riemannian, conic, symplectic, gyroscopic, and synchronization optimizers from `transformers.models.grt.optimization_grt` on `MatterWaveAI/grt-30m-code` (`200` SFT steps on `blocks[11:12]` + `final_norm` + `<|im_end|>` polar phase calibration, `811,907` trainable parameters, `batch_size = 16`, `lr = 6.5e-3`, `max_angular_step = 0.12`, `seed = 42`):| Rank | Optimizer (`optimizer_type`) | Final Train Loss | Val Loss | Val PPL | Code Token Acc (%) | Tool-Call Token Acc (%) | JSON Schema Match (%) | Python AST Valid (%) | Conditioning Margin ($\Delta\mathcal{L}$) | Wall Time (s) || :---: | :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: || **1** | **`HuygensAdam` (`huygens_adam`)** | **`1.0882`** | **`0.5672`** | **`1.7632`** | **`99.07%`** | **`90.69%`** | **`83.33%`** | **`91.67%`** | `1.5152` | `138.63s` || **2** | **`PairAdam` (`pair_adam`)** | `1.0994` | `0.6018` | `1.8253` | `97.60%` | **`90.69%`** | **`83.33%`** | `50.00%` | **`1.6597`** | `278.80s` |24 unmodified lines2526272829303132333435361 unmodified line3839404142434424 unmodified lines## Code & Tool-Calling Alignment Metrics- **Held-Out Code & Tool-Call Validation Perplexity**: `54.93` (`val_loss = 4.0061` base) → **`1.7632`** (`val_loss = 0.5672` w/ `HuygensAdam`; `1.8253` w/ `PairAdam`, `1.8619` w/ `GyricAdam`)- **Held-Out Python Code Token Top-1 Accuracy**: `46.80%` → **`99.07%`** (`HuygensAdam`; `98.93%` w/ `CyclideAdam`, `98.53%` w/ `GyricAdam`)- **Held-Out Python AST Syntax Validity (`ast.parse`)**: `0.00%` → **`91.67%`** (`HuygensAdam`; `83.33%` w/ `CyclideAdam`)- **Held-Out Structured Tool-Call Token Top-1 Accuracy**: `36.44%` → **`90.69%`** (`HuygensAdam` & `PairAdam`; `89.50%` w/ `CyclideAdam`)- **Held-Out JSON Tool-Call Schema Match Rate**: `0.00%` → **`83.33%`** (`HuygensAdam` & `PairAdam`; `75.00%` w/ `CyclideAdam`, `GyricAdam`, `HuygensSymplecticAdam`)- **Code Signature/Docstring Conditioning Margin (`ΔL`)**: `0.8998` → **`1.6597` nats/tok** (`PairAdam`) / **`1.5766` nats/tok** (`SymplecticAdam`)---1 unmodified lineWe benchmarked all 8 classical geometric, Riemannian, conic, symplectic, gyroscopic, and synchronization optimizers from `transformers.models.grt.optimization_grt` on `MatterWaveAI/grt-30m-code` (`200` SFT steps on `blocks[11:12]` + `final_norm` + `<|im_end|>` polar phase calibration, `811,907` trainable parameters, `batch_size = 16`, `lr = 6.5e-3`, `max_angular_step = 0.12`, `seed = 42`):| Rank | Optimizer (`optimizer_type`) | Final Train Loss | Val Loss | Val PPL | Code Token Acc (%) | Tool-Call Token Acc (%) | JSON Schema Match (%) | Python AST Valid (%) | Conditioning Margin (`ΔL`) | Wall Time (s) || :---: | :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: || **1** | **`HuygensAdam` (`huygens_adam`)** | **`1.0882`** | **`0.5672`** | **`1.7632`** | **`99.07%`** | **`90.69%`** | **`83.33%`** | **`91.67%`** | `1.5152` | `138.63s` || **2** | **`PairAdam` (`pair_adam`)** | `1.0994` | `0.6018` | `1.8253` | `97.60%` | **`90.69%`** | **`83.33%`** | `50.00%` | **`1.6597`** | `278.80s` |
README.md+7-7