[Paper Review] GLM-130B: An Open Bilingual Pre-trained Model
GLM-130B is a 130B-parameter bilingual English-Chinese pre-trained model open-sourced to surpass GPT-3 in many English benchmarks and ERNIE Titan 3.0 in Chinese, with INT4 quantization enabling inference on affordable GPUs.
We introduce GLM-130B, a bilingual (English and Chinese) pre-trained language model with 130 billion parameters. It is an attempt to open-source a 100B-scale model at least as good as GPT-3 (davinci) and unveil how models of such a scale can be successfully pre-trained. Over the course of this effort, we face numerous unexpected technical and engineering challenges, particularly on loss spikes and divergence. In this paper, we introduce the training process of GLM-130B including its design choices, training strategies for both efficiency and stability, and engineering efforts. The resultant GLM-130B model offers significant outperformance over GPT-3 175B (davinci) on a wide range of popular English benchmarks while the performance advantage is not observed in OPT-175B and BLOOM-176B. It also consistently and significantly outperforms ERNIE TITAN 3.0 260B -- the largest Chinese language model -- across related benchmarks. Finally, we leverage a unique scaling property of GLM-130B to reach INT4 quantization without post training, with almost no performance loss, making it the first among 100B-scale models and more importantly, allowing its effective inference on 4$ imes$RTX 3090 (24G) or 8$ imes$RTX 2080 Ti (11G) GPUs, the most affordable GPUs required for using 100B-scale models. The GLM-130B model weights are publicly accessible and its code, training logs, related toolkit, and lessons learned are open-sourced at \url{https://github.com/THUDM/GLM-130B/}.
Motivation & Objective
- Demonstrate training an open 100B-scale bilingual LLM with transparency and practicality.
- Show that GLM-130B outperforms GPT-3 and competes with PaLM 540B on English benchmarks.
- Evaluate GLM-130B on Chinese benchmarks and compare with ERNIE Titan 3.0 260B.
- Develop training stability and platform-aware strategies to enable affordable inference.
Proposed method
- Adopt the GLM bidirectional autoregressive blank-infilling objective with [MASK] and [gMASK] tokens.
- Use DeepNorm-based Post-LN with specific initialization to stabilize training.
- Employ mixed-precision training with FP16 forward/backward and FP32 optimizer states; apply embedding gradient shrink to stabilize embeddings.
- Pre-train on 1.2T English, 1.0T Chinese WudaoCorpora, and 250G additional Chinese data, totaling ~2.45T tokens.
- Incorporate 5% multi-task instruction pre-training (MIP) with 74 prompted datasets during pre-training.
- Configure 3D parallelism (4-way tensor, 8-way pipeline) and 60-day DGX-A100 training over 400B tokens.
Experimental results
Research questions
- RQ1Can a 100B-scale open bilingual LLM achieve superior zero-shot and few-shot performance on English benchmarks compared to GPT-3 and BLOOM/OPT family?
- RQ2Does GLM-130B's bidirectional GLM architecture yield improvements on language understanding tasks relative to decoder-only models?
- RQ3What training stability strategies (e.g., DeepNorm, EGS) are effective for large-scale bilingual LLM pre-training, and how do they affect performance and accessibility?
- RQ4Can INT4 weight quantization enable affordable inference on consumer-grade GPUs without significant performance loss?
- RQ5How does GLM-130B perform on Chinese benchmarks (CLUE, FewCLUE) compared to ERNIE Titan 3.0 260B?
Key findings
- GLM-130B outperforms GPT-3 175B on a wide range of English benchmarks across 112 tasks.
- Zero-shot LAMBADA accuracy reaches 80.2% with bidirectional attention, setting a new record.
- GLM-130B surpasses PaLM 540B in many cases and outperforms ERNIE Titan 3.0 260B on Chinese CLUE tasks.
- INT4 weight quantization enables inference on 4× RTX 3090 (24G) or 8× RTX 2080 Ti (11G) with almost no performance loss.
- GLM-130B achieves strong results on MMLU in few-shot settings and performs well on BIG-bench-lite zero-shot tasks.
- The model demonstrates an INT4 quantization scaling law with stable performance across benchmarks.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.