Downloads · 30 days
13
4% of all-time downloads
Shushant/adal_v5_panclef
adal_v5_panclef is a text classification model from Shushant. Use it when you need a label for a piece of text. The card lists the license as apache-2.0.
Adversarially trained AI-generated text detector based on the RADAR framework (Hu et al., NeurIPS 2023), extended with a multi-evasion attack pool for robust detection.
Downloads · 30 days
13
4% of all-time downloads
All-time downloads
331
Public
Parameters
355M
7.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.4 GB · 99%
From the Hugging Face model README
Adversarially trained AI-generated text detector based on the RADAR framework (Hu et al., NeurIPS 2023), extended with a multi-evasion attack pool for robust detection.
roberta-largefrom transformers import RobertaTokenizer, RobertaForSequenceClassification
import torch
tokenizer = RobertaTokenizer.from_pretrained("Shushant/adal_v5_panclef")
model = RobertaForSequenceClassification.from_pretrained("Shushant/adal_v5_panclef")
model.eval()
text = "Your text here."
enc = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
with torch.no_grad():
probs = torch.softmax(model(**enc).logits, dim=-1)[0]
print(f"P(human)={probs[1]:.3f} P(AI)={probs[0]:.3f}")