Commit
·
f70d98f
1
Parent(s):
b6d6f8f
make examples consistent
Browse filesSigned-off-by: GiulioZizzo <[email protected]>
README.md
CHANGED
|
@@ -77,7 +77,7 @@ def download_intrinsic(
|
|
| 77 |
download_intrinsic(
|
| 78 |
repo_id="ibm-granite/granite-3.3-8b-security-lib",
|
| 79 |
intrinsic="granite-3.3-8b-instruct-lora-jailbreak-detector",
|
| 80 |
-
local_dir="intrinsics
|
| 81 |
token="YOUR_HF_TOKEN", # omit if not needed
|
| 82 |
)
|
| 83 |
```
|
|
|
|
| 77 |
download_intrinsic(
|
| 78 |
repo_id="ibm-granite/granite-3.3-8b-security-lib",
|
| 79 |
intrinsic="granite-3.3-8b-instruct-lora-jailbreak-detector",
|
| 80 |
+
local_dir="intrinsics",
|
| 81 |
token="YOUR_HF_TOKEN", # omit if not needed
|
| 82 |
)
|
| 83 |
```
|
granite-3.3-8b-instruct-lora-jailbreak-detector/README.md
CHANGED
|
@@ -52,7 +52,7 @@ from transformers import AutoTokenizer, AutoModelForCausalLM
|
|
| 52 |
from peft import PeftModel
|
| 53 |
|
| 54 |
BASE_NAME = "ibm-granite/granite-3.3-8b-instruct"
|
| 55 |
-
LORA_NAME = "
|
| 56 |
device=torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
| 57 |
|
| 58 |
# Load model
|
|
|
|
| 52 |
from peft import PeftModel
|
| 53 |
|
| 54 |
BASE_NAME = "ibm-granite/granite-3.3-8b-instruct"
|
| 55 |
+
LORA_NAME = "intrinsics/granite-3.3-8b-instruct-lora-jailbreak-detector" # LoRA download location. We assume the directory shown in the top level README.md example for the lib was followed.
|
| 56 |
device=torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
| 57 |
|
| 58 |
# Load model
|