From 89227e9b936fa7600aa6f88862d2e7476d9ddf9c Mon Sep 17 00:00:00 2001 From: Jeremy Fowers Date: Thu, 29 Aug 2024 12:10:12 -0400 Subject: [PATCH 1/3] Fix various bugs from the initial release --- setup.py | 6 ++++++ src/turnkeyml/llm/README.md | 4 ++-- src/turnkeyml/version.py | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 1cdc8cd..5933acc 100644 --- a/setup.py +++ b/setup.py @@ -79,6 +79,12 @@ "onnx==1.16.0", "onnxruntime==1.18.0", "numpy==1.26.4", + "tqdm", + "accelerate", + "py-cpuinfo", + "sentencepiece", + "datasets", + "fastapi", "uvicorn[standard]", ], }, diff --git a/src/turnkeyml/llm/README.md b/src/turnkeyml/llm/README.md index 92308ea..6ae07a3 100644 --- a/src/turnkeyml/llm/README.md +++ b/src/turnkeyml/llm/README.md @@ -102,9 +102,9 @@ You can also try Phi-3-Mini-128k-Instruct with the following commands: > Note: no other models or devices are officially supported by `lemonade` on OGA at this time. Contributions appreciated! -## Install Ryzen AI NPU +## Install RyzenAI NPU -To run your LLMs on Ryzen AI NPU, first install and set up the `ryzenai-transformers` conda environment (see instructions [here](https://github.com/amd/RyzenAI-SW/tree/main/example/transformers)). Then, install `lemonade` into `ryzenai-transformers`. The `ryzenai-npu-load` Tool will become available in that environment. +To run your LLMs on RyzenAI NPU, first install and set up the `ryzenai-transformers` conda environment (see instructions [here](https://github.com/amd/RyzenAI-SW/blob/main/example/transformers/models/llm/docs/README.md)). Then, install `lemonade` into `ryzenai-transformers`. The `ryzenai-npu-load` Tool will become available in that environment. You can try it out with: `lemonade -i meta-llama/Llama-2-7b-chat-hf ryzenai-npu-load --device DEVICE llm-prompt -p "Hello, my thoughts are"` diff --git a/src/turnkeyml/version.py b/src/turnkeyml/version.py index 76ad18b..064c0b3 100644 --- a/src/turnkeyml/version.py +++ b/src/turnkeyml/version.py @@ -1 +1 @@ -__version__ = "4.0.1" +__version__ = "4.0.2" From 09b76a16e77e2e5a3a06388cf133800c02d99dd1 Mon Sep 17 00:00:00 2001 From: Jeremy Fowers Date: Thu, 29 Aug 2024 12:23:00 -0400 Subject: [PATCH 2/3] Add models folder marker --- src/turnkeyml/llm/tools/ort_genai/models/README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/turnkeyml/llm/tools/ort_genai/models/README.md diff --git a/src/turnkeyml/llm/tools/ort_genai/models/README.md b/src/turnkeyml/llm/tools/ort_genai/models/README.md new file mode 100644 index 0000000..e1f24b2 --- /dev/null +++ b/src/turnkeyml/llm/tools/ort_genai/models/README.md @@ -0,0 +1 @@ +This directory is where your OGA model folders go. \ No newline at end of file From 7369ecea0dc8f9dde01304f93d973ee40cfd24e5 Mon Sep 17 00:00:00 2001 From: Jeremy Fowers Date: Thu, 29 Aug 2024 13:17:43 -0400 Subject: [PATCH 3/3] fix for leap --- src/turnkeyml/llm/leap.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/turnkeyml/llm/leap.py b/src/turnkeyml/llm/leap.py index 78f1786..d2d5883 100644 --- a/src/turnkeyml/llm/leap.py +++ b/src/turnkeyml/llm/leap.py @@ -128,6 +128,8 @@ def from_pretrained( checkpoint != "TheBloke/Llama-2-7b-Chat-fp16" and checkpoint != "meta-llama/Llama-2-7b-chat-hf" and checkpoint != "microsoft/Phi-3-mini-4k-instruct" + and checkpoint != "meta-llama/Meta-Llama-3-8B-Instruct" + and checkpoint != "meta-llama/Meta-Llama-3-8B" ): _raise_not_supported(recipe, checkpoint)