File size: 4,920 Bytes
03ac729
 
 
 
 
 
 
 
 
 
 
 
 
e5b448f
03ac729
e5b448f
03ac729
e5b448f
03ac729
e5b448f
 
 
 
 
03ac729
e5b448f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
03ac729
 
 
 
 
 
 
 
e5b448f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
03ac729
e5b448f
03ac729
e5b448f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
---

library_name: scikit-learn
pipeline_tag: text-classification
tags:
- cnn-dailymail
- text-summarization
- tf-idf
- logistic-regression
- adaptive-inference
---


# Adaptive Inference Controller

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.

## Model Details

### Model Description

- **Developed by:** Not specified in the study documents
- **Model type:** TF-IDF feature extraction with balanced logistic regression
- **Language(s) (NLP):** English
- **License:** Not specified in the study documents
- **Finetuned from:** Not applicable; this is a separate controller, not a fine-tuned language model

### Model Sources

- **Repository:** https://huggingface.co/ramitha2002/PSSN-Adaptive-Inference-Controller

## Uses

### Direct Use

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.

### Downstream Use

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.

### Out-of-Scope Use

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.

## Bias, Risks, and Limitations

The controller predicts the study’s binary labels. Those labels and classifier metrics do not establish the factual correctness of generated summaries.

### Recommendations

Use the controller with the specified candidate depths and routing procedure. Assess generated-text quality separately from the controller’s classification metrics.

## How to Get Started with the Model

1. Load `controller.joblib` with `joblib`.
2. Build the controller features from the visible article text and candidate-depth token.
3. Apply the fitted word and character TF-IDF transformations.
4. Evaluate candidate depths using the controller and route according to the 0.5 threshold, falling back to depth 32.

## Training Details

### Training Data

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.

### Training Procedure

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.

#### Preprocessing

- Word TF-IDF: unigrams and bigrams, up to 20,000 features
- Character TF-IDF: `char_wb` 3–5-grams, up to 20,000 features
- Sublinear term-frequency scaling

#### Training Hyperparameters

- **Classifier:** Logistic regression with balanced class weights
- **Solver:** `lbfgs`
- **Iteration cap:** 2,000
- **Seed:** 42
- **Regularization search:** C = 0.1, 1, and 10
- **Routing threshold search:** 0.5, 0.7, 0.9, and 1.1
- **Selected settings:** C = 1.0; threshold = 0.5

### Speeds, Sizes, Times

Not reported in the study documents.

## Evaluation

### Testing Data, Factors & Metrics

#### Testing Data

Held-out article-depth examples from CNN/DailyMail were used to evaluate predictions of the binary controller labels.

#### Factors

Candidate inference depths: 24, 28, and 32 layers.

#### Metrics

Accuracy, precision, recall, and F1 measure the controller’s predictions of the binary quality labels. The classification threshold was 0.5.

### Results

| Metric | Score |
|---|---:|
| Accuracy | 75.73% |
| Precision | 78.01% |
| Recall | 75.25% |
| F1 | 76.61% |

#### Summary

These scores describe prediction of the controller labels; they are not a measure of factual correctness.

## Technical Specifications

### Model Architecture and Objective

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.

### Compute Infrastructure

The controller is a CPU component used alongside the language model.

#### Hardware

AMD MI300X

#### Software

The controller uses TF-IDF feature extraction and scikit-learn logistic regression.

## Glossary

- **Inference depth:** The number of model layers used for generation.
- **Routing threshold:** The probability threshold used to decide whether a candidate depth is selected.

## More Information

The controller artifact is provided as `controller.joblib`.

## Model Card Authors

Ramitha Iddamalgoda