Text Generation
Transformers
Safetensors
llada2_moe
diffusion
dllm
mmd
code
custom_code
conversational
Run this model with HF Jobs
Run yresearch/DMax-Coder-MMD 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/yresearch/DMax-Coder-MMD. 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/yresearch/DMax-Coder-MMD 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/yresearch/DMax-Coder-MMD. 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/yresearch/DMax-Coder-MMD. 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 yresearch/DMax-Coder-MMD with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yresearch/DMax-Coder-MMD with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="yresearch/DMax-Coder-MMD", 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("yresearch/DMax-Coder-MMD", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use yresearch/DMax-Coder-MMD with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "yresearch/DMax-Coder-MMD" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yresearch/DMax-Coder-MMD", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/yresearch/DMax-Coder-MMD
- SGLang
How to use yresearch/DMax-Coder-MMD 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 "yresearch/DMax-Coder-MMD" \ --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": "yresearch/DMax-Coder-MMD", "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 "yresearch/DMax-Coder-MMD" \ --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": "yresearch/DMax-Coder-MMD", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use yresearch/DMax-Coder-MMD with Docker Model Runner:
docker model run hf.co/yresearch/DMax-Coder-MMD
Commit ·
34470fa
1
Parent(s): 8e3f801
Preview model card for DMax-Coder-MMD (#1)
Browse files- Preview model card for DMax-Coder-MMD (e8f6700ab395ef39f4675c48cb9b9103a7c571ca)
- Add license, paper and code badges to model card (310eb4b712ef4a3ba66ca1e4ff1f9fd979d62733)
- Change code badge label to GitHub | Code (541337aed4401a9e30d173a28f725039f88255c0)
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293---license: apache-2.0library_name: transformersbase_model: Zigeng/DMax-Coder-16Bbase_model_relation: finetunedatasets: - Zigeng/DMax-LLaDA-2.0-Mini-Code-Trajectoriestags: - diffusion - dllm - mmd - code - custom_code---
# DMax-Coder-MMD
[](https://www.apache.org/licenses/LICENSE-2.0)  [](https://github.com/yandex-research/dlm-mmd)
**Representation-Space MMD for Diffusion Language Models**
DMax-Coder-MMD is a 16B diffusion language model for code generation,obtained by MMD post-training of[DMax-Coder-16B](https://huggingface.co/Zigeng/DMax-Coder-16B).It builds on LLaDA2.0-mini and uses DMax's hybrid masked–uniform block diffusion.
The post-training objective minimizes Maximum Mean Discrepancy (MMD) betweenmodel samples and reference responses, measured in the representation space ofa frozen diffusion language model. The project reports increased tokens perforward pass while maintaining or improving accuracy on the benchmarks below.
## Reference results
Results reported in the project README, with decoding threshold **0.9**.Each entry is **accuracy (%) / tokens per forward pass (TPF)**.Baseline results are attributed to the original DMax paper in the project README.
| Method | HumanEval-Instruct | MBPP-Instruct || --- | :---: | :---: || DMax-Coder | 83.5 / 7.36 | 79.2 / 5.86 || **DMax-Coder-MMD** | **85.9** / **8.07** | **83.0** / **6.10** |
Results can vary with hardware, tensor parallelism, and library versions.TPF measures decoding parallelism; wall-clock speed also depends on the runtime.
## Evaluation and inference
Use DMax's dInfer evaluation pipeline. After following the evaluation environmentsetup in the [project README](https://github.com/yandex-research/dlm-mmd#installation),run from the project repository root:
```bashconda activate dinferDOMAIN=code MODEL_PATH=yresearch/DMax-Coder-MMD bash scripts/eval.sh```
The project's code evaluation uses threshold **0.9** and evaluatesHumanEval-Instruct and MBPP-Instruct.
The checkpoint includes nine Safetensors shards with BF16 parameters and FP32router bias buffers, plus its tokenizer, chat template, and custom model code.Direct Transformers loading requires `trust_remote_code=True`. Pass`dtype=torch.bfloat16` for BF16 loading; the current configuration declares FP32.
Generation requires the DMax/dInfer diffusion decoder. The included custombackbone does not implement the standard Transformers `.generate()` interface.
## License and acknowledgements
The model follows the **Apache-2.0** license of the[DMax-Coder base checkpoint](https://huggingface.co/Zigeng/DMax-Coder-16B)and [LLaDA2.0-mini](https://huggingface.co/inclusionAI/LLaDA2.0-mini).The included model implementation retains its Apache-2.0 notices.The separate MMD training repository is MIT-licensed, with Apache-2.0 third-party components.
We thank the authors of [DMax](https://github.com/czg1225/DMax),[LLaDA2.0-mini](https://huggingface.co/inclusionAI/LLaDA2.0-mini), and[dInfer](https://github.com/inclusionAI/dInfer) for releasing their models, data, and code.
## Citation
If you find this work useful in your research, please consider citing:
```bibtex@article{drobyshevskiy2026mmd, title = {Representation-Space MMD for Diffusion Language Models}, author = {Drobyshevskiy, Ilya and Sudakov, Ilia and Semenov, Maksim and Kuznedelev, Denis and Ignatov, Maksim and Temirchev, Pavel and Balagansky, Nikita and Meshchaninov, Viacheslav and Gushchin, Nikita and Baranchuk, Dmitry}, journal = {arXiv preprint TODO}, year = {2026}}```README.mdAdded+93