metadata
language:
- en
license: apache-2.0
tags:
- text-classification
- ai-detection
- roberta
- lora
pipeline_tag: text-classification
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