codelion commited on
Commit
fce041f
·
verified ·
1 Parent(s): b33377d

Push model using huggingface_hub.

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: answerdotai/ModernBERT-large
19
+ - Number of Classes: 2
20
+ - Total Examples: 200
21
+ - Embedding Dimension: 1024
22
+
23
+ ## Class Distribution
24
+
25
+ ```
26
+ HALLUCINATED: 100 examples (50.0%)
27
+ NOT_HALLUCINATED: 100 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("adaptive-classifier/model-name")
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: 36
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 100 examples per class
61
+ - Updates prototypes every 10 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": 4,
4
+ "device_map": "auto",
5
+ "early_stopping_patience": 2,
6
+ "epochs": 5,
7
+ "ewc_lambda": 100.0,
8
+ "gradient_checkpointing": false,
9
+ "learning_rate": 2e-05,
10
+ "max_examples_per_class": 100,
11
+ "max_length": 2048,
12
+ "min_confidence": 0.1,
13
+ "min_examples_per_class": 3,
14
+ "neural_weight": 0.3,
15
+ "num_representative_examples": 5,
16
+ "prototype_update_frequency": 10,
17
+ "prototype_weight": 0.7,
18
+ "quantization": null,
19
+ "similarity_threshold": 0.6,
20
+ "warmup_steps": 0
21
+ },
22
+ "embedding_dim": 1024,
23
+ "id_to_label": {
24
+ "0": "NOT_HALLUCINATED",
25
+ "1": "HALLUCINATED"
26
+ },
27
+ "label_to_id": {
28
+ "HALLUCINATED": 1,
29
+ "NOT_HALLUCINATED": 0
30
+ },
31
+ "model_name": "answerdotai/ModernBERT-large",
32
+ "train_steps": 36
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:7e59e231515d471dd0c1ea3fb6493ea137deaf4f93628033d2dfd9379cd7ac1d
3
+ size 6310648