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

Phi-3-medium-128k-instruct-onnx-directml

Date: 2026-11-15Commit: 35d680aSigned: 2DC28CC7B26A283B ✓

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

phi7.54GBPhi-3-medium-128k-instruct-onnx-directmlonnxpermissive
FactsParamsnot statedSize7.54 GBFormatsonnxTasktext generationLicenseMITFrom sourcepermissive
$ fw get microsoft/Phi-3-medium-128k-instruct-onnx-directml
# manifest sha256 f7707fc35ea9… · 7.54 GB · 15 files
$ fw verify ./Phi-3-medium-128k-instruct-onnx-directml microsoft/Phi-3-medium-128k-instruct-onnx-directml
From sourceHosted (signed)microsoft/Phi-3-medium-128k-instruct-onnx-directmlLast 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
7.54 GB
Weights
44.5 MB (ONNX)
Parameters
not stated
Formats
onnx
Task
text generation
License
MIT (permissive)
Files
15, 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 35d680a. Shown as plain text with links; images open at the publisher.

Phi-3 Medium-128K-Instruct ONNX DirectML models#

This repository hosts the optimized versions of Phi-3-medium-128k-instruct to accelerate inference with DirectML and ONNX Runtime for your machines with GPUs.

Phi-3 Medium is a 14B parameter, lightweight, state-of-the-art open model trained with the Phi-3 datasets, which include both synthetic data and the filtered publicly available websites data, with a focus on high-quality and reasoning dense properties. The model belongs to the Phi-3 family with the medium version in two variants: 4K and 128K, which are the context lengths (in tokens) that they can support.

The model has underwent a post-training process that incorporates both supervised fine-tuning and direct preference optimization for the instruction following and safety measures. When assessed against benchmarks testing common sense, language understanding, math, code, long context, and logical reasoning, Phi-3-Medium-128K-Instruct showcased a robust and state-of-the-art performance among models of the same-size and next-size-up.

Optimized variants of the Phi-3 Medium models are published here in ONNX format and run with DirectML. This lets developers bring hardware acceleration to Windows devices at scale across AMD, Intel, and NVIDIA GPUs.

ONNX Models#

Here are some of the optimized configurations we have added:

  1. ONNX model for INT4 DML: ONNX model optimized to run with DirectML and quantized to int4 precision using AWQ*.

How do you know which is the best ONNX model for you:

How to Get Started with the Model#

To support the Phi-3 models across a range of devices, platforms, and EP backends, we introduce a new API to wrap several aspects of generative AI inferencing. This API makes it easy to drag and drop LLMs straight into your app. To run the early version of these models with ONNX, follow the steps here.

Hardware Supported#

The model has been tested on:

  • GPU SKU: RTX 4090 (DirectML)

Minimum Configuration Required:

  • Windows: DirectX 12-capable GPU and a minimum of 10GB of combined RAM
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 Medium-128K-Instruct model for ONNX Runtime inference.

Additional Details#

Performance Metrics#

DirectML#

We measured the performance of DirectML and ONNX Runtime's new Generate() API with Phi-3 medium quantized with Activation-Aware Quantization AWQ and with a block size of 128 on Windows. Our test machine had an NVIDIA GeForce RTX 4090 GPU and an Intel Core i9-13900K CPU. DirectML lets developers not only achieve great performance but also lets developers deploy models across the entire Windows ecosystem with support from AMD, Intel, and NVIDIA. Best of all, AWQ means that developers get this scale while also maintaining high model accuracy.

Stay tuned for additional performance improvements in the coming weeks thanks to optimized drivers from our hardware partners, along with additional updates to the ONNX Runtime Generate() API.

Batch Size, Prompt LengthBlock Size = 32Block Size = 128
1, 1666.6072.26
Package Versions#
Pip package nameVersion
torch2.2.0
triton2.2.0
onnxruntime-gpu1.18.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, Sheetal Arun Kadam, Natalie Kershaw, Parinita Rahi, Patrice Vignola, Xiang Zhang, Chai Chaoweeraprasit, Logan Iyer, Vicente Rivera, Jacques van Rhyn

Files

