alt.freeweights.phi / Phi-4-mini-reasoning-onnx
From: microsoft <huggingface.co/microsoft>Newsgroups: alt.freeweights.phiSubject:

Phi-4-mini-reasoning-onnx

Date: 2026-11-15Commit: 8d5c831Signed: 2DC28CC7B26A283B ✓

Model. Onnx weights, 11.4 GB in all. Published by microsoft under MIT.

phi11.4GBPhi-4-mini-reasoning-onnxonnxpermissive
FactsParamsnot statedSize11.4 GBFormatsonnxTasknot taggedLicenseMITFrom sourcepermissive
$ fw get microsoft/Phi-4-mini-reasoning-onnx
# manifest sha256 28770f5cb75d… · 11.4 GB · 43 files
$ fw verify ./Phi-4-mini-reasoning-onnx microsoft/Phi-4-mini-reasoning-onnx
From sourceHosted (signed)microsoft/Phi-4-mini-reasoning-onnxLast check: 2026-11-15 03:50 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Works with

Runs with

Ranked by fit to this model (onnx), then by GitHub stars.

Convert with

Scan with

Overview

Size
11.4 GB
Weights
288 KB (smallest of 6 ONNX variants)
Parameters
not stated
Formats
onnx
Task
not tagged
License
MIT (permissive)
Files
43, each with a sha256
Publisher
microsoft
Added
2026-11-15
Section
alt.freeweights.phi
Lineage

Original release from the publisher.

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 03:50 UTCpassed

Model card

From the publisher at commit 8d5c831. Shown as plain text with links; images open at the publisher.

Phi-4-Mini-Reasoning ONNX models#

Introduction#

This repository hosts the optimized versions of the Phi-4 mini reasoning models to accelerate inference with ONNX Runtime.

Optimized models are published here in ONNX format to run with ONNX Runtime on CPU and GPU across devices, including server platforms, Windows, Linux and Mac desktops, and mobile CPUs, with the precision best suited to each of these targets.

Here are some of the optimized configurations we have added:

  1. ONNX model for int4 CPU: ONNX model for CPU and mobile using int4 quantization via RTN.
  2. ONNX model for int4 GPU: ONNX model for GPU using int4 quantization via RTN.

Model Run#

You can see how to run examples with ORT GenAI here

For CPU:

