elisabeth-pl-pl commited on
Commit
7b754c2
·
verified ·
1 Parent(s): 6e5c1f4

Add model card with pipeline_tag

Browse files
Files changed (1) hide show
  1. README.md +38 -0
README.md ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: apache-2.0
5
+ tags:
6
+ - text-classification
7
+ - ai-detection
8
+ - roberta
9
+ - lora
10
+ pipeline_tag: text-classification
11
+ ---
12
+
13
+ # Finetuned RADAR — AI Text Detector
14
+
15
+ Fine-tuned version of [TrustSafeAI/RADAR-Vicuna-7B](https://huggingface.co/TrustSafeAI/RADAR-Vicuna-7B)
16
+ (RoBERTa classifier) via LoRA for binary AI-generated text detection.
17
+
18
+ ## Usage
19
+
20
+ ```python
21
+ from transformers import AutoTokenizer, AutoModelForSequenceClassification
22
+ import torch
23
+
24
+ model_id = "elisabeth-pl-pl/Finetuned-RADAR-binary-classification"
25
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
26
+ model = AutoModelForSequenceClassification.from_pretrained(model_id)
27
+
28
+ text = "Your text here"
29
+ inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
30
+ with torch.no_grad():
31
+ logits = model(**inputs).logits
32
+ pred = logits.argmax(-1).item()
33
+ print("machine" if pred == 0 else "human")
34
+ ```
35
+
36
+ ## Labels
37
+ - `0` — machine-generated
38
+ - `1` — human-written