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

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

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

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

phi36.1GBPhi-3-medium-128k-instruct-onnx-cudaonnxpermissive
FactsParamsnot statedSize36.1 GBFormatsonnxTasktext generationLicenseMITFrom sourcepermissive
$ fw get microsoft/Phi-3-medium-128k-instruct-onnx-cuda
# manifest sha256 275920a4b934… · 36.1 GB · 25 files
$ fw verify ./Phi-3-medium-128k-instruct-onnx-cuda microsoft/Phi-3-medium-128k-instruct-onnx-cuda
From sourceHosted (signed)microsoft/Phi-3-medium-128k-instruct-onnx-cudaLast 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

Overview

Size
36.1 GB
Weights
34.9 MB (smallest of 2 ONNX variants)
Parameters
not stated
Formats
onnx
Task
text generation
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 b091261. Shown as plain text with links; images open at the publisher.

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

This repository hosts the optimized versions of Phi-3-medium-128k-instruct to accelerate inference with ONNX Runtime for your machines with NVIDIA 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 base model has undergone 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 ONNX Runtime on CPU and GPU across devices, including server platforms, Windows, and Linux, with the precision best suited to each of these targets.

ONNX Models#

Here are some of the optimized configurations we have added:

  1. ONNX model for FP16 CUDA: ONNX model for NVIDIA GPUs.
  2. ONNX model for INT4 CUDA: ONNX model for NVIDIA GPUs using int4 quantization via RTN.

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

Note: Using the Hugging Face CLI, you can download sub folders and not all models if you are limited on disk space. The FP16 model is recommended for larger batch sizes, while the INT4 model optimizes performance for lower batch sizes.

Example:

