/ Модель

Характеристики

Контекст
4 096 токенов
Параметры
13,8 млрд
Лицензия
MIT
Архитектура
phi3 · dense
Опубликована
19 мая 2024

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

Генерация текстаТекст → текст15 профессий

Квантизированная ONNX-версия Phi-3 Medium с контекстом 4096 токенов для генерации текста и диалогов с ускорением DirectML на GPU в Windows.

253скачиваний за 30 дней11лайковвеса обновлены23 янв 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Phi-3 Medium-4K-Instruct ONNX DirectML — версия языковой модели Phi-3 Medium, опубликованная Microsoft для ускоренного вывода через ONNX Runtime и DirectML на GPU в Windows. Это плотная авторегрессионная модель семейства Phi-3 примерно с 13,8 млрд параметров и контекстом до 4096 токенов; она настроена следовать инструкциям с помощью supervised fine-tuning и direct preference optimization и поддерживает диалоговый режим. Репозиторий содержит ONNX-вариант с квантизацией INT4 методом AWQ.

Модель предназначена для генерации текста, диалогов, ответов на вопросы, рассуждений, математических и кодовых задач. DirectML позволяет запускать её на совместимых GPU AMD, Intel и NVIDIA в Windows. В README указаны проверка на RTX 4090 и минимальная конфигурация Windows с GPU DirectX 12 и не менее 10 ГБ совокупной памяти. Квантизация помогает снизить требования к ресурсам, однако может влиять на точность; производительность зависит от оборудования и конфигурации.

Лицензия — MIT. Указанные в README языки программирования относятся к примерам интеграции, а не к естественным языкам модели; конкретный перечень поддерживаемых естественных языков в предоставленных данных не установлен.

Сценарии применения

  • диалоговый помощник для ответов на вопросы
  • генерация и редактирование текста по инструкциям
  • решение математических задач и логические рассуждения
  • помощь с написанием и объяснением кода
  • локальный запуск языковой модели на GPU в Windows

Ограничения

Для запуска с ускорением требуется совместимая Windows-система с GPU DirectX 12; в README приведена минимальная конфигурация с 10 ГБ совокупной памяти. Квантизация INT4 может снижать точность, а указанное в карточке имя модели не устанавливает перечень поддерживаемых естественных языков.

Для каких профессий подходит15

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Phi-3 Medium-4K-Instruct ONNX DirectML models

This repository hosts the optimized versions of Phi-3-medium-4k-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-4K-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:

  • Are you on a Windows machine with GPU?

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-4K-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.3672.39

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

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм

Нельзя запустить

В репозитории нет весов в формате PyTorch/safetensors.

Класс архитектуры
Phi3ForCausalLM
Ревизия весов
6e74e8b

0 моделей