Finetuned RADAR โ AI Text Detector
Fine-tuned version of TrustSafeAI/RADAR-Vicuna-7B (RoBERTa classifier) via LoRA for binary AI-generated text detection.
Usage
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
model_id = "elisabeth-pl-pl/Finetuned-RADAR-binary-classification"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSequenceClassification.from_pretrained(model_id)
text = "Your text here"
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
with torch.no_grad():
logits = model(**inputs).logits
pred = logits.argmax(-1).item()
print("machine" if pred == 0 else "human")
Labels
0โ machine-generated1โ human-written
- Downloads last month
- 96