# Download just the FP16 model
$ huggingface-cli download microsoft/Phi-3-small-8k-instruct-onnx-cuda --include cuda-fp16/* --local-dir .  --local-dir-use-symlinks False

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 models are tested on:

  • 1 A100 GPU, SKU: Standard_ND96amsr_A100_v4 (CUDA)

Minimum Configuration Required:

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#

CUDA#

Phi-3 Medium-128K-Instruct performs better with ONNX Runtime compared to PyTorch for all batch size, prompt length combinations. For FP16 CUDA, ORT performs up to 3X faster than PyTorch, while with INT4 CUDA, it's up to 8X 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 CUDASpeed Up ORT/PyTorch
1, 1647.3214.413.28
4, 16190.0584.432.25
16, 16707.68347.522.04
Batch Size, Prompt LengthORT INT4 CUDAPyTorch Eager INT4 CUDASpeed Up ORT/PyTorch
1, 16115.6814.897.77
4, 1688.5345.221.96
16, 16341.8168.362.03
Package Versions#
Pip package nameVersion
torch2.3.0
triton2.3.0
onnxruntime-gpu1.18.0
transformers4.40.2
bitsandbytes0.43.1

Appendix#

Model Card Contact#

parinitarahi, kvaishnavi, natke

Contributors#

Kunal Vaishnavi, Sunghoon Choi, Yufeng Li, Sheetal Arun Kadam, Rui Ren, Natalie Kershaw, Parinita Rahi

Files

25 files · 36.1 GBWeights 34.9 MB (smallest of 2 ONNX variants). Sizes and sha256 from the signed manifest.
Show all 25 files with their sha256
FileSizesha256
.gitattributes1.57 KB1403a1a07764f40b81196144fc294c8daff49cbc0f1d0a79fcfbf5e35a027311
LICENSE12.5 KBc6186c688d3a12fdad30e4fe4962de3af2897bd47944702962f8cac94a646f94
README.md6.35 KB23ca9bacea8a05b4444c1e738ea4db30960054fe639067d37c689ff60874491f
config.json3.19 KBa4891a2693084c920487521061b75979e5e23b71699d18c3fa5e3b60c7e683a1
configuration_phi3.py10.4 KB18b06d379f5199bfb8b7da26da14c580f3852e792895d2bf6158b2ef33c92d52
cuda-fp16/added_tokens.json293 B5f5c94d30901fe9c961d776d51eadbda4454991a77b53d36e0be0571a8e72a7d
cuda-fp16/config.json3.19 KBa4891a2693084c920487521061b75979e5e23b71699d18c3fa5e3b60c7e683a1
cuda-fp16/configuration_phi3.py10.4 KB18b06d379f5199bfb8b7da26da14c580f3852e792895d2bf6158b2ef33c92d52
cuda-fp16/genai_config.json1.74 KB741509802e7a4ab1560ad9cdbe9b68f0c384e9eea7ccdfa915b8f37326d5b03d
cuda-fp16/phi3-medium-128k-instruct-cuda-fp16.onnx34.9 MBc4414e6c6d880254aab97cfcccf5bc00b9f08781c5c0cb4ce0a00efb99b350e0
cuda-fp16/phi3-medium-128k-instruct-cuda-fp16.onnx.data27.9 GB4919d4aa9678a8b3f5a3313a0a5d461ebb7e718de9223445a049ac41019b8a70
cuda-fp16/special_tokens_map.json569 B474d699677e264edd3851559548cbbb61801ad8da6b249c81455007602313c34
cuda-fp16/tokenizer.json1.84 MB9e2ae3d66819f163cdcfedba5078f3a3af8118c2712491ed60912f77886bda6f
cuda-fp16/tokenizer.model500 KB9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
cuda-fp16/tokenizer_config.json3.16 KBc7aad94765fa33f2927557e2f9fb410ce307c98661b4115cc0c36d55a7f8639f
cuda-int4-rtn-block-32/added_tokens.json293 B5f5c94d30901fe9c961d776d51eadbda4454991a77b53d36e0be0571a8e72a7d
cuda-int4-rtn-block-32/config.json3.19 KBa4891a2693084c920487521061b75979e5e23b71699d18c3fa5e3b60c7e683a1
cuda-int4-rtn-block-32/configuration_phi3.py10.4 KB18b06d379f5199bfb8b7da26da14c580f3852e792895d2bf6158b2ef33c92d52
cuda-int4-rtn-block-32/genai_config.json1.75 KBec4a310a2ed0d1748ce730f962167c08e874e0fd5e485b2d17a00f2eda71ad7e
cuda-int4-rtn-block-32/phi3-medium-128k-instruct-cuda-int4-rtn-block-32.onnx34.9 MB97de991472078f4df92f24aaaaee63dfc9c66c9c462264fd0fb1f842c29cea79
cuda-int4-rtn-block-32/phi3-medium-128k-instruct-cuda-int4-rtn-block-32.onnx.data8.09 GB2db9845fa69105bd229b57f0a47d11fa572041705c235f17393136a09f13ccc9
cuda-int4-rtn-block-32/special_tokens_map.json569 B474d699677e264edd3851559548cbbb61801ad8da6b249c81455007602313c34
cuda-int4-rtn-block-32/tokenizer.json1.84 MB9e2ae3d66819f163cdcfedba5078f3a3af8118c2712491ed60912f77886bda6f
cuda-int4-rtn-block-32/tokenizer.model500 KB9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
cuda-int4-rtn-block-32/tokenizer_config.json3.16 KBc7aad94765fa33f2927557e2f9fb410ce307c98661b4115cc0c36d55a7f8639f
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
b0912619be pinned now2026-11-15 03:53 UTC25 files · 36.1 GB

Use it

$ fw get microsoft/Phi-3-medium-128k-instruct-onnx-cuda
# manifest sha256 275920a4b934… · 36.1 GB · 25 files
$ fw verify ./Phi-3-medium-128k-instruct-onnx-cuda microsoft/Phi-3-medium-128k-instruct-onnx-cuda
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-cuda.json --dir ./Phi-3-medium-128k-instruct-onnx-cuda $ python3 fw.py verify ./Phi-3-medium-128k-instruct-onnx-cuda ./microsoft__Phi-3-medium-128k-instruct-onnx-cuda.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-cuda --revision b0912619beae3b4a8c4aadf6f7f5477301a7524d --local-dir ./Phi-3-medium-128k-instruct-onnx-cuda

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-cudaDate: 2026-11-15Commit: b091261Signed: 2DC28CC7B26A283B ✓
Upstream
microsoft/Phi-3-medium-128k-instruct-onnx-cuda
Pinned commit
b0912619beae3b4a8c4aadf6f7f5477301a7524d
Manifest
Phi-3-medium-128k-instruct-onnx-cuda.json · .minisig
Manifest sha256
275920a4b93465a188a25e9ad6276176cef683b514a64f378119b05b67cd9b16
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-3-medium-128k-instruct-onnx-cuda.json $ curl -O https://freeweights.allternit.com/manifests/microsoft/Phi-3-medium-128k-instruct-onnx-cuda.json.minisig $ minisign -Vm Phi-3-medium-128k-instruct-onnx-cuda.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-cuda
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-cuda.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