Text Generation
Transformers
Safetensors
English
domynedge
domyn
domyn-edge
teacher
code
grpo
fully-open
conversational
custom_code
Instructions to use domyn/Domyn-Edge-Teacher-Code with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use domyn/Domyn-Edge-Teacher-Code with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="domyn/Domyn-Edge-Teacher-Code", 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-Code", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use domyn/Domyn-Edge-Teacher-Code 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-Code" # 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-Code", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/domyn/Domyn-Edge-Teacher-Code
- SGLang
How to use domyn/Domyn-Edge-Teacher-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 "domyn/Domyn-Edge-Teacher-Code" \ --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-Code", "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-Code" \ --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-Code", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use domyn/Domyn-Edge-Teacher-Code with Docker Model Runner:
docker model run hf.co/domyn/Domyn-Edge-Teacher-Code
|
Download README.md from domyn/Domyn-Edge-Teacher-Code: direct link, hf CLI and curl.
- Browser
- Download file 7.21 kB
-
https://huggingface.co/domyn/Domyn-Edge-Teacher-Code/resolve/main/README.md
- Command line
-
hf download hf://domyn/Domyn-Edge-Teacher-Code/README.md
-
curl -L -o README.md https://huggingface.co/domyn/Domyn-Edge-Teacher-Code/resolve/main/README.md
7.21 kB
| library_name: transformers | |
| license: apache-2.0 | |
| pipeline_tag: text-generation | |
| base_model: domyn/Domyn-Edge-SFT | |
| datasets: | |
| - domyn/Domyn-Edge-Teacher-Code-Mix | |
| language: | |
| - en | |
| tags: | |
| - domyn | |
| - domyn-edge | |
| - teacher | |
| - code | |
| - 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 Code | |
| > [!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 **code teacher** of Domyn Edge: Domyn Edge SFT after a code and | |
| > software-engineering supervised pass and GRPO on unit-tested programming problems. 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 Code 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 two stages: | |
| 1. **Code SFT**: one epoch at 64k context on competitive programming, general code, CUDA and | |
| repository-level software-engineering data. | |
| 2. **GRPO**: asynchronous group relative policy optimization on programming problems, rewarded by | |
| the fraction of unit tests the generated program passes. | |
| 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 writes its final solution in a single fenced Python | |
| code block at the end of the response. Responses to hard problems often run past 30k tokens, so | |
| leave room in `max_new_tokens`. | |
| ## 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 Code | Δ | | |
| |---|---|---|---:|---:|---:| | |
| | Math | AIME 2026 | avg@10 | 61.3 | **66.3** | +5.0 | | |
| | Multilingual math | MGSM (de, en, es, fr, ru) | accuracy | 85.8 | **87.5** | +1.7 | | |
| | Knowledge and reasoning | GPQA Diamond | pass@1 | 56.3 | **65.4** | +9.1 | | |
| | Instruction following | IFBench | prompt strict pass@1 | 24.1 | **26.0** | +1.9 | | |
| | Function calling | BFCL v4, without web search (overall) | pass@1 | 36.5 | **37.7** | +1.2 | | |
| | | BFCL v4 (non-live) | pass@1 | 51.9 | **55.8** | +3.9 | | |
| | | BFCL v4 (live) | pass@1 | **75.9** | 75.4 | -0.5 | | |
| | | BFCL v4 (multi-turn) | pass@1 | 35.9 | **36.0** | +0.1 | | |
| | | BFCL v4 (memory) | pass@1 | 27.3 | **31.4** | +4.1 | | |
| | Agentic | SWE-bench Verified | pass@1 | **33.6** | 25.0 | -8.6 | | |
| | Code | LiveCodeBench (full set)\* | pass@1 | 73.0 | **74.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> | |
| ### Code evaluation suite | |
| | Benchmark | Metric | Teacher Code | Qwen3.5 4B | Δ | | |
| |---|---|---:|---:|---:| | |
| | HumanEval | pass@1 | **92.1** | 89.6 | +2.5 | | |
| | MBPP (sanitized) | pass@1 | **82.9** | 72.0 | +10.9 | | |
| | CRUXEval-O | pass@1 | 72.1 | **84.1** | -12.0 | | |
| | CRUXEval-I | pass@1 | 81.4 | **89.1** | -7.7 | | |
| | LiveBench coding | pass@1 | 64.2 | **72.1** | -7.9 | | |
| | LiveCodeBench (Qwen set)\* | pass@1 | **53.1** | 47.3 | +5.8 | | |
| | BigCodeBench | pass@1 | 33.0 | **46.9** | -13.9 | | |
| _\*LiveCodeBench (Qwen set) is the 131 problems of LiveCodeBench v6 released from February to April 2025, | |
| the subset selected by the 2025-02 to 2025-05 window that Qwen uses to report LiveCodeBench. These | |
| recent problems are harder than the full set of 1,055 problems used in the teacher vs student table, | |
| so the scores are lower._ | |
| <details> | |
| <summary>Evaluation settings</summary> | |
| - Served with vLLM in bfloat16 at 64k context, thinking on. | |
| - HumanEval, MBPP, CRUXEval and LiveBench coding: temperature 1.0, top-p 0.95, top-k 20, min-p 0, no | |
| presence or repetition penalty. | |
| - LiveCodeBench and BigCodeBench: temperature 0.6, top-p 0.95, top-k 20, min-p 0, no presence or repetition | |
| penalty. | |
| - [Qwen3.5 4B](https://huggingface.co/Qwen/Qwen3.5-4B) is evaluated in the same settings, using its | |
| own chat template. | |
| </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. | |
| **Long generations.** On hard problems the model can reason for tens of thousands of tokens, and a | |
| small share of responses degenerate when they run far past 64k tokens. Cap the generation length. | |
| **Safety work is incomplete.** No dedicated safety tuning or red teaming was done on this model. | |
| Run generated code in a sandbox. | |
| ## Open resources | |
| - **This teacher**: [`domyn/Domyn-Edge-Teacher-Code`](https://huggingface.co/domyn/Domyn-Edge-Teacher-Code) | |
| - **Its data**: [`domyn/Domyn-Edge-Teacher-Code-Mix`](https://huggingface.co/datasets/domyn/Domyn-Edge-Teacher-Code-Mix) (SFT and RL splits) | |
| - **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.}, | |
| } | |
| ``` | |