# Download the model directly using the Hugging Face CLI
huggingface-cli download microsoft/Phi-4-mini-reasoning-onnx --include cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/* --local-dir .

# Install the CPU package of ONNX Runtime GenAI
pip install --pre onnxruntime-genai

# Please adjust the model directory (-m) accordingly
curl https://raw.githubusercontent.com/microsoft/onnxruntime-genai/main/examples/python/common.py -o common.py
curl https://raw.githubusercontent.com/microsoft/onnxruntime-genai/main/examples/python/model-qa.py -o model-qa.py
python model-qa.py -m cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4 -e cpu

For CUDA:

# Download the model directly using the Hugging Face CLI
huggingface-cli download microsoft/Phi-4-mini-reasoning-onnx --include gpu/* --local-dir .

# Install the CUDA package of ONNX Runtime GenAI
pip install --pre onnxruntime-genai-cuda

# Please adjust the model directory (-m) accordingly
curl https://raw.githubusercontent.com/microsoft/onnxruntime-genai/main/examples/python/common.py -o common.py
curl https://raw.githubusercontent.com/microsoft/onnxruntime-genai/main/examples/python/model-qa.py -o model-qa.py
python model-qa.py -m gpu/gpu-int4-rtn-block-32 -e cuda

For DirectML:

# Download the model directly using the Hugging Face CLI
huggingface-cli download microsoft/Phi-4-mini-reasoning-onnx --include gpu/* --local-dir .

# Install the DML package of ONNX Runtime GenAI
pip install --pre onnxruntime-genai-directml

# Please adjust the model directory (-m) accordingly
curl https://raw.githubusercontent.com/microsoft/onnxruntime-genai/main/examples/python/common.py -o common.py
curl https://raw.githubusercontent.com/microsoft/onnxruntime-genai/main/examples/python/model-qa.py -o model-qa.py
python model-qa.py -m gpu/gpu-int4-rtn-block-32 -e dml

Model Description#

  • Developed by: Microsoft
  • Model type: ONNX
  • License: MIT
  • Model Description: This is a conversion of the Phi-4 mini reasoning model for ONNX Runtime inference.

Disclaimer: Model is only an optimization of the base model, any risk associated with the model is the responsibility of the user of the model. Please verify and test for your scenarios. There may be a slight difference in output from the base model with the optimizations applied.

Base Model#

Phi-4 mini reasoning is a lightweight open model built upon synthetic data and filtered publicly available websites - with a focus on high-quality, reasoning dense data. The model belongs to the Phi-4 model family and supports 128K token context length. The model underwent an enhancement process, incorporating both supervised fine-tuning and direct preference optimization to support precise instruction adherence and robust safety measures. See details at https://huggingface.co/microsoft/Phi-4-mini-reasoning/blob/main/README.md

Performance Comparison#

HardwareONNXPyTorchspeedup
RTX 4090 GPUint4: 260.045 tokens/sec fp16: 97.463 tokens/se fp32: 19.320 tokens/secfp16: 43.957 tokens/sec5x(fp16)
Intel Xeon Platinum 8272CL CPUint4: 16.89 tokens/secfp32: 1.636 tokens/sec10x
Intel Xeon Platinum 8573B CPUint4: 23.978 tokens/secfp32: 4.479 tokens/sec5.35X
AMD EPYC 7763v CPUint4: 19.884 tokens/secfp32: 1.599 tokens/sec12.4x
Intel Core Ultra 7 165H Laptop CPUint4: 4.863 tokens/secfp32: 1.699 tokens/sec2.8x
Intel i7 processorint4: 3.474 tokens/sec fp32: 1.800 tokens/secfp32: 0.702 tokens/sec4.85x

Files

43 files · 11.4 GBWeights 288 KB (smallest of 6 ONNX variants). Sizes and sha256 from the signed manifest.
Show all 43 files with their sha256
FileSizesha256
.gitattributes1.61 KB6d37258060e6eabdd54ea002644865fdaaa41030cb2a01fb037333493b169d10
LICENSE1.10 KBc49419617a6070bcb197cfe272f7007fdec3e790dbb529cb995473bd69c0bd51
README.md4.70 KBf0141865bd5ea5e8b5ec8824bc8e98e10bb3d54a61be1a30d958dff14a986fe9
config.json2.56 KB2283ba68d420b7fddf4be894361142dfa34636c0a81e3af819cc1e660f128f6c
configuration_phi3.py10.9 KBec2044b77d0b8111640ac134daa3af1f40dc552a739f8959626e7e58ea3352df
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/added_tokens.json249 Bd4f2aceb0f20b71dd1f4bcc7e052e4412946bf281840b8f83d39f259571af486
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/config.json2.56 KB2283ba68d420b7fddf4be894361142dfa34636c0a81e3af819cc1e660f128f6c
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/configuration_phi3.py10.9 KBec2044b77d0b8111640ac134daa3af1f40dc552a739f8959626e7e58ea3352df
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/genai_config.json1.52 KB0fcfa1e663f2bc867f8dc62fae65dd0924f0a4d68b43d1234df742dd19171470
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/merges.txt2.42 MB856ce61180bb689282eed6b3a6838bb1f438399be23aefe9d20eb379791fb4ad
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/model.onnx52.1 MB929ee60b9dfcca848a2c62c6533e18c6e74d9d657e01f577e5b54602c02e5ad5
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/model.onnx.data4.86 GBfd04a1bdfd475e5909a7a90a948b4fb425b4a565293ec36e34df7ac8c39fe8a4
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/special_tokens_map.json587 Baff38493227d813e29fcf8406e8e90062f1f031aa47d589325e9c31d89ac7cc3
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/tokenizer.json15.5 MBf08ed885956f70d877a4d9078ec9e3119d8b68a8d579003e230be18cad66911c
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/tokenizer_config.json3.22 KB16d7cf2abc1139ffc61368dbbacd521d1be29baa30e461382f3bea947cba16ec
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/vocab.json3.91 MB6cb65a857824fa6615bb1782d95d882617a8bbce1da0317118586b36f39e98bd
gpu/gpu-int4-rtn-block-32/added_tokens.json249 Bd4f2aceb0f20b71dd1f4bcc7e052e4412946bf281840b8f83d39f259571af486
gpu/gpu-int4-rtn-block-32/config.json2.56 KB2283ba68d420b7fddf4be894361142dfa34636c0a81e3af819cc1e660f128f6c
gpu/gpu-int4-rtn-block-32/configuration_phi3.py10.9 KBec2044b77d0b8111640ac134daa3af1f40dc552a739f8959626e7e58ea3352df
gpu/gpu-int4-rtn-block-32/genai_config.json1.57 KB44539bd5e6a1a53e451698216f326b3f030f206ccea77b35ca5a4137df436835
gpu/gpu-int4-rtn-block-32/merges.txt2.42 MB856ce61180bb689282eed6b3a6838bb1f438399be23aefe9d20eb379791fb4ad
gpu/gpu-int4-rtn-block-32/model.onnx288 KB59ab70c351e50301c1cf4cca3f23176bba73e43f0d94cea26d471ba43b898f65
gpu/gpu-int4-rtn-block-32/model.onnx.data3.41 GB5fc3832908b14538d2d53597507a10160e1307c45e153fa5822d82e6248471c3
gpu/gpu-int4-rtn-block-32/special_tokens_map.json587 Baff38493227d813e29fcf8406e8e90062f1f031aa47d589325e9c31d89ac7cc3
gpu/gpu-int4-rtn-block-32/tokenizer.json15.5 MB166c68da2b6ef97ff617410fc0dc55f422b33be8c2c2409c8fa13ba137d84c61
gpu/gpu-int4-rtn-block-32/tokenizer_config.json3.22 KB16d7cf2abc1139ffc61368dbbacd521d1be29baa30e461382f3bea947cba16ec
gpu/gpu-int4-rtn-block-32/vocab.json3.91 MB6cb65a857824fa6615bb1782d95d882617a8bbce1da0317118586b36f39e98bd
npu/qnn-int4/added_tokens.json249 Bd4f2aceb0f20b71dd1f4bcc7e052e4412946bf281840b8f83d39f259571af486
npu/qnn-int4/config.json2.56 KB2283ba68d420b7fddf4be894361142dfa34636c0a81e3af819cc1e660f128f6c
npu/qnn-int4/genai_config.json16.9 KB9cf1863737bcd75cb59c56e8b505ed316132162a47689f85ff52556471dd6698
npu/qnn-int4/merges.txt2.42 MB856ce61180bb689282eed6b3a6838bb1f438399be23aefe9d20eb379791fb4ad
npu/qnn-int4/phi_4_mini_cb_1.bin509 MB3c063992e42f76600164ddfbb773f602a42466bca8464032b20ff72993e1ecfb
npu/qnn-int4/phi_4_mini_cb_2.bin422 MBa40ba14d7572930139d1257b990576dbf171b531d28db92003785a55b3cc3a28
npu/qnn-int4/phi_4_mini_cb_3.bin409 MB287ab7433b17d007a5c84201fa5132449a8e4d6c0a93c5a7aa591b47a5d6401a
npu/qnn-int4/phi_4_mini_cb_4.bin409 MB61c5c1df25fe0c8820e08f5bd1395bea3f44f55ef6f0d0cb44b95b33fc129f56
npu/qnn-int4/phi_4_mini_ctx.onnx_ctx.onnx1.63 MBf4a9b86439b9bf913fcce67ee594e83f3db00e1336857bb2af91d813967d2237
npu/qnn-int4/phi_4_mini_embeddings.all.quant.onnx615 MB9b366e1ed96d3f714b765683d3c29b7ef26fde063247a8d73daa61c616194581
npu/qnn-int4/phi_4_mini_iter.onnx_ctx.onnx1.63 MB698e3fbe2c0cd3c13966c73101c45a6ea511d856a816f1f0febb8e5aa1ab0189
npu/qnn-int4/phi_4_mini_lm_head.all.quant.onnx616 MB273348542069637e325c2bf042b2a5d7ab339e8c42b3651d39b704b21d27c8af
npu/qnn-int4/special_tokens_map.json587 Baff38493227d813e29fcf8406e8e90062f1f031aa47d589325e9c31d89ac7cc3
npu/qnn-int4/tokenizer.json15.5 MBf08ed885956f70d877a4d9078ec9e3119d8b68a8d579003e230be18cad66911c
npu/qnn-int4/tokenizer_config.json3.32 KB6dcb238a84365a07e19dd4334f82da442eea64da30ecbfa3718c06557ea3a589
npu/qnn-int4/vocab.json3.91 MB6cb65a857824fa6615bb1782d95d882617a8bbce1da0317118586b36f39e98bd
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
8d5c831bed pinned now2026-11-15 03:50 UTC43 files · 11.4 GB

Use it

$ fw get microsoft/Phi-4-mini-reasoning-onnx
# manifest sha256 28770f5cb75d… · 11.4 GB · 43 files
$ fw verify ./Phi-4-mini-reasoning-onnx microsoft/Phi-4-mini-reasoning-onnx
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/microsoft/Phi-4-mini-reasoning-onnx.json --dir ./Phi-4-mini-reasoning-onnx $ python3 fw.py verify ./Phi-4-mini-reasoning-onnx ./microsoft__Phi-4-mini-reasoning-onnx.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download microsoft/Phi-4-mini-reasoning-onnx --revision 8d5c831bede5ea4d224a9c82f1b30ddee9a40dd4 --local-dir ./Phi-4-mini-reasoning-onnx

License

Name
MIT License
Id
MIT
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
LICENSE
Text sha256
c49419617a6070bcb197cfe272f7007fdec3e790dbb529cb995473bd69c0bd51
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: microsoft <huggingface.co/microsoft>Newsgroups: alt.freeweights.phiSubject: Phi-4-mini-reasoning-onnxDate: 2026-11-15Commit: 8d5c831Signed: 2DC28CC7B26A283B ✓
Upstream
microsoft/Phi-4-mini-reasoning-onnx
Pinned commit
8d5c831bede5ea4d224a9c82f1b30ddee9a40dd4
Manifest
Phi-4-mini-reasoning-onnx.json · .minisig
Manifest sha256
28770f5cb75d85535f0f5de9de7a07175902d66b3f6b2488843d32ecc161c75c
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 03:50 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/microsoft/Phi-4-mini-reasoning-onnx.json $ curl -O https://freeweights.allternit.com/manifests/microsoft/Phi-4-mini-reasoning-onnx.json.minisig $ minisign -Vm Phi-4-mini-reasoning-onnx.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

No related models in this catalog.Nothing here lists this model as its parent, and it names no parent.
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download microsoft/Phi-4-mini-reasoning-onnx
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. Phi-4-mini-reasoning-onnx.json. Provenance. Takedown history: none.
From: BAAI <huggingface.co/BAAI>Subject: bunny-phi-2-siglip-lora
From: microsoft <huggingface.co/microsoft>Subject: MediPhi
From: microsoft <huggingface.co/microsoft>Subject: MediPhi-Clinical
From: microsoft <huggingface.co/microsoft>Subject: MediPhi-Guidelines
From: microsoft <huggingface.co/microsoft>Subject: MediPhi-Instruct
From: microsoft <huggingface.co/microsoft>Subject: MediPhi-MedCode