alt.freeweights.phi / Phi-3-mini-128k-instruct-onnx
From: microsoft <huggingface.co/microsoft>Newsgroups: alt.freeweights.phiSubject:

Phi-3-mini-128k-instruct-onnx

Date: 2026-11-15Commit: 7302d28Signed: 2DC28CC7B26A283B ✓

Text generation model. Onnx weights, 17.7 GB in all. Published by microsoft under MIT.

phi17.7GBPhi-3-mini-128k-instruct-onnxonnxpermissive
FactsParamsnot statedSize17.7 GBFormatsonnxTasktext generationLicenseMITFrom sourcepermissive
$ fw get microsoft/Phi-3-mini-128k-instruct-onnx
# manifest sha256 7349df670418… · 17.7 GB · 55 files
$ fw verify ./Phi-3-mini-128k-instruct-onnx microsoft/Phi-3-mini-128k-instruct-onnx
From sourceHosted (signed)microsoft/Phi-3-mini-128k-instruct-onnxLast check: 2026-11-15 03:47 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

Overview

Size
17.7 GB
Weights
26.1 MB (smallest of 5 ONNX variants)
Parameters
not stated
Formats
onnx
Task
text generation
License
MIT (permissive)
Files
55, 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:47 UTCpassed

Model card

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

Phi-3 Mini-128K-Instruct ONNX models#

This repository hosts the optimized versions of Phi-3-mini-128k-instruct to accelerate inference with ONNX Runtime.

Phi-3 Mini is a lightweight, state-of-the-art open model built upon datasets used for Phi-2 - synthetic data and filtered websites - with a focus on very high-quality, reasoning dense data. The model belongs to the Phi-3 model family, and the mini version comes in two variants: 4K and 128K which is the context length (in tokens) it can support. The model underwent a rigorous enhancement process, incorporating both supervised fine-tuning and direct preference optimization to ensure precise instruction adherence and robust safety measures.

Optimized Phi-3 Mini 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.

DirectML support lets developers bring hardware acceleration to Windows devices at scale across AMD, Intel, and NVIDIA GPUs. Along with DirectML, ONNX Runtime provides cross platform support for Phi-3 Mini across a range of devices for CPU, GPU, and mobile.

To easily get started with Phi-3, you can use our newly introduced ONNX Runtime Generate() API. See here for instructions on how to run it.

ONNX Models#

Here are some of the optimized configurations we have added:

  1. ONNX model for int4 DML: ONNX model for AMD, Intel, and NVIDIA GPUs on Windows, quantized to int4 using AWQ.
  2. ONNX model for fp16 CUDA: ONNX model you can use to run for your NVIDIA GPUs.
  3. ONNX model for int4 CUDA: ONNX model for NVIDIA GPUs using int4 quantization via RTN.
  4. ONNX model for int4 CPU and Mobile: ONNX model for your CPU and Mobile, using int4 quantization via RTN. There are two versions uploaded to balance latency vs. accuracy. Acc=1 is targeted at improved accuracy, while Acc=4 is for improved perf. For mobile devices, we recommend using the model with acc-level-4.

More updates on AMD, and additional optimizations on CPU and Mobile will be added with the official ORT 1.18 release in early May. Stay tuned!

Hardware Supported#

The models are tested on:

  • GPU SKU: RTX 4090 (DirectML)
  • GPU SKU: 1 A100 80GB GPU, SKU: Standard_ND96amsr_A100_v4 (CUDA)
  • CPU SKU: Standard F64s v2 (64 vcpus, 128 GiB memory)
  • Mobile SKU: Samsung Galaxy S21

Minimum Configuration Required:

  • Windows: DirectX 12-capable GPU and a minimum of 4GB of combined RAM
  • CUDA: NVIDIA GPU with Compute Capability >= 7.0
