ramitha2002 commited on
Commit
e5b448f
·
verified ·
1 Parent(s): 03ac729

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +120 -8
README.md CHANGED
@@ -11,15 +11,98 @@ tags:
11
 
12
  # Adaptive Inference Controller
13
 
14
- A fitted controller for selecting an inference depth for article-to-summary generation with an early-exit-capable Llama 3 8B model. The language-model weights remain frozen; this repository contains the separate controller artifact.
15
 
16
- ## Method
17
 
18
- The controller uses visible article text and a candidate-depth token for depths 24, 28, and 32. Word TF-IDF features use unigrams and bigrams, and character TF-IDF features use `char_wb` 3–5-grams. The features feed balanced logistic regression. The selected regularization setting is C = 1.0, and the selected routing probability threshold is 0.5. At inference, the controller chooses a fixed depth for the article; routing falls back to depth 32 when no shallower candidate meets the threshold.
19
 
20
- ## Held-out controller metrics
 
 
 
 
21
 
22
- These metrics measure prediction of the binary quality labels at a classification threshold of 0.5.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
 
24
  | Metric | Score |
25
  |---|---:|
@@ -28,8 +111,37 @@ These metrics measure prediction of the binary quality labels at a classificatio
28
  | Recall | 75.25% |
29
  | F1 | 76.61% |
30
 
31
- The label task uses generated summaries and reference highlights from CNN/DailyMail. The controller receives article text and candidate depth as features.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
 
33
- ## Artifact
34
 
35
- `controller.joblib` is the fitted scikit-learn controller pipeline.
 
11
 
12
  # Adaptive Inference Controller
13
 
14
+ A fitted controller that selects an inference depth for article-to-summary generation with an early-exit-capable Llama 3 8B model. The language-model weights remain frozen; this repository contains the separate controller.
15
 
16
+ ## Model Details
17
 
18
+ ### Model Description
19
 
20
+ - **Developed by:** Not specified in the study documents
21
+ - **Model type:** TF-IDF feature extraction with balanced logistic regression
22
+ - **Language(s) (NLP):** English
23
+ - **License:** Not specified in the study documents
24
+ - **Finetuned from:** Not applicable; this is a separate controller, not a fine-tuned language model
25
 
26
+ ### Model Sources
27
+
28
+ - **Repository:** https://huggingface.co/ramitha2002/PSSN-Adaptive-Inference-Controller
29
+
30
+ ## Uses
31
+
32
+ ### Direct Use
33
+
34
+ Given visible article text and a candidate depth (24, 28, or 32 layers), the controller predicts whether that candidate meets the study’s binary target.
35
+
36
+ ### Downstream Use
37
+
38
+ Integrate the controller with the early-exit-capable Llama 3 8B model. Check candidate depths in ascending order and select the first whose predicted positive probability meets the 0.5 routing threshold. If none qualifies, use depth 32. The chosen depth remains fixed during generation.
39
+
40
+ ### Out-of-Scope Use
41
+
42
+ This artifact does not generate text or contain language-model weights. It is designed to route article-to-summary generation through the described model setup.
43
+
44
+ ## Bias, Risks, and Limitations
45
+
46
+ The controller predicts the study’s binary labels. Those labels and classifier metrics do not establish the factual correctness of generated summaries.
47
+
48
+ ### Recommendations
49
+
50
+ Use the controller with the specified candidate depths and routing procedure. Assess generated-text quality separately from the controller’s classification metrics.
51
+
52
+ ## How to Get Started with the Model
53
+
54
+ 1. Load `controller.joblib` with `joblib`.
55
+ 2. Build the controller features from the visible article text and candidate-depth token.
56
+ 3. Apply the fitted word and character TF-IDF transformations.
57
+ 4. Evaluate candidate depths using the controller and route according to the 0.5 threshold, falling back to depth 32.
58
+
59
+ ## Training Details
60
+
61
+ ### Training Data
62
+
63
+ CNN/DailyMail 3.0.0 articles and reference highlights were used to create article-depth examples. Reference highlights were used for offline label generation and evaluation, not as controller input features.
64
+
65
+ ### Training Procedure
66
+
67
+ The controller uses visible article text plus a candidate-depth token. Word and character TF-IDF features are concatenated and passed to balanced logistic regression.
68
+
69
+ #### Preprocessing
70
+
71
+ - Word TF-IDF: unigrams and bigrams, up to 20,000 features
72
+ - Character TF-IDF: `char_wb` 3–5-grams, up to 20,000 features
73
+ - Sublinear term-frequency scaling
74
+
75
+ #### Training Hyperparameters
76
+
77
+ - **Classifier:** Logistic regression with balanced class weights
78
+ - **Solver:** `lbfgs`
79
+ - **Iteration cap:** 2,000
80
+ - **Seed:** 42
81
+ - **Regularization search:** C = 0.1, 1, and 10
82
+ - **Routing threshold search:** 0.5, 0.7, 0.9, and 1.1
83
+ - **Selected settings:** C = 1.0; threshold = 0.5
84
+
85
+ ### Speeds, Sizes, Times
86
+
87
+ Not reported in the study documents.
88
+
89
+ ## Evaluation
90
+
91
+ ### Testing Data, Factors & Metrics
92
+
93
+ #### Testing Data
94
+
95
+ Held-out article-depth examples from CNN/DailyMail were used to evaluate predictions of the binary controller labels.
96
+
97
+ #### Factors
98
+
99
+ Candidate inference depths: 24, 28, and 32 layers.
100
+
101
+ #### Metrics
102
+
103
+ Accuracy, precision, recall, and F1 measure the controller’s predictions of the binary quality labels. The classification threshold was 0.5.
104
+
105
+ ### Results
106
 
107
  | Metric | Score |
108
  |---|---:|
 
111
  | Recall | 75.25% |
112
  | F1 | 76.61% |
113
 
114
+ #### Summary
115
+
116
+ These scores describe prediction of the controller labels; they are not a measure of factual correctness.
117
+
118
+ ## Technical Specifications
119
+
120
+ ### Model Architecture and Objective
121
+
122
+ A separate controller uses word and character TF-IDF features with balanced logistic regression to select an inference depth for an early-exit-capable Llama 3 8B model. The language-model weights remain frozen.
123
+
124
+ ### Compute Infrastructure
125
+
126
+ The controller is a CPU component used alongside the language model.
127
+
128
+ #### Hardware
129
+
130
+ AMD MI300X
131
+
132
+ #### Software
133
+
134
+ The controller uses TF-IDF feature extraction and scikit-learn logistic regression.
135
+
136
+ ## Glossary
137
+
138
+ - **Inference depth:** The number of model layers used for generation.
139
+ - **Routing threshold:** The probability threshold used to decide whether a candidate depth is selected.
140
+
141
+ ## More Information
142
+
143
+ The controller artifact is provided as `controller.joblib`.
144
 
145
+ ## Model Card Authors
146
 
147
+ Ramitha Iddamalgoda