Text Generation
Transformers
Safetensors
domynedge
domyn
domyn-edge
teacher
math
grpo
fully-open
conversational
custom_code
Instructions to use domyn/Domyn-Edge-Teacher-Math with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use domyn/Domyn-Edge-Teacher-Math with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="domyn/Domyn-Edge-Teacher-Math", trust_remote_code=True) 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("domyn/Domyn-Edge-Teacher-Math", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use domyn/Domyn-Edge-Teacher-Math with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "domyn/Domyn-Edge-Teacher-Math" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "domyn/Domyn-Edge-Teacher-Math", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/domyn/Domyn-Edge-Teacher-Math
- SGLang
How to use domyn/Domyn-Edge-Teacher-Math 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 "domyn/Domyn-Edge-Teacher-Math" \ --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": "domyn/Domyn-Edge-Teacher-Math", "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 "domyn/Domyn-Edge-Teacher-Math" \ --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": "domyn/Domyn-Edge-Teacher-Math", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use domyn/Domyn-Edge-Teacher-Math with Docker Model Runner:
docker model run hf.co/domyn/Domyn-Edge-Teacher-Math
File size: 6,556 Bytes
137fb7f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | ---
library_name: transformers
license: apache-2.0
pipeline_tag: text-generation
base_model: domyn/Domyn-Edge-SFT
datasets:
- domyn/Domyn-Edge-Teacher-Math-Mix
language:
- en
- it
- es
- fr
- de
- pt
- ru
- zh
- ja
- ar
- nl
- id
- tr
tags:
- domyn
- domyn-edge
- teacher
- math
- grpo
- fully-open
---
<p align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://cdn.prod.website-files.com/682dcb35e7fd7a313cae803a/6835cb0fb6bd22a7cba7d645_domyn-logo-payoff-primary-white.svg">
<img alt="Domyn" src="https://cdn.prod.website-files.com/682dcb35e7fd7a313cae803a/6835ca86622d317630fa3861_domyn-logo-primary.svg" width="400">
</picture>
</p>
# Domyn Edge Teacher Math
> [!IMPORTANT]
> **Phased release.** Domyn Edge is a rolling release in three bundles. This teacher is part of the
> second bundle, together with the other domain teachers and their post-training data. See
> [Open resources](#open-resources) for everything released so far.
> [!Note]
> This repository holds the **math teacher** of Domyn Edge: Domyn Edge SFT after GRPO on math
> problems with verifiable final answers. It is one of the domain teachers that score the student's
> rollouts token by token in the multi-teacher on-policy distillation (MOPD) stage of our
> post-training protocol. It is released for research and reproducibility; it is not a
> general-purpose assistant.
## Table of contents
1. [Model summary](#model-summary)
2. [How to use](#how-to-use)
3. [Evaluation](#evaluation)
4. [Limitations](#limitations)
5. [Open resources](#open-resources)
6. [License](#license)
7. [Citation](#citation)
## Model summary
Domyn Edge Teacher Math is a 4B-parameter dense transformer with the same architecture and tokenizer
as [Domyn Edge SFT](https://huggingface.co/domyn/Domyn-Edge-SFT). It was trained in one stage on top
of Domyn Edge SFT:
- **GRPO**: asynchronous group relative policy optimization on math problems with a single verifiable final answer. The reward checks the final answer with
[math-verify](https://github.com/huggingface/Math-Verify): 1 for a correct answer, 0.5 for a
correct answer not given in the format the prompt asks for, 0 otherwise.
The weights are stored in bfloat16.
## How to use
The model loads and serves exactly like Domyn Edge SFT; see the
[Domyn Edge SFT card](https://huggingface.co/domyn/Domyn-Edge-SFT#how-to-use) for the recommended
environment, Transformers and vLLM instructions.
**Chat template.** The repository ships the Domyn Edge SFT chat template unchanged; it is the
template used during GRPO training and in the evaluation below. It opens the system turn with a
fixed identity line ("You are Domyn Edge, a model trained by Domyn.").
**Output format.** The model reasons first and ends with the final answer, usually in `\boxed{}`.
## Evaluation
### Teacher vs student on the general evaluation suite
Scores of this teacher next to those of the student, [Domyn Edge
SFT](https://huggingface.co/domyn/Domyn-Edge-SFT), with one benchmark per area, to check what the
teacher keeps outside its training domain. All scores are percentages.
| Group | Benchmark | Metric | Domyn Edge SFT | Teacher Math | Δ |
|---|---|---|---:|---:|---:|
| Math | AIME 2026 | avg@10 | 61.3 | **79.0** | +17.7 |
| Multilingual math | MGSM (de, en, es, fr, ru) | accuracy | 85.8 | **87.4** | +1.6 |
| Knowledge and reasoning | GPQA Diamond | pass@1 | 56.3 | **59.6** | +3.3 |
| Instruction following | IFBench | prompt strict pass@1 | 24.1 | **25.0** | +0.9 |
| Function calling | BFCL v4, without web search (overall) | pass@1 | **36.5** | 36.2 | -0.3 |
| | BFCL v4 (non-live) | pass@1 | 51.9 | **53.3** | +1.4 |
| | BFCL v4 (live) | pass@1 | **75.9** | 75.1 | -0.8 |
| | BFCL v4 (multi-turn) | pass@1 | 35.9 | **38.8** | +2.9 |
| | BFCL v4 (memory) | pass@1 | **27.3** | 21.5 | -5.8 |
| Agentic | SWE-bench Verified | pass@1 | **33.6** | 29.6 | -4.0 |
| Code | LiveCodeBench (full set)\* | pass@1 | **73.0** | 72.0 | -1.0 |
_\*LiveCodeBench (full set) is all 1,055 problems of LiveCodeBench v6, released between May 2023 and
April 2025._
<details>
<summary>Evaluation settings</summary>
- Served with vLLM in bfloat16, with the chat template shipped in this repository.
- Thinking on. Sampling: temperature 1.0, top-p 0.95, top-k 20, min-p 0, no presence or
repetition penalty.
</details>
### Math evaluation suite
| Benchmark | Metric | Teacher Math | Qwen3.5 4B | Δ |
|---|---|---:|---:|---:|
| AIME 2026 | avg@10 | 79.0 | **82.9** | -3.9 |
| AIME 2025 | avg@10 | 75.9 | **78.3** | -2.4 |
| HMMT Feb 2026 | avg@10 | **65.9** | 63.3 | +2.6 |
| HMMT Feb 2025 | avg@10 | **76.1** | 74.6 | +1.5 |
| GSM8K | accuracy | 93.8 | **95.0** | -1.2 |
| MGSM (de, en, es, fr, ru) | accuracy | 87.4 | **89.8** | -2.4 |
<details>
<summary>Evaluation settings</summary>
- Served with vLLM in bfloat16 at 128k context, thinking on.
- Sampling: temperature 1.0, top-p 0.95, top-k 20, min-p 0, no presence, frequency or repetition
penalty.
- AIME and HMMT: 10 samples per problem, accuracy averaged over the samples (avg@10).
</details>
## Limitations
**A teacher, not an assistant.** This model is one of the domain teachers of multi-teacher on-policy
distillation (MOPD), the post-training stage in which the Domyn Edge student generates its own
responses and each teacher scores them token by token in its own domain. Only math was trained
beyond Domyn Edge SFT.
**Long generations.** On hard problems the model can reason for tens of thousands of tokens.
Training capped responses at 64k tokens; cap the generation length.
**Safety work is incomplete.** No dedicated safety tuning or red teaming was done on this model.
## Open resources
- **This teacher**: [`domyn/Domyn-Edge-Teacher-Math`](https://huggingface.co/domyn/Domyn-Edge-Teacher-Math)
- **Its data**: [`domyn/Domyn-Edge-Teacher-Math-Mix`](https://huggingface.co/datasets/domyn/Domyn-Edge-Teacher-Math-Mix)
- **Student SFT model**: [`domyn/Domyn-Edge-SFT`](https://huggingface.co/domyn/Domyn-Edge-SFT), and its mix [`domyn/Domyn-Edge-SFT-Mix`](https://huggingface.co/datasets/domyn/Domyn-Edge-SFT-Mix)
- **Collection**: [Domyn Edge](https://huggingface.co/collections/domyn/domyn-edge) on Hugging Face
## License
This model is released under [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0).
## Citation
```bibtex
@misc{domynedge2026,
title = {Domyn Edge},
author = {Domyn},
year = {2026},
note = {Technical report, forthcoming in November 2026.},
}
``` |