elisabeth-pl-pl/Finetuned-RADAR-binary-classification
09
1---2language:3- en4license: apache-2.05tags:6- text-classification7- ai-detection8- roberta9- lora10pipeline_tag: text-classification11---12 13# Finetuned RADAR — AI Text Detector14 15Fine-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## Usage19 20```python21from transformers import AutoTokenizer, AutoModelForSequenceClassification22import torch23 24model_id = "elisabeth-pl-pl/Finetuned-RADAR-binary-classification"25tokenizer = AutoTokenizer.from_pretrained(model_id)26model = AutoModelForSequenceClassification.from_pretrained(model_id)27 28text = "Your text here"29inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)30with torch.no_grad():31 logits = model(**inputs).logits32pred = logits.argmax(-1).item()33print("machine" if pred == 0 else "human")34```35 36## Labels37- `0` — machine-generated38- `1` — human-written39 