Table of Contents
Fetching ...

Wave Network: An Ultra-Small Language Model

Xin Zhang, Victor S. Sheng

TL;DR

A 2.4-million-parameter small language model is used to achieve accuracy comparable to a 100-million-parameter BERT model in text classification, and reduces video memory usage and training time compared to BERT base.

Abstract

We propose an innovative token representation and update method in a new ultra-small language model: the Wave network. Specifically, we use a complex vector to represent each token, encoding both global and local semantics of the input text. A complex vector consists of two components: a magnitude vector representing the global semantics of the input text, and a phase vector capturing the relationships between individual tokens and global semantics. Experiments on the AG News text classification task demonstrate that, when generating complex vectors from randomly initialized token embeddings, our single-layer Wave Network achieves 90.91% accuracy with wave interference and 91.66% with wave modulation - outperforming a single Transformer layer using BERT pre-trained embeddings by 19.23% and 19.98%, respectively, and approaching the accuracy of the pre-trained and fine-tuned BERT base model (94.64%). Additionally, compared to BERT base, the Wave Network reduces video memory usage and training time by 77.34% and 85.62% during wave modulation. In summary, we used a 2.4-million-parameter small language model to achieve accuracy comparable to a 100-million-parameter BERT model in text classification.

Wave Network: An Ultra-Small Language Model

TL;DR

A 2.4-million-parameter small language model is used to achieve accuracy comparable to a 100-million-parameter BERT model in text classification, and reduces video memory usage and training time compared to BERT base.

Abstract

We propose an innovative token representation and update method in a new ultra-small language model: the Wave network. Specifically, we use a complex vector to represent each token, encoding both global and local semantics of the input text. A complex vector consists of two components: a magnitude vector representing the global semantics of the input text, and a phase vector capturing the relationships between individual tokens and global semantics. Experiments on the AG News text classification task demonstrate that, when generating complex vectors from randomly initialized token embeddings, our single-layer Wave Network achieves 90.91% accuracy with wave interference and 91.66% with wave modulation - outperforming a single Transformer layer using BERT pre-trained embeddings by 19.23% and 19.98%, respectively, and approaching the accuracy of the pre-trained and fine-tuned BERT base model (94.64%). Additionally, compared to BERT base, the Wave Network reduces video memory usage and training time by 77.34% and 85.62% during wave modulation. In summary, we used a 2.4-million-parameter small language model to achieve accuracy comparable to a 100-million-parameter BERT model in text classification.

Paper Structure

This paper contains 12 sections, 9 equations, 7 figures, 2 tables.

Figures (7)

  • Figure 1: Token Embedding Matrix and Magnitude Matrix
  • Figure 2: Global Semantic Vector
  • Figure 3: Token Embedding Matrix and Phase Matrix
  • Figure 4: Convert complex vector token representations from polar coordinates to Cartesian coordinates
  • Figure 5: An example of constructing representations with complex vector token representations
  • ...and 2 more figures