15 files · 7.54 GBWeights 44.5 MB (ONNX). Sizes and sha256 from the signed manifest.
Hide all 15 files with their sha256
FileSizesha256
.gitattributes1.57 KB1403a1a07764f40b81196144fc294c8daff49cbc0f1d0a79fcfbf5e35a027311
LICENSE12.5 KBc6186c688d3a12fdad30e4fe4962de3af2897bd47944702962f8cac94a646f94
README.md6.13 KB3ac35de9da4e722678d8557780000f5ca83b6346ca15e4a8f005d6e3ce818050
config.json3.19 KBa4891a2693084c920487521061b75979e5e23b71699d18c3fa5e3b60c7e683a1
configuration_phi3.py10.4 KB18b06d379f5199bfb8b7da26da14c580f3852e792895d2bf6158b2ef33c92d52
directml-int4-awq-block-128/added_tokens.json293 B5f5c94d30901fe9c961d776d51eadbda4454991a77b53d36e0be0571a8e72a7d
directml-int4-awq-block-128/config.json3.19 KBa4891a2693084c920487521061b75979e5e23b71699d18c3fa5e3b60c7e683a1
directml-int4-awq-block-128/configuration_phi3.py10.4 KB18b06d379f5199bfb8b7da26da14c580f3852e792895d2bf6158b2ef33c92d52
directml-int4-awq-block-128/genai_config.json1.67 KB1f95429a5d2cb00ce9993545ee2395c98fdf22e9a33fe7b01543e34f1b5b0efa
directml-int4-awq-block-128/model.onnx44.5 MBdaa6891ea212f8ccd9adbc0e00c8cab59a7be841cd6b13e1fa21ba97d86a6d4c
directml-int4-awq-block-128/model.onnx.data7.50 GB8b1f7da3ad6d4f56f51ddc54ab71b8e97f8e42bc8c78e0210f0b18303fdd9280
directml-int4-awq-block-128/special_tokens_map.json569 B474d699677e264edd3851559548cbbb61801ad8da6b249c81455007602313c34
directml-int4-awq-block-128/tokenizer.json1.84 MBd0f067e1e15cd0a36ebef3668024882cb67a80b86fb4b7b4b128481f0d474db7
directml-int4-awq-block-128/tokenizer.model500 KB9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
directml-int4-awq-block-128/tokenizer_config.json3.16 KBc7aad94765fa33f2927557e2f9fb410ce307c98661b4115cc0c36d55a7f8639f
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
35d680acd9 pinned now2026-11-15 03:47 UTC15 files · 7.54 GB

Use it

$ fw get microsoft/Phi-3-medium-128k-instruct-onnx-directml
# manifest sha256 f7707fc35ea9… · 7.54 GB · 15 files
$ fw verify ./Phi-3-medium-128k-instruct-onnx-directml microsoft/Phi-3-medium-128k-instruct-onnx-directml
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-medium-128k-instruct-onnx-directml.json --dir ./Phi-3-medium-128k-instruct-onnx-directml $ python3 fw.py verify ./Phi-3-medium-128k-instruct-onnx-directml ./microsoft__Phi-3-medium-128k-instruct-onnx-directml.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download microsoft/Phi-3-medium-128k-instruct-onnx-directml --revision 35d680acd90f760c93e2f0bddd463313717ab68d --local-dir ./Phi-3-medium-128k-instruct-onnx-directml

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-medium-128k-instruct-onnx-directmlDate: 2026-11-15Commit: 35d680aSigned: 2DC28CC7B26A283B ✓
Upstream
microsoft/Phi-3-medium-128k-instruct-onnx-directml
Pinned commit
35d680acd90f760c93e2f0bddd463313717ab68d
Manifest
Phi-3-medium-128k-instruct-onnx-directml.json · .minisig
Manifest sha256
f7707fc35ea9eea9fe0be2bb22b2954fdf30a2f626ed83b3376543ee92b8bb7c
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-medium-128k-instruct-onnx-directml.json $ curl -O https://freeweights.allternit.com/manifests/microsoft/Phi-3-medium-128k-instruct-onnx-directml.json.minisig $ minisign -Vm Phi-3-medium-128k-instruct-onnx-directml.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-medium-128k-instruct-onnx-directml
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-medium-128k-instruct-onnx-directml.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