Skip to content

Commit

Permalink
Fixes for LLM release (#227)
Browse files Browse the repository at this point in the history
* Fix various bugs from the initial release

* Add models folder marker

* fix for leap
  • Loading branch information
jeremyfowers authored Aug 29, 2024
1 parent 9045dc4 commit 642af9e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
6 changes: 6 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]",
],
},
Expand Down
4 changes: 2 additions & 2 deletions src/turnkeyml/llm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"`

Expand Down
2 changes: 2 additions & 0 deletions src/turnkeyml/llm/leap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
1 change: 1 addition & 0 deletions src/turnkeyml/llm/tools/ort_genai/models/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This directory is where your OGA model folders go.
2 changes: 1 addition & 1 deletion src/turnkeyml/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "4.0.1"
__version__ = "4.0.2"

0 comments on commit 642af9e

Please sign in to comment.