
The GLM-130B system is a bilingual pre-trained extensive language model with over 130 billion parameters able to produce text results in both English and Chinese. The GLM-130B system is an effort to release a language model at a scale of over 100B parameters, and talk about how frameworks of such a massive scale can be pre-trained because currently, training a model of such a significant scale is often plagued with problems like divergence & loss spikes.
In this piece, we will discuss the GLM-130B system, which seeks to create a method to effectively pre-train extensive language models with hundreds of billions of parameters. We will delve deeper into the operation & structure of the GLM-130B system along with the training process & design choices that not only aids in increasing the efficiency but also the stability. Initial experiments conducted to test the operation of the GLM-130B system on a wide range of English benchmarks resulted in the GLM-130B model surpassing the current state of the art GPT-3 system by a significant margin. So let’s initiate, and investigate how the GLM-130B system delivers such reliable, accurate, and steady outcomes.
An Overview of the GLM-130B System
Extensive Language Models capable of functioning in few-shot & zero-shot setups, specifically those with over 100 billion parameters present appealing scaling laws, among which, the GPT-3 system is one of the top-performing systems that provides considerable performance improvements over its forerunner, the BERT system. However, notwithstanding the popularity of the GPT-3 system, and its widespread applications, the training process, and in some respects, the GPT-3 system itself has not been transparent to the public. Furthermore, empirically enumerating all the possible designs for training LLMs over 100B parameters is computationally unaffordable which makes it even more crucial to come up with a pre-training method for large scale LLM frameworks.
The above point underscores the significance of sharing the operation and the training process of high-quality large-scale LLM frameworks like GPT-3, and with the ethical concerns taken into account, the GLM-130B system is an endeavor to pre-train an accurate and open-source LLM with over 100B parameters. Throughout their endeavor, the GLM-130B development team observed that pre-training a large-scale LLM framework is often accompanied by a wide array of engineering & technical challenges in terms of pre-training stability, efficiency, and convergence.
To be more precise, the GLM-130B is a bidirectional, and bilingual dense framework consisting of over 130B parameters, pre-trained over 400B tokens on a cluster of 96 NVIDIA DGX-A100 GPU nodes over a span of nearly two months. Furthermore, instead of opting for the GPT-style architecture, the GLM-130B system uses the GLM or General Language Model algorithm in an effort to leverage its autoregressive blank infilling objectives, and the bidirectional attention advantage. The following table compares the GLM-130B system with other models with over 100B parameters including GPT, BLOOM-176B, and OPT-175B.
The engineering and development concepts involved in the GLM-130B system outperforms almost every large-scale LLM framework including GPT-3, and PaLM 540B with over 500B parameters in many instances, and across a wide range of benchmarks. The following figure compares the performance of the GLM-130B system with models with over 100B+ parameters, and as it be seen, the GLM-130B system has significantly less generation toxicity, and bias than its counterparts.
Finally, the GLM-130B has been designed in a way to allow as many developers to conduct studies on frameworks with over 100B parameters, and there are two ways in which the GLM-130B system achieves this. Firstly, instead of using over 175B parameters like BLOOM & OPT, the GLM-130B system uses 130B parameters, because the size of the model supports interference even on a lone A100 server. Secondly, the GPU requirements to run the GLM-130B system is less when compared to other LLM frameworks, and the GLM-130B system achieves this by quantizing the original system into INT4 precision. The INT4 quantization used by the GLM-130B system enhances the performance while maintaining negligible performance degradation.
GLM-130B : Structure
The inductive bias of a machine learning model is described by its structure, and it doesn’t come as a surprise when developers cannot explore various architectural designs for large language models given the computational affordability, and viability. With that being said, let’s have a look at GLM-130B’s structure.
Large-scale LLM frameworks like PaLM, GPT, and more have over 100B parameters, and they are built on the traditional decoder-only GPT-style architecture for autoregressive language modeling. On the other hand, the GLM-130B system explores the possibility of using a bidirectional General Language Model or GLM, a transformer-based language model that aims to leverage autoregressive blank filling as the training objective, as its foundation. Briefly, for a given text sequence, the GLM framework samples the text spans that are then replaced with a single mask token.
The bidirectional attention of the General Language Model over uncorrupted or unmasked contexts is what sets the GLM-130B system apart from the GPT-style approach that makes use of a unidirectional approach. Furthermore, to support both generation & understanding of data,the GLM framework combines two degradation approaches, each of which is denoted with a distinct & exclusive concealment token.
- [SUBSTITUTE] : [SUBSTITUTE] denotes a degradation approach that employs brief gaps in sentences, the sizes of which total up to a certain proportion of the input.
- [gSUBSTITUTE] : [gSUBSTITUTE] represents a degradation approach that utilizes random-length gaps towards the conclusion of the sentence with the prefix contexts.
The strategy pursued by the GLM framework is what enables it to achieve an accuracy score of over 80% on zero-shot LAMBADA language modeling, surpassing both the PaLM 540B and the GPT-3 framework.
Layer Normalization
Developers face a significant challenge when training an LLM framework, related to training instability, and the use of an appropriate LN(Layer Normalization) may assist in addressing the training of LLMs. The GLM-130B framework employs a Post-LN approach due to its performance on downstream tasks.
FFNs and Positional Encoding
Feedforward Neural Networks or FFNs and positional encoding are two methods embraced by the GLM-130B framework to introduce advanced downstream performance & training stability.
Pre-Training Setup
The pre-training objectives of the GLM-130B framework not only encompass multi-task learning for a small number of tokens but also involve the self-supervised GLM for autoregressive filling of the gaps, with the anticipation that this approach will bolster the GLM-130B framework in downstream tasks. Considering these factors, the pre-training setup of the GLM-130B framework takes the following shape.
Self-Supervised Gap Filling
As previously mentioned, the GLM-130B framework utilizes two corruption strategies namely the [SUBSTITUTE] and [gSUBSTITUTE], and one of these strategies is independently applied to every individual training sequence, one at a time. For infilling the gaps, the [SUBSTITUTE] strategy masks consecutive spans in 30% of the training sequence, where the lengths of the spans add to up to 15% of the input, and follows a Poisson distribution. For the remaining 70% of the sequence, the prefix of every sequence is kept as a context, and the [gSUBSTITUTE] strategy assists in masking the rest of it, and the masked length is then sampled using the Uniform distribution.
Multi-Task Instructions Pre-Training
It has been suggested that employing a multi-task learning approach for pre-training the models may yield superior results compared to fine-tuning, to enhance task transfers in a zero-shot setting. As a result, the GLM-130B framework proposes to utilize a variety of instruction prompted datasets including language generation, comprehension, and information extraction during pre-training.
When juxtaposed with other approaches for zero-shot task transfer that use multi-task prompted fine-tuning, the Multi-Task Instructions Pre-Training approach adopted by the GLM-130B framework accounts for a mere 5% of the total tokens, and it is established during the pre-training phase to forestall spoiling other capacities of the LLM framework or in other words, unconditional free generation.
3D Parallel Strategy
There are two de facto practices for training large scale models with billions of parameters, the tensor model parallelism and the data parallelism. To minimize the GPU utilization and manage extensive GPU requirements, the GLM-130B framework implements a 3D parallel strategy that integrates the pipeline model parallelism strategy with the tensor model parallelism and the data parallelism strategies.
GLM-130B : Training Stability
Training stability plays a crucial role in determining an LLM’s quality, and it is heavily influenced by the number of tokens it traverses. Furthermore, it is essential to strike a balance between stability and efficiency in relation to floating point formats given the computational constraints. For instance, low precision floating point formats enhance the computational efficiency, but they often lead to training collapses as they are susceptible to underflow and overflow errors.
Mixed Precision
In a bid to enhance training accuracy and reduce memory usage, the GLM-130B framework adheres to the common practice of employing mixed precisions i.e FP16 for both forward & backwards, and FP32 for both master weights and optimizer states. Similar to other prominent LLM frameworks including BLOOM-176B and OPT-175B, the training phase of the GLM-130B framework using the mixed precision strategy encounters frequent loss spikes, and the frequency of these spike losses tends to increase as the model continues to train. Furthermore, there are significant issues encountered when scaling up the transformers.
First, the value scale of the main branch of the transformer can be vast in the deeper layers when using Pre-LN, and in the GLM-130B framework, it is addressed by using a DeepNorm based Pre-LN, which ensures that the value scale remains bounded at all times. Second, as the model scales up, the attention scores grow to a point where they exceed FP16’s range.
Embedding-Layer Gradient Shrink or EGS
Developers working on the GLM-130B framework identified that the gradient norm can act as an informative indicator for training collapses, and a training collapse usually lags behind a spike in the gradient norm. The cause for these spikes is the abnormal gradients of the embedding layer, and developers observed that when compared to the gradient norm of other layers, the gradient norm of the embedding layers is larger by several magnitudes, and it also tends to fluctuate dramatically during the early training of the framework. Vision models also face this issue, and it is handled by freezing the patch projection layer. However, the same approach cannot be applied to LLMs as in language models, you cannot freeze the projection layers.
GLM-130B : Results and Performance
To assess GLM-130B’s performance for English tasks, it adopts the same settings as common LLM frameworks including PaLM and GPT-3, and as the GLM-130B is a bilingual framework, it is also assessed across several Chinese benchmarks. The GLM-130B framework’s performance will be evaluated across multiple benchmarks including Language Modelling, MMLU orEnormous Multitask Language Comprehension, BIG-Bench or Advancing the Imitation Game Benchmark, and CLUE or Chinese Language Comprehension Assessment. Let’s begin.
Language Designing
The Language Designing benchmark examination on the GLD-130B structure is conducted across two datasets: LAMBADA, and Pile.
The LAMBADA dataset is employed to assess the final word designing abilities of LLDs, and the GLD-130B structure attains a zero-shot correctness score of 80.2 in a bilingual environment, hence establishing a new benchmark record on the LAMBADA dataset.
On the flip side, Pile is a test set that includes a series of benchmarks for language designs. On average, compared to the GPT-3 and Jurassic-1, the GLD-130B structure exhibits its finest performance on 18 shared test sets in terms of weighted BPBs. The outcomes showcase the robust language capabilities of the GLD-130B structure, and the results are integrated in the table below.
EMLU or Enormous Multitask Language Comprehension
EMLU or Enormous Multitask Language Comprehension is a wide-ranging benchmark comprising over 50 multiple-choice question answering tasks concerning human intelligence & knowledge, covering a spectrum from high-school to expert levels. It is launched after the crawling of the Pile test set, hence serving as an ideal way to evaluate the few-shot learning capabilities of a LLD.
As evident, in a few shot setups(5-shot), the performance of the GLD-130B structure approaches the GPT-3 model’s performance after reviewing nearly 300B tokens. The performance continues to enhance as the training progresses, and upon completion of training, the structure achieves a correctness score of 44.8 after reviewing a total of 400B tokens.
BIG-Bench or Advancing the Imitation Game Benchmark
BIG-Bench or Advancing the Imitation Game Benchmarks, arduous tasks assess a model’s ability in knowledge, reasoning, and commonsense. As illustrated in the ensuing illustrations, in a zero-shot setting, the GLD-130B structure surpasses both PaLM 540B and GPT-3 175B structures, potentially due to MIP and the bidirectional context attention that enhances the GLD-130B’s performance in unseen tasks in a zero-shot setting. Additionally, with the increase in the number of shots, the performance of the GLD-130B structure also improves, consistently outperforming the GPT-3 structure.
CLUE or Chinese Language Comprehension Assessment
GLD-130B’s Chinese zero-shot performance is evaluated on established NLP benchmark tasks including CLUE and FewCLUE, and is compared against 260B ERNIE Titan 3.0, the largest existing Chinese language model. As observed, the GLD-130B structure consistently outperforms the 260B ERNIE Titan 3.0 structure across 12 diverse tasks, and achieves almost 260% better performance than the ERNIE structure on two abstractive MRC datasets.
Final Remarks
This piece has delved into GLD-130B, a bilingual pre-trained substantial language model that seeks to advance comprehensive LLD research. The composition, engineering, and technical endeavors aim to furnish the AI community with a more profound understanding of the architecture of LLD frameworks, training effectiveness & stability, pre-training goals, and economical interference.
“`











