codelion commited on
Commit
789527d
·
verified ·
1 Parent(s): 4b9c532

Upload trained LLM router with ONNX support

Browse files
Files changed (6) hide show
  1. README.md +6 -6
  2. config.json +18 -3
  3. examples.json +0 -0
  4. model.safetensors +1 -1
  5. onnx/config.json +24 -0
  6. onnx/model.onnx +3 -0
README.md CHANGED
@@ -15,16 +15,16 @@ 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
@@ -33,7 +33,7 @@ LOW: 308 examples (50.0%)
33
  from adaptive_classifier import AdaptiveClassifier
34
 
35
  # Load the model
36
- classifier = AdaptiveClassifier.from_pretrained("adaptive-classifier/llm-router")
37
 
38
  # Make predictions
39
  text = "Your text here"
@@ -48,7 +48,7 @@ classifier.add_examples(texts, labels)
48
 
49
  ## Training Details
50
 
51
- - Training Steps: 20
52
  - Examples per Class: See distribution above
53
  - Prototype Memory: Active
54
  - Neural Adaptation: Active
 
15
 
16
  ## Model Details
17
 
18
+ - Base Model: benchmark_results/onnx/
19
  - Number of Classes: 2
20
+ - Total Examples: 10
21
  - Embedding Dimension: 768
22
 
23
  ## Class Distribution
24
 
25
  ```
26
+ HIGH: 5 examples (50.0%)
27
+ LOW: 5 examples (50.0%)
28
  ```
29
 
30
  ## Usage
 
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"
 
48
 
49
  ## Training Details
50
 
51
+ - Training Steps: 3688
52
  - Examples per Class: See distribution above
53
  - Prototype Memory: Active
54
  - Neural Adaptation: Active
config.json CHANGED
@@ -1,8 +1,11 @@
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,
@@ -17,6 +20,14 @@
17
  "prototype_weight": 0.8,
18
  "quantization": null,
19
  "similarity_threshold": 0.7,
 
 
 
 
 
 
 
 
20
  "warmup_steps": 0
21
  },
22
  "embedding_dim": 768,
@@ -28,6 +39,10 @@
28
  "HIGH": 0,
29
  "LOW": 1
30
  },
31
- "model_name": "distilbert/distilbert-base-cased",
32
- "train_steps": 20
 
 
 
 
33
  }
 
1
  {
2
  "config": {
3
+ "batch_size": 16,
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,
 
20
  "prototype_weight": 0.8,
21
  "quantization": null,
22
  "similarity_threshold": 0.7,
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": 768,
 
39
  "HIGH": 0,
40
  "LOW": 1
41
  },
42
+ "model_name": "benchmark_results/onnx/",
43
+ "train_steps": 3688,
44
+ "training_history": {
45
+ "HIGH": 29504,
46
+ "LOW": 29504
47
+ }
48
  }
examples.json CHANGED
The diff for this file is too large to render. See raw diff
 
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:112ac86861bdeed55cb02426a02d16e4c7d9cb94d3bb4df93b1b73bb0c89b42f
3
  size 3553504
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:66c6f01605e69e41da15180c100ed0b094a1bba0fcac43e6477acb468a1c7d70
3
  size 3553504
onnx/config.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "benchmark_results/onnx/",
3
+ "activation": "gelu",
4
+ "architectures": [
5
+ "DistilBertForMaskedLM"
6
+ ],
7
+ "attention_dropout": 0.1,
8
+ "dim": 768,
9
+ "dropout": 0.1,
10
+ "hidden_dim": 3072,
11
+ "initializer_range": 0.02,
12
+ "max_position_embeddings": 512,
13
+ "model_type": "distilbert",
14
+ "n_heads": 12,
15
+ "n_layers": 6,
16
+ "output_past": true,
17
+ "pad_token_id": 0,
18
+ "qa_dropout": 0.1,
19
+ "seq_classif_dropout": 0.2,
20
+ "sinusoidal_pos_embds": false,
21
+ "tie_weights_": true,
22
+ "transformers_version": "4.48.0",
23
+ "vocab_size": 28996
24
+ }
onnx/model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d29cdbc87e1fedae5a5f5ff1accab5ec88f10235fb39a4a6e2567e7d5d043bc3
3
+ size 260878383