Create README.md
Browse files# Llama-2-7b-chat ONNX models for DirectML
This repository hosts the optimized versions of [meta-llama/Llama-2-7b-chat-hf](https://huggingface.co/meta-llama/Llama-2-7b-chat-hf) to accelerate inference with ONNX Runtime for DirectML.
## Usage on Windows (Intel / AMD / Nvidia / Qualcomm)
```powershell
conda create -n onnx python=3.10
conda activate onnx
winget install -e --id GitHub.GitLFS
pip install huggingface-hub[cli]
huggingface-cli download EmbeddedLLM/llama-2-7b-chat-int4-onnx-directml --local-dir .\llama-2-7b-chat
pip install numpy
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/microsoft/onnxruntime-genai/main/examples/python/phi3-qa.py" -OutFile "phi3-qa.py"
pip install onnxruntime-directml
pip install --pre onnxruntime-genai-directml
conda install conda-forge::vs2015_runtime
python phi3-qa.py -m .\llama-2-7b-chat
```
## What is DirectML
DirectML is a high-performance, hardware-accelerated DirectX 12 library for machine learning. DirectML provides GPU acceleration for common machine learning tasks across a broad range of supported hardware and drivers, including all DirectX 12-capable GPUs from vendors such as AMD, Intel, NVIDIA, and Qualcomm.
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: llama2
|
3 |
+
language:
|
4 |
+
- en
|
5 |
+
pipeline_tag: text-generation
|
6 |
+
tags:
|
7 |
+
- facebook
|
8 |
+
- meta
|
9 |
+
- pytorch
|
10 |
+
- llama
|
11 |
+
- llama-2
|
12 |
+
- ONNX
|
13 |
+
- DirectML
|
14 |
+
- DML
|
15 |
+
- conversational
|
16 |
+
---
|