codelion commited on
Commit
48b24d3
·
verified ·
1 Parent(s): 8a377fa

Upload from benchmark script

Browse files
Files changed (4) hide show
  1. README.md +73 -0
  2. config.json +33 -0
  3. examples.json +0 -0
  4. model.safetensors +3 -0
README.md ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ You can install it with `pip install adaptive-classifier`.
15
+
16
+ ## Model Details
17
+
18
+ - Base Model: distilbert/distilbert-base-cased
19
+ - Number of Classes: 2
20
+ - Total Examples: 616
21
+ - Embedding Dimension: 768
22
+
23
+ ## Class Distribution
24
+
25
+ ```
26
+ HIGH: 308 examples (50.0%)
27
+ LOW: 308 examples (50.0%)
28
+ ```
29
+
30
+ ## Usage
31
+
32
+ ```python
33
+ from adaptive_classifier import AdaptiveClassifier
34
+
35
+ # Load the model
36
+ classifier = AdaptiveClassifier.from_pretrained("distilbert/distilbert-base-cased")
37
+
38
+ # Make predictions
39
+ text = "Your text here"
40
+ predictions = classifier.predict(text)
41
+ print(predictions) # List of (label, confidence) tuples
42
+
43
+ # Add new examples
44
+ texts = ["Example 1", "Example 2"]
45
+ labels = ["class1", "class2"]
46
+ classifier.add_examples(texts, labels)
47
+ ```
48
+
49
+ ## Training Details
50
+
51
+ - Training Steps: 20
52
+ - Examples per Class: See distribution above
53
+ - Prototype Memory: Active
54
+ - Neural Adaptation: Active
55
+
56
+ ## Limitations
57
+
58
+ This model:
59
+ - Requires at least 3 examples per class
60
+ - Has a maximum of 500 examples per class
61
+ - Updates prototypes every 50 examples
62
+
63
+ ## Citation
64
+
65
+ ```bibtex
66
+ @software{adaptive_classifier,
67
+ title = {Adaptive Classifier: Dynamic Text Classification with Continuous Learning},
68
+ author = {Sharma, Asankhaya},
69
+ year = {2025},
70
+ publisher = {GitHub},
71
+ url = {https://github.com/codelion/adaptive-classifier}
72
+ }
73
+ ```
config.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "config": {
3
+ "batch_size": 32,
4
+ "device_map": "auto",
5
+ "early_stopping_patience": 3,
6
+ "epochs": 10,
7
+ "ewc_lambda": 100.0,
8
+ "gradient_checkpointing": false,
9
+ "learning_rate": 0.0005,
10
+ "max_examples_per_class": 500,
11
+ "max_length": 512,
12
+ "min_confidence": 0.1,
13
+ "min_examples_per_class": 3,
14
+ "neural_weight": 0.2,
15
+ "num_representative_examples": 5,
16
+ "prototype_update_frequency": 50,
17
+ "prototype_weight": 0.8,
18
+ "quantization": null,
19
+ "similarity_threshold": 0.7,
20
+ "warmup_steps": 0
21
+ },
22
+ "embedding_dim": 768,
23
+ "id_to_label": {
24
+ "0": "HIGH",
25
+ "1": "LOW"
26
+ },
27
+ "label_to_id": {
28
+ "HIGH": 0,
29
+ "LOW": 1
30
+ },
31
+ "model_name": "distilbert/distilbert-base-cased",
32
+ "train_steps": 20
33
+ }
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:d35ab846d8a61c801b3fa4f6dd184469445035e51c9ba6b823ae2704d147c86e
3
+ size 3553504