Text Generation
Transformers
Safetensors
deepseek_v3
conversational
custom_code
text-generation-inference
Run this model with HF Jobs
Run microsoft/MAI-DS-R1 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/microsoft/MAI-DS-R1. 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/microsoft/MAI-DS-R1 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/microsoft/MAI-DS-R1. 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/microsoft/MAI-DS-R1. 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 microsoft/MAI-DS-R1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use microsoft/MAI-DS-R1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="microsoft/MAI-DS-R1", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("microsoft/MAI-DS-R1", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("microsoft/MAI-DS-R1", trust_remote_code=True, device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use microsoft/MAI-DS-R1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "microsoft/MAI-DS-R1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "microsoft/MAI-DS-R1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/microsoft/MAI-DS-R1
- SGLang
How to use microsoft/MAI-DS-R1 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 "microsoft/MAI-DS-R1" \ --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": "microsoft/MAI-DS-R1", "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 "microsoft/MAI-DS-R1" \ --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": "microsoft/MAI-DS-R1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use microsoft/MAI-DS-R1 with Docker Model Runner:
docker model run hf.co/microsoft/MAI-DS-R1
Add files using upload-large-folder tool
Browse filesFiles changed (35)
- .gitattributes+7
- figures/coding.pngAdded
- figures/harm_mitigation_answer_only.pngAdded
- figures/harm_mitigation_thinking_only.pngAdded
- figures/math.pngAdded
- figures/reasoning.pngAdded
- figures/responsiveness.pngAdded
- figures/satisfaction.pngAdded
- model-00281-of-00314.safetensorsAdded+3
- model-00282-of-00314.safetensorsAdded+3
- model-00283-of-00314.safetensorsAdded+3
- model-00284-of-00314.safetensorsAdded+3
- model-00285-of-00314.safetensorsAdded+3
- model-00286-of-00314.safetensorsAdded+3
- model-00287-of-00314.safetensorsAdded+3
- model-00288-of-00314.safetensorsAdded+3
- model-00289-of-00314.safetensorsAdded+3
- model-00290-of-00314.safetensorsAdded+3
- model-00291-of-00314.safetensorsAdded+3
- model-00292-of-00314.safetensorsAdded+3
- model-00293-of-00314.safetensorsAdded+3
- model-00301-of-00314.safetensorsAdded+3
- model-00302-of-00314.safetensorsAdded+3
- model-00303-of-00314.safetensorsAdded+3
- model-00304-of-00314.safetensorsAdded+3
- model-00305-of-00314.safetensorsAdded+3
- model-00306-of-00314.safetensorsAdded+3
- model-00307-of-00314.safetensorsAdded+3
- model-00308-of-00314.safetensorsAdded+3
- model-00309-of-00314.safetensorsAdded+3
- model-00310-of-00314.safetensorsAdded+3
- model-00311-of-00314.safetensorsAdded+3
- model-00312-of-00314.safetensorsAdded+3
- model-00313-of-00314.safetensorsAdded+3
- model-00314-of-00314.safetensorsAdded+3
32 unmodified lines33343532 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text32 unmodified lines3334353637383940414232 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -textfigures/harm_mitigation_answer_only.png filter=lfs diff=lfs merge=lfs -textfigures/harm_mitigation_thinking_only.png filter=lfs diff=lfs merge=lfs -textfigures/math.png filter=lfs diff=lfs merge=lfs -textfigures/coding.png filter=lfs diff=lfs merge=lfs -textfigures/responsiveness.png filter=lfs diff=lfs merge=lfs -textfigures/reasoning.png filter=lfs diff=lfs merge=lfs -textfigures/satisfaction.png filter=lfs diff=lfs merge=lfs -text
123version https://git-lfs.github.com/spec/v1oid sha256:6de5cc82112a7f3a9f0c8d325f6ab7ccf24718ab839c8839507a1d02846bc656size 4286611440123version https://git-lfs.github.com/spec/v1oid sha256:4ad0ba6a445a329e426c037d37631063721aa7c38940459d820c5e46ed36405esize 4282799952123version https://git-lfs.github.com/spec/v1oid sha256:d49f25c29b7c034616afade8d01dc2c920594a90767141b85a3357ca97bbde14size 4286596920123version https://git-lfs.github.com/spec/v1oid sha256:78e85a98b4b85aa4ac95d360c1ae0e26d6d3ee5e3b79a6a70c623bca8123b3acsize 4286597032123version https://git-lfs.github.com/spec/v1oid sha256:3e26eb3da53706e4a4d7752b7e9427b564470d549fae6a9ea127dc05c70a38bcsize 4286597064123version https://git-lfs.github.com/spec/v1oid sha256:061d8f544bdad5e3252a7fb9df5d041e5637647b9c22a8bb839d083036b76998size 4286625944123version https://git-lfs.github.com/spec/v1oid sha256:ab1ddd3a79de3ce37cdbba631b969079c9edb0f23d032bc8868074ffcda7cddcsize 4286596904123version https://git-lfs.github.com/spec/v1oid sha256:81479177ac4bf91df49a15c03d02aa88d94a876b17572040fd374115511b5629size 4282800000123version https://git-lfs.github.com/spec/v1oid sha256:05462fecc32a80104d08eaa71b51205d88fa18b7cdd718cb0202b2a03c75db6asize 4286596968123version https://git-lfs.github.com/spec/v1oid sha256:c0f47bd3070bbafb602aebb7ce425692cd2184642ef71ff6ca8be2e506df7894size 4286597024123version https://git-lfs.github.com/spec/v1oid sha256:466757da39e4acdf81337de8547abb771d589e2674c547f0d0539345b2582da0size 4286597064123version https://git-lfs.github.com/spec/v1oid sha256:5273edfe9e4e7721d56b9097641cff0ecde459fcdfc93661efe411b986f4e416size 4286625840123version https://git-lfs.github.com/spec/v1oid sha256:9507ee29dcadd73643d2e823c3c089a0a9380f2428cab6ba8252815e463a7f47size 4286596904123version https://git-lfs.github.com/spec/v1oid sha256:1548285e0f857f5655946d9d5aba3014107fb2b304ba4b6de69f8c761ff06383size 4286597064123version https://git-lfs.github.com/spec/v1oid sha256:9285702df892243d0af7893debf194dbe83bbb4af14bf48681e8031c46256eb8size 4286611496123version https://git-lfs.github.com/spec/v1oid sha256:e2b2ef5c750dd032d1bec639e750dafadfdd760111af411881f53e3dfa27699esize 4286611360123version https://git-lfs.github.com/spec/v1oid sha256:391ab7bc57618e7b2f19e7678c02d17d6789348b137083eedeaf8c33d54a7a5esize 4282799992123version https://git-lfs.github.com/spec/v1oid sha256:90d1b5be2ebd44539fcf1d65d642e58525f081f2372abe33afc802ea693d982dsize 4286596968123version https://git-lfs.github.com/spec/v1oid sha256:2509f60977c3d382146d4287f4e1791cf1188d34e4dc1a8b8cc2f8f52203ba12size 4286597024123version https://git-lfs.github.com/spec/v1oid sha256:1819b841dfb4c0fb22749fe8486675131b1de58e32bdc1cb1abf298d587c00adsize 4286597064123version https://git-lfs.github.com/spec/v1oid sha256:7e749808937cd26bb1fdd1127a9500934717fb65517448ef66c944dc6ec7b427size 4286625856123version https://git-lfs.github.com/spec/v1oid sha256:d24516b63b851f21ca7da3e15656105e6a6c6368d99f1d30e781552a2b0ffad5size 4286596904123version https://git-lfs.github.com/spec/v1oid sha256:8ebb6da5332353f2d388c259301a2758cb5bd277a53923bb4acf438a458f8fb6size 4282799992123version https://git-lfs.github.com/spec/v1oid sha256:989c0512d1c561fd5e4ece473683d99dd64ec59ac5c5c42346de4721d34aee3asize 4286597064123version https://git-lfs.github.com/spec/v1oid sha256:19e087fc38a8093c567f6b1f9c77365d20bdea2b371969a77386391536cd534dsize 4290273696123version https://git-lfs.github.com/spec/v1oid sha256:e786badbbe158eb5c1004e31a5808c05504951c8c83e95e33c9c62007d713595size 4286597064123version https://git-lfs.github.com/spec/v1oid sha256:2c81732f8513ed456f5272d6ba55e8fba8bb3a3b780a9a39796e885c458b6727size 880836448.gitattributes+7
figures/coding.pngAdded

Large File Pointer Details
- SHA256: 7bb3ba412a418663b6dd2dda7a82902c9eb7897d5cc676ec92bd3541e7a1b1d6
- Pointer size: 131 Bytes
- Size of remote file: 211 kB
figures/harm_mitigation_answer_only.pngAdded

Large File Pointer Details
- SHA256: 4130783c4dc874ec858d6ed9c29e3886c1dab66a49274297ef2a92d4db2f65cd
- Pointer size: 131 Bytes
- Size of remote file: 278 kB
figures/harm_mitigation_thinking_only.pngAdded

Large File Pointer Details
- SHA256: 0b0bb0f22279d799b018b6c1025c3734cf3338c5369518524de133581071a209
- Pointer size: 131 Bytes
- Size of remote file: 270 kB
figures/math.pngAdded

Large File Pointer Details
- SHA256: 763c51792472b7861062a55687597ce5d2d7f59ff5637b561e99c54b179de8cf
- Pointer size: 131 Bytes
- Size of remote file: 214 kB
figures/reasoning.pngAdded

Large File Pointer Details
- SHA256: b194a7930937f446055d587fb3772d17d60f2906880fccefe4b3e79202462203
- Pointer size: 131 Bytes
- Size of remote file: 277 kB
figures/responsiveness.pngAdded

Large File Pointer Details
- SHA256: 4924a8f2889ded82b394af14b90b2fb95ac77be216e7cfaa59d1814f3d913b84
- Pointer size: 131 Bytes
- Size of remote file: 137 kB
figures/satisfaction.pngAdded

Large File Pointer Details
- SHA256: 127540e1ec2d2b0870d1c0d097944e8752b9263b758e4c59b2f294a98353fe3e
- Pointer size: 131 Bytes
- Size of remote file: 127 kB
model-00281-of-00314.safetensorsAdded+3
model-00282-of-00314.safetensorsAdded+3
model-00283-of-00314.safetensorsAdded+3
model-00284-of-00314.safetensorsAdded+3
model-00285-of-00314.safetensorsAdded+3
model-00286-of-00314.safetensorsAdded+3
model-00287-of-00314.safetensorsAdded+3
model-00288-of-00314.safetensorsAdded+3
model-00289-of-00314.safetensorsAdded+3
model-00290-of-00314.safetensorsAdded+3
model-00291-of-00314.safetensorsAdded+3
model-00292-of-00314.safetensorsAdded+3
model-00293-of-00314.safetensorsAdded+3
model-00301-of-00314.safetensorsAdded+3
model-00302-of-00314.safetensorsAdded+3
model-00303-of-00314.safetensorsAdded+3
model-00304-of-00314.safetensorsAdded+3
model-00305-of-00314.safetensorsAdded+3
model-00306-of-00314.safetensorsAdded+3
model-00307-of-00314.safetensorsAdded+3
model-00308-of-00314.safetensorsAdded+3
model-00309-of-00314.safetensorsAdded+3
model-00310-of-00314.safetensorsAdded+3
model-00311-of-00314.safetensorsAdded+3
model-00312-of-00314.safetensorsAdded+3
model-00313-of-00314.safetensorsAdded+3
model-00314-of-00314.safetensorsAdded+3