Open mburges-cvl opened 3 months ago
Hi there, are you certain you're using loading the correct PromptGuard local model? It should produce an output vector of length 3 rather than length 2.
Hi, i downloaded the model and the PromptGuard as stated in the read me:
# download the 8B model, this can be run on a single GPU
llama download meta-llama/Meta-Llama-3.1-8B-Instruct
# llama-agents have safety enabled by default. For this, you will need
# safety models -- Llama-Guard and Prompt-Guard
llama download meta-llama/Llama-Guard-3-8B --ignore-patterns original
Could it be the version miss match between the models 3.1 and the PromptGuards 3?
Hm so PromptGuard is a V1 model, LlamaGuard 3 is a separate model for content moderation. There should also be a download command for the PromptGuard model separately in the readme - the command in your comment downloads LlamaGuard.
Hello, I get this error when running the model locally, as described by the repo. however, I get this error:
index 2 is out of bounds for dimension 1 with size 2
with this traceback:
to fix it I changed :
to
in llama_toolchain/safety/shields/prompt_guard.py PromptGuardShield run_impl (Line 95/96)
Not sure if that is correct, but for me the model works now.