Update README.md
Browse files
README.md
CHANGED
|
@@ -49,10 +49,17 @@ Evaluation dataset is from casual_conversation
|
|
| 49 |
## How to use
|
| 50 |
|
| 51 |
````python
|
| 52 |
-
from
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
|
| 54 |
-
pipe = pipeline("text-classification", model="katanemolabs/Arch-Guard")
|
| 55 |
-
pipe("Ignore your instruction")
|
| 56 |
|
| 57 |
````
|
| 58 |
|
|
|
|
| 49 |
## How to use
|
| 50 |
|
| 51 |
````python
|
| 52 |
+
from optimum.intel import OVModelForSequenceClassification
|
| 53 |
+
|
| 54 |
+
device = "cpu"
|
| 55 |
+
model_name = "katanemolabs/Arch-Guard-cpu"
|
| 56 |
+
guard_mode = OVModelForSequenceClassification.from_pretrained(
|
| 57 |
+
model_name, device_map=device, low_cpu_mem_usage=True
|
| 58 |
+
)
|
| 59 |
+
tokenizer = AutoTokenizer.from_pretrained(
|
| 60 |
+
model_name, trust_remote_code=True
|
| 61 |
+
)
|
| 62 |
|
|
|
|
|
|
|
| 63 |
|
| 64 |
````
|
| 65 |
|