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

Phi-4-reasoning-onnx

Date: 2026-11-15Commit: f5d8c9cSigned: 2DC28CC7B26A283B ✓

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

phi19.9GBPhi-4-reasoning-onnxonnxpermissive
FactsParamsnot statedSize19.9 GBFormatsonnxTasknot taggedLicenseMITFrom sourcepermissive
$ fw get microsoft/Phi-4-reasoning-onnx
# manifest sha256 3c5e2de9ba5b… · 19.9 GB · 25 files
$ fw verify ./Phi-4-reasoning-onnx microsoft/Phi-4-reasoning-onnx
From sourceHosted (signed)microsoft/Phi-4-reasoning-onnxLast check: 2026-11-15 03:53 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
19.9 GB
Weights
266 KB (smallest of 2 ONNX variants)
Parameters
not stated
Formats
onnx
Task
not tagged
License
MIT (permissive)
Files
25, 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:53 UTCpassed

Model card

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

Phi-4 Reasoning ONNX models#

Introduction#

This repository hosts the optimized versions of the Phi-4 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-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-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-reasoning-onnx --include gpu/* --local-dir .

# Install the DML package of ONNX Runtime GenAI
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 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 reasoning is a state-of-the-art open model built upon a blend of synthetic datasets, data from filtered public domain websites, and acquired academic books and Q&A datasets. The goal of this approach was to ensure that small capable models were trained with data focused on high quality and advanced reasoning. See details at https://huggingface.co/microsoft/Phi-4-reasoning/blob/main/README.md.

Files

25 files · 19.9 GBWeights 266 KB (smallest of 2 ONNX variants). Sizes and sha256 from the signed manifest.
Show all 25 files with their sha256
FileSizesha256
.gitattributes1.61 KB6d37258060e6eabdd54ea002644865fdaaa41030cb2a01fb037333493b169d10
LICENSE1.10 KBc49419617a6070bcb197cfe272f7007fdec3e790dbb529cb995473bd69c0bd51
README.md3.68 KB0687972d48352806ae3a2e8e139f2b58ba55dbc55383ca56603eeb627bae3a6e
config.json796 B0a13d8a96ac97a77871e10739669fd75cb1d7e2e403d5cd6ee0819233a30eff8
configuration_phi3.py10.9 KBec2044b77d0b8111640ac134daa3af1f40dc552a739f8959626e7e58ea3352df
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/config.json796 B0a13d8a96ac97a77871e10739669fd75cb1d7e2e403d5cd6ee0819233a30eff8
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.48 KBf58bf7a843c74acaa47c135d2eeaa10b8c93cd1ab6d1313bec0a8db5ee62769f
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/merges.txt917 KBb6fe424e334903f7fb84d3a106d9730455f4744b9fe3c21ee136d97a00e72502
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/model.onnx266 KB5398bcc88f945aea1ce42648dbec37b520915d3f41d5fb199cc8002113d58a0c
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/model.onnx.data10.9 GBe015e1f95b2844807d38ea495778b629160c28f981ddbeae3b203d8ed0105f23
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/special_tokens_map.json463 Bbeb064d75e46a606ef1404691efc14c40b73b98ba4e4b20f35f1383b3f6c0c42
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/tokenizer.json7.15 MBb28a32dcbbb2779573aa8e345457e7b10f470ccfd262d01672c2469698cbd4f7
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/tokenizer_config.json19.0 KB889e1696cfd3ac5f091e676b9ea78d8899a1f45d18a2f0f96bb7221d2b172a80
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/vocab.json1.61 MB23b80b3c4932a7733eb91487cb2fdbc56c5bd199a459128f538095a36dad5287
gpu/gpu-int4-rtn-block-32/config.json796 B0a13d8a96ac97a77871e10739669fd75cb1d7e2e403d5cd6ee0819233a30eff8
gpu/gpu-int4-rtn-block-32/configuration_phi3.py10.9 KBec2044b77d0b8111640ac134daa3af1f40dc552a739f8959626e7e58ea3352df
gpu/gpu-int4-rtn-block-32/genai_config.json1.52 KB8a26e6b15490393865cf5fd7632451c2dc2d4b79b14ff159f337e2296fb66a7f
gpu/gpu-int4-rtn-block-32/merges.txt917 KBb6fe424e334903f7fb84d3a106d9730455f4744b9fe3c21ee136d97a00e72502
gpu/gpu-int4-rtn-block-32/model.onnx359 KBbc2038958d9a92310c4fc3727bd51b760bc6aa915bd8d9c897f61070ddfdfc93
gpu/gpu-int4-rtn-block-32/model.onnx.data8.99 GB9d2e92e8d7d3cbe31e8613a1f8f884eafbae27bf3bcf2bf9646408665f21fa8b
gpu/gpu-int4-rtn-block-32/special_tokens_map.json463 Bbeb064d75e46a606ef1404691efc14c40b73b98ba4e4b20f35f1383b3f6c0c42
gpu/gpu-int4-rtn-block-32/tokenizer.json7.15 MBb28a32dcbbb2779573aa8e345457e7b10f470ccfd262d01672c2469698cbd4f7
gpu/gpu-int4-rtn-block-32/tokenizer_config.json19.0 KB889e1696cfd3ac5f091e676b9ea78d8899a1f45d18a2f0f96bb7221d2b172a80
gpu/gpu-int4-rtn-block-32/vocab.json1.61 MB23b80b3c4932a7733eb91487cb2fdbc56c5bd199a459128f538095a36dad5287
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
f5d8c9c1f0 pinned now2026-11-15 03:53 UTC25 files · 19.9 GB

Use it

$ fw get microsoft/Phi-4-reasoning-onnx
# manifest sha256 3c5e2de9ba5b… · 19.9 GB · 25 files
$ fw verify ./Phi-4-reasoning-onnx microsoft/Phi-4-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-reasoning-onnx.json --dir ./Phi-4-reasoning-onnx $ python3 fw.py verify ./Phi-4-reasoning-onnx ./microsoft__Phi-4-reasoning-onnx.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download microsoft/Phi-4-reasoning-onnx --revision f5d8c9c1f0dad99f7d6212eee2c8ea4ebee7b935 --local-dir ./Phi-4-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-reasoning-onnxDate: 2026-11-15Commit: f5d8c9cSigned: 2DC28CC7B26A283B ✓
Upstream
microsoft/Phi-4-reasoning-onnx
Pinned commit
f5d8c9c1f0dad99f7d6212eee2c8ea4ebee7b935
Manifest
Phi-4-reasoning-onnx.json · .minisig
Manifest sha256
3c5e2de9ba5b799eb7beccb22653041a023c0cd06ccba4b2ffb22584b818a925
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 03:53 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/microsoft/Phi-4-reasoning-onnx.json $ curl -O https://freeweights.allternit.com/manifests/microsoft/Phi-4-reasoning-onnx.json.minisig $ minisign -Vm Phi-4-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-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-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