Make Example Script Consistent (#6)
Browse files- make examples consistent (f70d98f778d4d15cc21fcf9fef4ce15eba32dd49)
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
|