Model Description#
  • Developed by: Microsoft
  • Model type: ONNX
  • Language(s) (NLP): Python, C, C++
  • License: MIT
  • Model Description: This is a conversion of the Phi-3 Mini-4K-Instruct model for ONNX Runtime inference.

Additional Details#

How to Get Started with the Model#

To make running of the Phi-3 models across a range of devices and platforms across various execution provider backends possible, we introduce a new API to wrap several aspects of generative AI inferencing. This API make it easy to drag and drop LLMs straight into your app. For running the early version of these models with ONNX Runtime, follow the steps here.

For example:

python model-qa.py -m /*{YourModelPath}*/onnx/cpu_and_mobile/phi-3-mini-4k-instruct-int4-cpu -k 40 -p 0.95 -t 0.8 -r 1.0
*Input:*  <|user|>Tell me a joke<|end|><|assistant|>

*Output:*  Why don't scientists trust atoms?
           Because they make up everything!

This joke plays on the double meaning of "make up." In science, atoms are the fundamental building blocks of matter, literally making up everything. However, in a colloquial sense, "to make up" can mean to fabricate or lie, hence the humor.

Performance Metrics#

Phi-3 Mini-128K-Instruct performs better in ONNX Runtime than PyTorch for all batch size, prompt length combinations. For FP16 CUDA, ORT performs up to 5X faster than PyTorch, while with INT4 CUDA it's up to 9X faster than PyTorch.

The table below shows the average throughput of the first 256 tokens generated (tps) for FP16 and INT4 precisions on CUDA as measured on 1 A100 80GB GPU, SKU: Standard_ND96amsr_A100_v4.

Batch Size, Prompt LengthORT FP16 CUDAPyTorch Eager FP16 CUDAFP16 CUDA Speed Up (ORT/PyTorch)
1, 16134.4625.355.30
1, 64132.2125.695.15
1, 256124.5125.774.83
1, 1024110.0325.734.28
1, 204896.9325.723.77
1, 409662.1225.662.42
4, 16521.10101.315.14
4, 64507.03101.664.99
4, 256459.47101.154.54
4, 1024343.60101.093.40
4, 2048264.81100.782.63
4, 4096158.0077.982.03
16, 161689.08394.194.28
16, 641567.13394.293.97
16, 2561232.10405.303.04
16, 1024680.61294.792.31
16, 2048350.77203.021.73
16, 4096192.36OOM
Batch Size, Prompt LengthPyTorch Eager INT4 CUDAINT4 CUDA Speed Up (ORT/PyTorch)
1, 1625.358.89
1, 6425.698.58
1, 25625.777.69
1, 102425.736.34
1, 204825.725.24
1, 409625.662.97
4, 16101.312.82
4, 64101.662.77
4, 256101.152.64
4, 1024101.092.20
4, 2048100.781.84
4, 409677.981.62
16, 16394.192.52
16, 64394.292.41
16, 256405.302.00
16, 1024294.791.79
16, 2048203.021.81
16, 4096OOM

Note: PyTorch compile and Llama.cpp currently do not support the Phi-3 Mini-128K-Instruct model.

Package Versions#
Pip package nameVersion
torch2.2.0
triton2.2.0
onnxruntime-gpu1.18.0
onnxruntime-genai0.2.0
onnxruntime-genai-cuda0.2.0
onnxruntime-genai-directml0.2.0
transformers4.39.0
bitsandbytes0.42.0

Appendix#

Activation Aware Quantization#

AWQ works by identifying the top 1% most salient weights that are most important for maintaining accuracy and quantizing the remaining 99% of weights. This leads to less accuracy loss from quantization compared to many other quantization techniques. For more on AWQ, see here.

Model Card Contact#

parinitarahi, kvaishnavi, natke

Contributors#

Kunal Vaishnavi, Sunghoon Choi, Yufeng Li, Akshay Sonawane, Sheetal Arun Kadam, Rui Ren, Edward Chen, Scott McKay, Ryan Hill, Emma Ning, Natalie Kershaw, Parinita Rahi, Patrice Vignola, Chai Chaoweeraprasit, Logan Iyer, Vicente Rivera, Jacques Van Rhyn

