Llama 🦙 3.1 Prompt Guard 86M with Rust 🦀 and ONNX 🪨 runtime
-
Get access to model at https://huggingface.co/meta-llama/Prompt-Guard-86M
-
Using Huggingface to export model to ONNX format
https://huggingface.co/docs/optimum/exporters/onnx/usage_guides/export_a_model
-
Put files in
/model
-
Install onnx
brew install onnxruntime
-
export env vars:
export ORT_INCLUDE_DIR=/opt/homebrew/Cellar/onnxruntime/1.17.1/include
export ORT_LIB_LOCATION=opt/homebrew/Cellar/onnxruntime/1.17.1/lib
export ORT_STRATEGY=system
- Run example with
cargo run