ElasticFM commited on
Commit
9cd1eb7
1 Parent(s): 1925c1a

Upload 6 files

Browse files
Files changed (6) hide show
  1. 1.png +0 -0
  2. 2.png +0 -0
  3. 3.png +0 -0
  4. 4.png +0 -0
  5. index.html +30 -2
  6. style.css +4 -2
1.png ADDED
2.png ADDED
3.png ADDED
4.png ADDED
index.html CHANGED
@@ -10,7 +10,7 @@
10
  <div class="card">
11
  <h1>ElasticFM: Unlocking Scaling Potential of Foundation Models<br> for Evolving Data Streams at Edge</h1>
12
 
13
- <h2>1. Introduction</h2>
14
  <p>Foundation models (FMs) such as large language models are the driving force of the next generation artificial intelligence systems. The trend of deploying FMs at edge challenges their scaling potential when encountering massive new input data with compressed model sizes and constrained device resources. The prior art sheds light on learning new tasks and domains (data feature shifts) based on deployed networks. However, such learning approaches exacerbate the existing limitations: (i) predetermined network architectures lower model accuracy, and (ii) fixed model sizes hinder resource allocation optimization at a finer granularity.</p>
15
  <p>In this paper, we propose ElasticFM, a lightweight, neuron-grained scaling solution to unlock FMs' scaling potency in edge intelligence systems. ElasticFM achieves high accuracy and low overheads in model retraining by adaptively transforming a FM into a compact model that retains the most important neurons to the current input data. At run-time, ElasticFM determines optimal model sizes and assigned resources for multiple applications to maximize their overall accuracy. We implement ElasticFM in prevalent FMs of natural language processing, computer vision and multimodal applications and compare it against state-of-the-art techniques. Evaluation results show that our approach improves accuracy by 21.88% while reducing memory footprint and energy consumptions by 27.14% and 65.65%, and further achieves 15.96% overall accuracy improvement via neuron-grained resource scheduling.</p>
16
 
@@ -19,6 +19,7 @@
19
  <ul>
20
  <li>Linux and Windows</li>
21
  <li>Python 3.8+</li>
 
22
  </ul>
23
 
24
  <h3>2.2 Preparing Environment</h3>
@@ -36,8 +37,35 @@
36
  </code>
37
 
38
  <h2>3. Running Example</h2>
 
39
  <h3>3.1 Settings</h3>
40
- <p></p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  </div>
42
  </body>
43
  </html>
 
10
  <div class="card">
11
  <h1>ElasticFM: Unlocking Scaling Potential of Foundation Models<br> for Evolving Data Streams at Edge</h1>
12
 
13
+ <h2>1. Abstract</h2>
14
  <p>Foundation models (FMs) such as large language models are the driving force of the next generation artificial intelligence systems. The trend of deploying FMs at edge challenges their scaling potential when encountering massive new input data with compressed model sizes and constrained device resources. The prior art sheds light on learning new tasks and domains (data feature shifts) based on deployed networks. However, such learning approaches exacerbate the existing limitations: (i) predetermined network architectures lower model accuracy, and (ii) fixed model sizes hinder resource allocation optimization at a finer granularity.</p>
15
  <p>In this paper, we propose ElasticFM, a lightweight, neuron-grained scaling solution to unlock FMs' scaling potency in edge intelligence systems. ElasticFM achieves high accuracy and low overheads in model retraining by adaptively transforming a FM into a compact model that retains the most important neurons to the current input data. At run-time, ElasticFM determines optimal model sizes and assigned resources for multiple applications to maximize their overall accuracy. We implement ElasticFM in prevalent FMs of natural language processing, computer vision and multimodal applications and compare it against state-of-the-art techniques. Evaluation results show that our approach improves accuracy by 21.88% while reducing memory footprint and energy consumptions by 27.14% and 65.65%, and further achieves 15.96% overall accuracy improvement via neuron-grained resource scheduling.</p>