Files

55 files · 17.7 GBWeights 26.1 MB (smallest of 5 ONNX variants). Sizes and sha256 from the signed manifest.
Show all 55 files with their sha256
FileSizesha256
.gitattributes1.57 KB1403a1a07764f40b81196144fc294c8daff49cbc0f1d0a79fcfbf5e35a027311
LICENSE12.5 KBc6186c688d3a12fdad30e4fe4962de3af2897bd47944702962f8cac94a646f94
README.md8.00 KB957913a1dfa3162d80ef06c5b5dbeef9c1d8ec0d774f1c82f4b366aa1dbc556b
config.json3.37 KB238d73feedf558b3dfca8e74d27ad0f8a769163aaac4b330f995ba2b633ea6a8
configuration_phi3.py10.4 KB18b06d379f5199bfb8b7da26da14c580f3852e792895d2bf6158b2ef33c92d52
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/added_tokens.json306 Bf8e5a880c6c563a126d9efacb654e105fc4b66f21e5a540f04436e9487a955fb
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/config.json3.37 KB238d73feedf558b3dfca8e74d27ad0f8a769163aaac4b330f995ba2b633ea6a8
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/configuration_phi3.py10.4 KB18b06d379f5199bfb8b7da26da14c580f3852e792895d2bf6158b2ef33c92d52
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/genai_config.json1.58 KB2aa6f742b2f0a7034248fc92188b97c3705ccbbc11311413cdebc1b9e94e0e80
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/phi3-mini-128k-instruct-cpu-int4-rtn-block-32-acc-level-4.onnx52.1 MBf22fca92fd03c5efa368a06f5bb668015d3a36677c01b241dda31af758f3d888
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/phi3-mini-128k-instruct-cpu-int4-rtn-block-32-acc-level-4.onnx.data2.72 GBc0a595a4eac2075818630d881e8cb2b8e97cb85ee6a0ff63d68c4b9a9a05a1c9
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/special_tokens_map.json599 B810adc6e6c6ef2f56c285ef930d243358a3a9f05e36a01c5a10bafc6fac4609b
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/tokenizer.json1.94 MB072ab882d6c7192a42f78790945d16c064691321a73251a4b18f6a380f0fbe39
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/tokenizer.model500 KB9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/tokenizer_config.json3.44 KBaaa87217a0f61c684cdc8703d3d4030a1f5b1077183610b61a14d7f28addbb58
cpu_and_mobile/cpu-int4-rtn-block-32/added_tokens.json306 Bf8e5a880c6c563a126d9efacb654e105fc4b66f21e5a540f04436e9487a955fb
cpu_and_mobile/cpu-int4-rtn-block-32/config.json3.37 KB238d73feedf558b3dfca8e74d27ad0f8a769163aaac4b330f995ba2b633ea6a8
cpu_and_mobile/cpu-int4-rtn-block-32/configuration_phi3.py10.4 KB18b06d379f5199bfb8b7da26da14c580f3852e792895d2bf6158b2ef33c92d52
cpu_and_mobile/cpu-int4-rtn-block-32/genai_config.json1.57 KB9e20e572bc19fb4610c9eb9bcac69aad355c330768aeda63cacaa43ade32d3a5
cpu_and_mobile/cpu-int4-rtn-block-32/phi3-mini-128k-instruct-cpu-int4-rtn-block-32.onnx52.1 MB4e0cff7f236dc76ce10815f122541cb503ef38801b9cf6c6cc48e1c3dffe09ca
cpu_and_mobile/cpu-int4-rtn-block-32/phi3-mini-128k-instruct-cpu-int4-rtn-block-32.onnx.data2.72 GBc0a595a4eac2075818630d881e8cb2b8e97cb85ee6a0ff63d68c4b9a9a05a1c9
cpu_and_mobile/cpu-int4-rtn-block-32/special_tokens_map.json599 B810adc6e6c6ef2f56c285ef930d243358a3a9f05e36a01c5a10bafc6fac4609b
cpu_and_mobile/cpu-int4-rtn-block-32/tokenizer.json1.94 MB072ab882d6c7192a42f78790945d16c064691321a73251a4b18f6a380f0fbe39
cpu_and_mobile/cpu-int4-rtn-block-32/tokenizer.model500 KB9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
cpu_and_mobile/cpu-int4-rtn-block-32/tokenizer_config.json3.44 KBaaa87217a0f61c684cdc8703d3d4030a1f5b1077183610b61a14d7f28addbb58
cuda/cuda-fp16/added_tokens.json306 Bf8e5a880c6c563a126d9efacb654e105fc4b66f21e5a540f04436e9487a955fb
cuda/cuda-fp16/config.json3.37 KB238d73feedf558b3dfca8e74d27ad0f8a769163aaac4b330f995ba2b633ea6a8
cuda/cuda-fp16/configuration_phi3.py10.4 KB18b06d379f5199bfb8b7da26da14c580f3852e792895d2bf6158b2ef33c92d52
cuda/cuda-fp16/genai_config.json1.73 KBbe330bcb3ad8fde808f4e950189dbe61bc35903184f7c9b7c2b0ce97d09eec7f
cuda/cuda-fp16/phi3-mini-128k-instruct-cuda-fp16.onnx26.1 MB543dbe021574541134fdd975a9c22b80c38ca3d8ec7138db937fdd93b0914a99
cuda/cuda-fp16/phi3-mini-128k-instruct-cuda-fp16.onnx.data7.64 GB7646ea1bb3523183c07fde0814980a4d0aa488abf4e6364979d67ea19939e245
cuda/cuda-fp16/special_tokens_map.json599 B810adc6e6c6ef2f56c285ef930d243358a3a9f05e36a01c5a10bafc6fac4609b
cuda/cuda-fp16/tokenizer.json1.94 MB072ab882d6c7192a42f78790945d16c064691321a73251a4b18f6a380f0fbe39
cuda/cuda-fp16/tokenizer.model500 KB9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
cuda/cuda-fp16/tokenizer_config.json3.44 KBaaa87217a0f61c684cdc8703d3d4030a1f5b1077183610b61a14d7f28addbb58
cuda/cuda-int4-rtn-block-32/added_tokens.json306 Bf8e5a880c6c563a126d9efacb654e105fc4b66f21e5a540f04436e9487a955fb
cuda/cuda-int4-rtn-block-32/config.json3.37 KB238d73feedf558b3dfca8e74d27ad0f8a769163aaac4b330f995ba2b633ea6a8
cuda/cuda-int4-rtn-block-32/configuration_phi3.py10.4 KB18b06d379f5199bfb8b7da26da14c580f3852e792895d2bf6158b2ef33c92d52
cuda/cuda-int4-rtn-block-32/genai_config.json1.75 KB3e107708bb94d83a98b5d6cd2529197f887174d50b6ab51a52b9bdcaee54d617
cuda/cuda-int4-rtn-block-32/phi3-mini-128k-instruct-cuda-int4-rtn-block-32.onnx26.2 MB89ecae6d6e74c4d15bdf6dad8fa11c4f56f79328cd1623d336bae52693538e75
cuda/cuda-int4-rtn-block-32/phi3-mini-128k-instruct-cuda-int4-rtn-block-32.onnx.data2.29 GB9c7117fdc3bc7a4a15146523809528f6ccd62202a117d0edde8c2f6c158c45d3
cuda/cuda-int4-rtn-block-32/special_tokens_map.json599 B810adc6e6c6ef2f56c285ef930d243358a3a9f05e36a01c5a10bafc6fac4609b
cuda/cuda-int4-rtn-block-32/tokenizer.json1.94 MB072ab882d6c7192a42f78790945d16c064691321a73251a4b18f6a380f0fbe39
cuda/cuda-int4-rtn-block-32/tokenizer.model500 KB9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
cuda/cuda-int4-rtn-block-32/tokenizer_config.json3.44 KBaaa87217a0f61c684cdc8703d3d4030a1f5b1077183610b61a14d7f28addbb58
directml/directml-int4-awq-block-128/added_tokens.json306 Bf8e5a880c6c563a126d9efacb654e105fc4b66f21e5a540f04436e9487a955fb
directml/directml-int4-awq-block-128/config.json3.37 KB238d73feedf558b3dfca8e74d27ad0f8a769163aaac4b330f995ba2b633ea6a8
directml/directml-int4-awq-block-128/configuration_phi3.py10.4 KB18b06d379f5199bfb8b7da26da14c580f3852e792895d2bf6158b2ef33c92d52
directml/directml-int4-awq-block-128/genai_config.json1.63 KB0621e5f2d947d59d56eb3c0dd6fcad54571139ba6478d9230ab95fde1cc352bc
directml/directml-int4-awq-block-128/model.onnx32.6 MBeac80c41ab030386a8074bb04a43f05a1572b4efaf7fca3a3d3bafd1b4aaeeb7
directml/directml-int4-awq-block-128/model.onnx.data2.13 GBe19d903f9f384ba6199c8285722b9cb8a9a27a3657d69b963891d35fab459e11
directml/directml-int4-awq-block-128/special_tokens_map.json599 B810adc6e6c6ef2f56c285ef930d243358a3a9f05e36a01c5a10bafc6fac4609b
directml/directml-int4-awq-block-128/tokenizer.json1.94 MB072ab882d6c7192a42f78790945d16c064691321a73251a4b18f6a380f0fbe39
directml/directml-int4-awq-block-128/tokenizer.model500 KB9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
directml/directml-int4-awq-block-128/tokenizer_config.json3.44 KBaaa87217a0f61c684cdc8703d3d4030a1f5b1077183610b61a14d7f28addbb58
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
7302d286b8 pinned now2026-11-15 03:47 UTC55 files · 17.7 GB

