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

Phi-3-small-8k-instruct-onnx-cuda

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

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

phi20.6GBPhi-3-small-8k-instruct-onnx-cudaonnxpermissive
FactsParamsnot statedSize20.6 GBFormatsonnxTasktext generationLicenseMITFrom sourcepermissive
$ fw get microsoft/Phi-3-small-8k-instruct-onnx-cuda
# manifest sha256 0764e040b0aa… · 20.6 GB · 25 files
$ fw verify ./Phi-3-small-8k-instruct-onnx-cuda microsoft/Phi-3-small-8k-instruct-onnx-cuda
From sourceHosted (signed)microsoft/Phi-3-small-8k-instruct-onnx-cudaLast check: 2026-11-15 03:57 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
20.6 GB
Weights
317 KB (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:57 UTCpassed

Model card

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

Phi-3 Small-8K-Instruct ONNX CUDA models#

This repository hosts the optimized versions of Phi-3-small-8k-instruct to accelerate inference with ONNX Runtime for your machines with NVIDIA GPUs.

Phi-3 Small is a 7B parameter, lightweight, state-of-the-art open model trained with the Phi-3 datasets, which include both synthetic data and filtered publicly available website data, with a focus on high-quality and reasoning-dense properties. The model belongs to the Phi-3 family with the small version in two variants: 8K 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-Small-8K-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 Small models are published here in ONNX format and run with ONNX Runtime on GPU across devices, including server platforms, Windows, and Linux.

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.

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 ONNX 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 Small-8K-Instruct model for ONNX Runtime inference.

Additional Details#

Performance Metrics#

Phi-3 Small-8K-Instruct performs better with ONNX Runtime compared to PyTorch for all batch size, prompt length combinations. For FP16 CUDA, ORT performs up to 4X faster than PyTorch, while with INT4 CUDA, it's up to 10.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 CUDASpeed Up ORT/PyTorch
1, 1674.6216.814.44
4, 16290.3665.564.43
16,161036.93267.333.88
Batch Size, Prompt LengthORT INT4 CUDAPyTorch Eager INT4 CUDASpeed Up ORT/PyTorch
1, 16140.6812.9310.88
4, 16152.9044.043.47
16,16582.07160.573.62
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, Tianlei Wu, Sheetal Arun Kadam, Rui Ren, Baiju Meswani, Natalie Kershaw, Parinita Rahi

Files

25 files · 20.6 GBWeights 317 KB (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.md5.16 KB550d3e56a04b696d13119832751e1a5ada7e17d8b5f93e841b14cd73095a581c
config.json1.44 KB3fdc702382cc4ec606f69ac61dfa2ca68ebf8a712e5d22639dbaf03306a2b995
configuration_phi3_small.py12.3 KBfffa84097c41fa6a1db738e26504f3fe0ea6dfc9de8ac53f1e650c334f85053a
cuda-fp16/cl100k_base.tiktoken1.68 MB223921b76ee99bde995b7ff738513eef100fb51d18c93597a113bcffe865b2a7
cuda-fp16/config.json1.44 KB3fdc702382cc4ec606f69ac61dfa2ca68ebf8a712e5d22639dbaf03306a2b995
cuda-fp16/configuration_phi3_small.py12.3 KBfffa84097c41fa6a1db738e26504f3fe0ea6dfc9de8ac53f1e650c334f85053a
cuda-fp16/genai_config.json1.72 KBd1a42efff8afa3ebbf7c761a3ab2226bb856fa16416bd9d959000bdb8e5ea965
cuda-fp16/phi3-small-8k-instruct-cuda-fp16.onnx317 KB7ecb271f1ac3296ce5318e192c3df06151fb0c7d69c15c54f85d1b3e68a4149b
cuda-fp16/phi3-small-8k-instruct-cuda-fp16.onnx.data15.6 GBb623166c7dcd395ac3f57890b1c81026be0e1487c73af16a850d3d73a77eafe1
cuda-fp16/special_tokens_map.json71 B519fee642fbd18293bfbadd5c6c9b189e97a9dbf246763822e3ce884d73fef18
cuda-fp16/tokenization_phi3_small.py11.6 KBb6bc15edc1d456f8a9d2e62641d2e0f8dc06a35d88e14dd47da41d66c841124b
cuda-fp16/tokenizer.json7.10 MBdcf325e3cc68cfef05943a7f1dfa44d0b40c5ce7d195307363d963b4281885f5
cuda-fp16/tokenizer_config.json18.9 KB21a2b4560236631c84eb80cb28ed66d8da7ffe2b6ad771d620123697377066e6
cuda-int4-rtn-block-32/cl100k_base.tiktoken1.68 MB223921b76ee99bde995b7ff738513eef100fb51d18c93597a113bcffe865b2a7
cuda-int4-rtn-block-32/config.json1.44 KB3fdc702382cc4ec606f69ac61dfa2ca68ebf8a712e5d22639dbaf03306a2b995
cuda-int4-rtn-block-32/configuration_phi3_small.py12.3 KBfffa84097c41fa6a1db738e26504f3fe0ea6dfc9de8ac53f1e650c334f85053a
cuda-int4-rtn-block-32/genai_config.json1.74 KBac826be673075416efc82d8b1831a59131a42d4f8d2958f24911e1fc1b240a7f
cuda-int4-rtn-block-32/phi3-small-8k-instruct-cuda-int4-rtn-block-32.onnx361 KBd289b9a7537ab9fa1d8ba49238ed7ea9c08150e703dd6984b9303676d35e5b34
cuda-int4-rtn-block-32/phi3-small-8k-instruct-cuda-int4-rtn-block-32.onnx.data4.99 GBc2ea2d0344a5af8c340d002b2c65710ef537f831079afe0e8f2644285bfa2dfb
cuda-int4-rtn-block-32/special_tokens_map.json71 B519fee642fbd18293bfbadd5c6c9b189e97a9dbf246763822e3ce884d73fef18
cuda-int4-rtn-block-32/tokenization_phi3_small.py11.6 KBb6bc15edc1d456f8a9d2e62641d2e0f8dc06a35d88e14dd47da41d66c841124b
cuda-int4-rtn-block-32/tokenizer.json7.10 MBdcf325e3cc68cfef05943a7f1dfa44d0b40c5ce7d195307363d963b4281885f5
cuda-int4-rtn-block-32/tokenizer_config.json18.9 KB21a2b4560236631c84eb80cb28ed66d8da7ffe2b6ad771d620123697377066e6
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
bc8649337c pinned now2026-11-15 03:57 UTC25 files · 20.6 GB

Use it

$ fw get microsoft/Phi-3-small-8k-instruct-onnx-cuda
# manifest sha256 0764e040b0aa… · 20.6 GB · 25 files
$ fw verify ./Phi-3-small-8k-instruct-onnx-cuda microsoft/Phi-3-small-8k-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-small-8k-instruct-onnx-cuda.json --dir ./Phi-3-small-8k-instruct-onnx-cuda $ python3 fw.py verify ./Phi-3-small-8k-instruct-onnx-cuda ./microsoft__Phi-3-small-8k-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-small-8k-instruct-onnx-cuda --revision bc8649337c1456142aed0623c789343c0a4e91ea --local-dir ./Phi-3-small-8k-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-small-8k-instruct-onnx-cudaDate: 2026-11-15Commit: bc86493Signed: 2DC28CC7B26A283B ✓
Upstream
microsoft/Phi-3-small-8k-instruct-onnx-cuda
Pinned commit
bc8649337c1456142aed0623c789343c0a4e91ea
Manifest
Phi-3-small-8k-instruct-onnx-cuda.json · .minisig
Manifest sha256
0764e040b0aa35ce53e9c3f1148a8a5b6288c954085b4c9082af48486e0b7e34
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 03:57 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

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