AI text detector trained on EditLens ICLR 2026 dataset
Browse files- README.md +83 -0
- config.json +49 -0
- examples.json +0 -0
- model.safetensors +3 -0
- onnx/config.json +25 -0
- onnx/merges.txt +0 -0
- onnx/model.onnx +3 -0
- onnx/model_quantized.onnx +3 -0
- onnx/ort_config.json +33 -0
- onnx/special_tokens_map.json +51 -0
- onnx/tokenizer.json +0 -0
- onnx/tokenizer_config.json +58 -0
- onnx/vocab.json +0 -0
README.md
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language: multilingual
|
| 3 |
+
tags:
|
| 4 |
+
- adaptive-classifier
|
| 5 |
+
- text-classification
|
| 6 |
+
- continuous-learning
|
| 7 |
+
license: apache-2.0
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
# Adaptive Classifier
|
| 11 |
+
|
| 12 |
+
This model is an instance of an [adaptive-classifier](https://github.com/codelion/adaptive-classifier) that allows for continuous learning and dynamic class addition.
|
| 13 |
+
|
| 14 |
+
## Installation
|
| 15 |
+
|
| 16 |
+
**IMPORTANT:** To use this model, you must first install the `adaptive-classifier` library. You do **NOT** need `trust_remote_code=True`.
|
| 17 |
+
|
| 18 |
+
```bash
|
| 19 |
+
pip install adaptive-classifier
|
| 20 |
+
```
|
| 21 |
+
|
| 22 |
+
## Model Details
|
| 23 |
+
|
| 24 |
+
- Base Model: TrustSafeAI/RADAR-Vicuna-7B
|
| 25 |
+
- Number of Classes: 2
|
| 26 |
+
- Total Examples: 10
|
| 27 |
+
- Embedding Dimension: 1024
|
| 28 |
+
|
| 29 |
+
## Class Distribution
|
| 30 |
+
|
| 31 |
+
```
|
| 32 |
+
ai: 5 examples (50.0%)
|
| 33 |
+
human: 5 examples (50.0%)
|
| 34 |
+
```
|
| 35 |
+
|
| 36 |
+
## Usage
|
| 37 |
+
|
| 38 |
+
After installing the `adaptive-classifier` library, you can load and use this model:
|
| 39 |
+
|
| 40 |
+
```python
|
| 41 |
+
from adaptive_classifier import AdaptiveClassifier
|
| 42 |
+
|
| 43 |
+
# Load the model (no trust_remote_code needed!)
|
| 44 |
+
classifier = AdaptiveClassifier.from_pretrained("adaptive-classifier/model-name")
|
| 45 |
+
|
| 46 |
+
# Make predictions
|
| 47 |
+
text = "Your text here"
|
| 48 |
+
predictions = classifier.predict(text)
|
| 49 |
+
print(predictions) # List of (label, confidence) tuples
|
| 50 |
+
|
| 51 |
+
# Add new examples for continuous learning
|
| 52 |
+
texts = ["Example 1", "Example 2"]
|
| 53 |
+
labels = ["class1", "class2"]
|
| 54 |
+
classifier.add_examples(texts, labels)
|
| 55 |
+
```
|
| 56 |
+
|
| 57 |
+
**Note:** This model uses the `adaptive-classifier` library distributed via PyPI. You do **NOT** need to set `trust_remote_code=True` - just install the library first.
|
| 58 |
+
|
| 59 |
+
## Training Details
|
| 60 |
+
|
| 61 |
+
- Training Steps: 4
|
| 62 |
+
- Examples per Class: See distribution above
|
| 63 |
+
- Prototype Memory: Active
|
| 64 |
+
- Neural Adaptation: Active
|
| 65 |
+
|
| 66 |
+
## Limitations
|
| 67 |
+
|
| 68 |
+
This model:
|
| 69 |
+
- Requires at least 3 examples per class
|
| 70 |
+
- Has a maximum of 1000 examples per class
|
| 71 |
+
- Updates prototypes every 100 examples
|
| 72 |
+
|
| 73 |
+
## Citation
|
| 74 |
+
|
| 75 |
+
```bibtex
|
| 76 |
+
@software{adaptive_classifier,
|
| 77 |
+
title = {Adaptive Classifier: Dynamic Text Classification with Continuous Learning},
|
| 78 |
+
author = {Sharma, Asankhaya},
|
| 79 |
+
year = {2025},
|
| 80 |
+
publisher = {GitHub},
|
| 81 |
+
url = {https://github.com/codelion/adaptive-classifier}
|
| 82 |
+
}
|
| 83 |
+
```
|
config.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"config": {
|
| 3 |
+
"batch_size": 32,
|
| 4 |
+
"cost_coefficients": {},
|
| 5 |
+
"cost_function_type": "separable",
|
| 6 |
+
"device_map": "auto",
|
| 7 |
+
"early_stopping_patience": 3,
|
| 8 |
+
"enable_strategic_mode": false,
|
| 9 |
+
"epochs": 10,
|
| 10 |
+
"ewc_lambda": 100.0,
|
| 11 |
+
"gradient_checkpointing": false,
|
| 12 |
+
"learning_rate": 0.001,
|
| 13 |
+
"max_examples_per_class": 1000,
|
| 14 |
+
"max_length": 512,
|
| 15 |
+
"min_confidence": 0.1,
|
| 16 |
+
"min_examples_per_class": 3,
|
| 17 |
+
"neural_weight": 0.7,
|
| 18 |
+
"num_representative_examples": 5,
|
| 19 |
+
"prototype_update_frequency": 100,
|
| 20 |
+
"prototype_weight": 0.3,
|
| 21 |
+
"quantization": null,
|
| 22 |
+
"similarity_threshold": 0.6,
|
| 23 |
+
"strategic_blend_regular_weight": 0.6,
|
| 24 |
+
"strategic_blend_strategic_weight": 0.4,
|
| 25 |
+
"strategic_lambda": 0.1,
|
| 26 |
+
"strategic_prediction_head_weight": 0.5,
|
| 27 |
+
"strategic_prediction_proto_weight": 0.5,
|
| 28 |
+
"strategic_robust_head_weight": 0.2,
|
| 29 |
+
"strategic_robust_proto_weight": 0.8,
|
| 30 |
+
"strategic_training_frequency": 10,
|
| 31 |
+
"warmup_steps": 0
|
| 32 |
+
},
|
| 33 |
+
"embedding_dim": 1024,
|
| 34 |
+
"id_to_label": {
|
| 35 |
+
"0": "ai",
|
| 36 |
+
"1": "human"
|
| 37 |
+
},
|
| 38 |
+
"label_to_id": {
|
| 39 |
+
"ai": 0,
|
| 40 |
+
"human": 1
|
| 41 |
+
},
|
| 42 |
+
"library_name": "adaptive-classifier",
|
| 43 |
+
"model_name": "TrustSafeAI/RADAR-Vicuna-7B",
|
| 44 |
+
"train_steps": 4,
|
| 45 |
+
"training_history": {
|
| 46 |
+
"ai": 1000,
|
| 47 |
+
"human": 1000
|
| 48 |
+
}
|
| 49 |
+
}
|
examples.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d71cf4f74418cf384a41c80d46ddce1efc9c9798d9abaaab34fe257f82249929
|
| 3 |
+
size 6310624
|
onnx/config.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"RobertaForSequenceClassification"
|
| 4 |
+
],
|
| 5 |
+
"attention_probs_dropout_prob": 0.1,
|
| 6 |
+
"bos_token_id": 0,
|
| 7 |
+
"classifier_dropout": null,
|
| 8 |
+
"eos_token_id": 2,
|
| 9 |
+
"hidden_act": "gelu",
|
| 10 |
+
"hidden_dropout_prob": 0.1,
|
| 11 |
+
"hidden_size": 1024,
|
| 12 |
+
"initializer_range": 0.02,
|
| 13 |
+
"intermediate_size": 4096,
|
| 14 |
+
"layer_norm_eps": 1e-05,
|
| 15 |
+
"max_position_embeddings": 514,
|
| 16 |
+
"model_type": "roberta",
|
| 17 |
+
"num_attention_heads": 16,
|
| 18 |
+
"num_hidden_layers": 24,
|
| 19 |
+
"pad_token_id": 1,
|
| 20 |
+
"position_embedding_type": "absolute",
|
| 21 |
+
"transformers_version": "4.57.6",
|
| 22 |
+
"type_vocab_size": 1,
|
| 23 |
+
"use_cache": true,
|
| 24 |
+
"vocab_size": 50265
|
| 25 |
+
}
|
onnx/merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
onnx/model.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:94ebbda0c1417d1ab8513b3b7e893326893d38bf921c69a3f7fdd6b8a6bef19e
|
| 3 |
+
size 1417623186
|
onnx/model_quantized.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:637e5e684517c84282f969ff324087f3fd2f180484bc433118a11bb48bc02261
|
| 3 |
+
size 356067671
|
onnx/ort_config.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"one_external_file": true,
|
| 3 |
+
"opset": null,
|
| 4 |
+
"optimization": {},
|
| 5 |
+
"quantization": {
|
| 6 |
+
"activations_dtype": "QUInt8",
|
| 7 |
+
"activations_symmetric": false,
|
| 8 |
+
"format": "QOperator",
|
| 9 |
+
"is_static": false,
|
| 10 |
+
"mode": "IntegerOps",
|
| 11 |
+
"nodes_to_exclude": [],
|
| 12 |
+
"nodes_to_quantize": [],
|
| 13 |
+
"operators_to_quantize": [
|
| 14 |
+
"Conv",
|
| 15 |
+
"MatMul",
|
| 16 |
+
"Attention",
|
| 17 |
+
"LSTM",
|
| 18 |
+
"Gather",
|
| 19 |
+
"Transpose",
|
| 20 |
+
"EmbedLayerNormalization"
|
| 21 |
+
],
|
| 22 |
+
"per_channel": false,
|
| 23 |
+
"qdq_add_pair_to_weight": false,
|
| 24 |
+
"qdq_dedicated_pair": false,
|
| 25 |
+
"qdq_op_type_per_channel_support_to_axis": {
|
| 26 |
+
"MatMul": 1
|
| 27 |
+
},
|
| 28 |
+
"reduce_range": false,
|
| 29 |
+
"weights_dtype": "QInt8",
|
| 30 |
+
"weights_symmetric": true
|
| 31 |
+
},
|
| 32 |
+
"use_external_data_format": false
|
| 33 |
+
}
|
onnx/special_tokens_map.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": {
|
| 3 |
+
"content": "<s>",
|
| 4 |
+
"lstrip": false,
|
| 5 |
+
"normalized": true,
|
| 6 |
+
"rstrip": false,
|
| 7 |
+
"single_word": false
|
| 8 |
+
},
|
| 9 |
+
"cls_token": {
|
| 10 |
+
"content": "<s>",
|
| 11 |
+
"lstrip": false,
|
| 12 |
+
"normalized": true,
|
| 13 |
+
"rstrip": false,
|
| 14 |
+
"single_word": false
|
| 15 |
+
},
|
| 16 |
+
"eos_token": {
|
| 17 |
+
"content": "</s>",
|
| 18 |
+
"lstrip": false,
|
| 19 |
+
"normalized": true,
|
| 20 |
+
"rstrip": false,
|
| 21 |
+
"single_word": false
|
| 22 |
+
},
|
| 23 |
+
"mask_token": {
|
| 24 |
+
"content": "<mask>",
|
| 25 |
+
"lstrip": true,
|
| 26 |
+
"normalized": false,
|
| 27 |
+
"rstrip": false,
|
| 28 |
+
"single_word": false
|
| 29 |
+
},
|
| 30 |
+
"pad_token": {
|
| 31 |
+
"content": "<pad>",
|
| 32 |
+
"lstrip": false,
|
| 33 |
+
"normalized": true,
|
| 34 |
+
"rstrip": false,
|
| 35 |
+
"single_word": false
|
| 36 |
+
},
|
| 37 |
+
"sep_token": {
|
| 38 |
+
"content": "</s>",
|
| 39 |
+
"lstrip": false,
|
| 40 |
+
"normalized": true,
|
| 41 |
+
"rstrip": false,
|
| 42 |
+
"single_word": false
|
| 43 |
+
},
|
| 44 |
+
"unk_token": {
|
| 45 |
+
"content": "<unk>",
|
| 46 |
+
"lstrip": false,
|
| 47 |
+
"normalized": true,
|
| 48 |
+
"rstrip": false,
|
| 49 |
+
"single_word": false
|
| 50 |
+
}
|
| 51 |
+
}
|
onnx/tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
onnx/tokenizer_config.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"added_tokens_decoder": {
|
| 4 |
+
"0": {
|
| 5 |
+
"content": "<s>",
|
| 6 |
+
"lstrip": false,
|
| 7 |
+
"normalized": true,
|
| 8 |
+
"rstrip": false,
|
| 9 |
+
"single_word": false,
|
| 10 |
+
"special": true
|
| 11 |
+
},
|
| 12 |
+
"1": {
|
| 13 |
+
"content": "<pad>",
|
| 14 |
+
"lstrip": false,
|
| 15 |
+
"normalized": true,
|
| 16 |
+
"rstrip": false,
|
| 17 |
+
"single_word": false,
|
| 18 |
+
"special": true
|
| 19 |
+
},
|
| 20 |
+
"2": {
|
| 21 |
+
"content": "</s>",
|
| 22 |
+
"lstrip": false,
|
| 23 |
+
"normalized": true,
|
| 24 |
+
"rstrip": false,
|
| 25 |
+
"single_word": false,
|
| 26 |
+
"special": true
|
| 27 |
+
},
|
| 28 |
+
"3": {
|
| 29 |
+
"content": "<unk>",
|
| 30 |
+
"lstrip": false,
|
| 31 |
+
"normalized": true,
|
| 32 |
+
"rstrip": false,
|
| 33 |
+
"single_word": false,
|
| 34 |
+
"special": true
|
| 35 |
+
},
|
| 36 |
+
"50264": {
|
| 37 |
+
"content": "<mask>",
|
| 38 |
+
"lstrip": true,
|
| 39 |
+
"normalized": false,
|
| 40 |
+
"rstrip": false,
|
| 41 |
+
"single_word": false,
|
| 42 |
+
"special": true
|
| 43 |
+
}
|
| 44 |
+
},
|
| 45 |
+
"bos_token": "<s>",
|
| 46 |
+
"clean_up_tokenization_spaces": false,
|
| 47 |
+
"cls_token": "<s>",
|
| 48 |
+
"eos_token": "</s>",
|
| 49 |
+
"errors": "replace",
|
| 50 |
+
"extra_special_tokens": {},
|
| 51 |
+
"mask_token": "<mask>",
|
| 52 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 53 |
+
"pad_token": "<pad>",
|
| 54 |
+
"sep_token": "</s>",
|
| 55 |
+
"tokenizer_class": "RobertaTokenizer",
|
| 56 |
+
"trim_offsets": true,
|
| 57 |
+
"unk_token": "<unk>"
|
| 58 |
+
}
|
onnx/vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|