16
 
 
19
  <ul>
20
  <li>Linux and Windows</li>
21
  <li>Python 3.8+</li>
22
+ <li>CUDA 10.2+</li>
23
  </ul>
24
 
25
  <h3>2.2 Preparing Environment</h3>
 
37
  </code>
38
 
39
  <h2>3. Running Example</h2>
40
+
41
  <h3>3.1 Settings</h3>
42
+ <p><b>Models.</b> We use a semantic segmentation model based on Vision Transformer from Hugging Face as an example to explain how to connect a Hugging Face FM to the ElasticFM.</p>
43
+ <p><b>Datasets.</b> We use datasets <a href="https://link.springer.com/chapter/10.1007/978-3-319-46475-6_7">GTA5</a> and <a href="https://supervise.ly">SuperviselyPerson</a> as the source domain, and datasets <a href="https://openaccess.thecvf.com/content_cvpr_2016/html/Cordts_The_Cityscapes_Dataset_CVPR_2016_paper.html">Cityscapes</a> and <a href="https://ieeexplore.ieee.org/abstract/document/6976983">BaiduPerson</a> as the target domain.</p>
44
+
45
+ <h3>3.2 Offline Elastic Proxy Construction</h3>
46
+ <p>Run the following command sequentially to pre-train the knowledge base and index:</p>
47
+ <code>
48
+ python experiments/elasticdnn/vit_b_16/offline/fm_lora/cls/cls.py<br>
49
+ python experiments/elasticdnn/vit_b_16/offline/fm_to_md/cls_md_wo_fbs.py<br>
50
+ python experiments/elasticdnn/vit_b_16/offline/fm_to_md/cls_md_index.py<br>
51
+ </code>
52
+ <p>Note that the file path of the model checkpoint in last two files should be modified manually.</p>
53
+ <p>Run the following command to open TensorBoard and watch the metrics (e.g. losses and accuracy) during the training process:</p>
54
+ <code>
55
+ tensorboard --logdir &lt;the file path of tensorboard logs outputed in the terminal&gt;
56
+ </code>
57
+ <p>Here are three TensorBoard screenshots when three commands above are running:</p>
58
+ <img src="1.png">
59
+ <img src="2.png">
60
+ <img src="3.png">
61
+
62
+ <h3>3.3 Online Evolving Input Data Adaptation</h3>
63
+ <p>Run the following command to evaluate ElasticFM over evolving data:</p>
64
+ <code>
65
+ python experiments/elasticdnn/vit_b_16/online_new/cls/cls.py
66
+ </code>
67
+ <p>You can also launch TensorBoard to watch the retraining accuracy and time during the retraining process. Here is a screenshot:</p>
68
+ <img src="4.png">
69
  </div>
70
  </body>
71
  </html>
style.css CHANGED
@@ -9,13 +9,14 @@ body {
9
 
10
  h1 {
11
  font-size: 28px;
12
- margin-top: 0;
 
13
  text-align: center;
14
  }
15
 
16
  h2 {
17
  font-size: 24px;
18
- margin-top: 0;
19
  margin-bottom: 10px;
20
  }
21
 
@@ -64,6 +65,7 @@ ul {
64
  margin-top: 5px;
65
  margin-bottom: 10px;
66
  color: rgb(85, 85, 85);
 
67
  }
68
 
69
  img {
 
9
 
10
  h1 {
11
  font-size: 28px;
12
+ margin-top: 10px;
13
+ margin-bottom: 10px;
14
  text-align: center;
15
  }
16
 
17
  h2 {
18
  font-size: 24px;
19
+ margin-top: 10px;
20
  margin-bottom: 10px;
21
  }
22
 
 
65
  margin-top: 5px;
66
  margin-bottom: 10px;
67
  color: rgb(85, 85, 85);
68
+ font-size: 18px;
69
  }
70
 
71
  img {