Use it

$ fw get microsoft/Phi-3-mini-128k-instruct-onnx
# manifest sha256 7349df670418… · 17.7 GB · 55 files
$ fw verify ./Phi-3-mini-128k-instruct-onnx microsoft/Phi-3-mini-128k-instruct-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-3-mini-128k-instruct-onnx.json --dir ./Phi-3-mini-128k-instruct-onnx $ python3 fw.py verify ./Phi-3-mini-128k-instruct-onnx ./microsoft__Phi-3-mini-128k-instruct-onnx.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download microsoft/Phi-3-mini-128k-instruct-onnx --revision 7302d286b8e921cc28042162f6d0b9f9417d8c51 --local-dir ./Phi-3-mini-128k-instruct-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
c6186c688d3a12fdad30e4fe4962de3af2897bd47944702962f8cac94a646f94
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-3-mini-128k-instruct-onnxDate: 2026-11-15Commit: 7302d28Signed: 2DC28CC7B26A283B ✓
Upstream
microsoft/Phi-3-mini-128k-instruct-onnx
Pinned commit
7302d286b8e921cc28042162f6d0b9f9417d8c51
Manifest
Phi-3-mini-128k-instruct-onnx.json · .minisig
Manifest sha256
7349df6704181fd39bf484f8d6210e179c43edfc8d28baa2dc5e800200635df7
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 03:47 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/microsoft/Phi-3-mini-128k-instruct-onnx.json $ curl -O https://freeweights.allternit.com/manifests/microsoft/Phi-3-mini-128k-instruct-onnx.json.minisig $ minisign -Vm Phi-3-mini-128k-instruct-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-3-mini-128k-instruct-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-3-mini-128k-instruct-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