We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 774ecac commit e0d9276Copy full SHA for e0d9276
tests/test-round-trip.py
@@ -8,10 +8,17 @@
8
from preempt.ner import *
9
from preempt.sanitizer import *
10
11
+import torch
12
13
+device = (
14
+ "mps" if torch.backends.mps.is_available()
15
+ else "cuda" if torch.cuda.is_available()
16
+ else "cpu"
17
+)
18
# Load NER object
19
# ner_model = NER("/path/to/UniNER-7B-all", device="cuda:1")
-ner_model = NER("/path/to/Meta-Llama-3-8B-Instruct/", device="cuda:1")
20
+ner_model = NER("meta-llama/Meta-Llama-3.1-8B-Instruct", device=device)
21
+
22
23
# Load Sanitizer objects for name and money
24
sanitizer_name = Sanitizer(ner_model, key = "EF4359D8D580AA4F7F036D6F04FC6A94", tweak = "D8E7920AFA330A73")
0 commit comments