Self-Supervised Learning for Enhancing Spatial Awareness in Free-Hand Sketches

Abstract

Due to the large number of parameters, the inference phase of Large Language Models (LLMs) is resource-intensive. However, not all requests posed to LLMs are equally difficult to handle. Through analysis, we show that for some tasks, LLMs can achieve results comparable to the final output at some intermediate layers. That is, not all layers of LLMs are necessary during inference. If we can predict at which layer the inferred results match the final results (produced by evaluating all layers), we could significantly reduce the inference cost. To this end, we propose a simple yet effective algorithm named AdaInfer to adaptively terminate the inference process for an input instance. AdaInfer relies on easily obtainable statistical features and classic classifiers like SVM. Experiments on well-known LLMs like the Llama2 series and OPT, show that AdaInfer can achieve an average of 17.8% pruning ratio, and up to 43% on sentiment tasks, with nearly no performance drop (<1%). Because AdaInfer does not alter LLM parameters, the LLMs incorporated with AdaInfer maintain generalizability across tasks.

Cite

Text

Wang et al. "Self-Supervised Learning for Enhancing Spatial Awareness in Free-Hand Sketches." International Joint Conference on Artificial Intelligence, 2024. doi:10.24963/ijcai.2024/566

Markdown

[Wang et al. "Self-Supervised Learning for Enhancing Spatial Awareness in Free-Hand Sketches." International Joint Conference on Artificial Intelligence, 2024.](https://mlanthology.org/ijcai/2024/wang2024ijcai-self-a/) doi:10.24963/ijcai.2024/566

BibTeX

@inproceedings{wang2024ijcai-self-a,
  title     = {{Self-Supervised Learning for Enhancing Spatial Awareness in Free-Hand Sketches}},
  author    = {Wang, Xin and Li, Tengjie and Zang, Sicong and Tu, Shikui and Xu, Lei},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year      = {2024},
  pages     = {5117-5125},
  doi       = {10.24963/ijcai.2024/566},
  url       = {https://mlanthology.org/ijcai/2024/wang2024ijcai-self-a/}
}