Papers › GLM-130B: An Open Bilingual Pre-trained Model

GLM-130B: An Open Bilingual Pre-trained Model

5 Oct 2022arXiv:2210.02414archive 2025-07-28

Aohan Zeng, Xiao Liu, Zhengxiao Du, Zihan Wang, Hanyu Lai, Ming Ding, Zhuoyi Yang, Yifan Xu, Wendi Zheng, Xiao Xia, Weng Lam Tam, Zixuan Ma, Yufei Xue, Jidong Zhai, WenGuang Chen, Peng Zhang, Yuxiao Dong, Jie Tang

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×RTX 3090 (24G) or 8×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 https://github.com/THUDM/GLM-130B/.

PaperPDFCodeCode Syntology ranMethod as code

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 21 code samples harvested from 4 repositories linked to this paper: 15 ran (of which 0 constructed an object rather than computing a result; 14 with no instrument failure: 0 honoured, 0 violated, 14 with no contract checked; 1 where Syntology's instrument failed) · 6 unverified. Where Syntology's instrument failed: 1 where our contract draft was wrong; failures of Syntology's instrument, not of the code.

By repository: official repository: 9 samples from 1 repository, 9 ran (9 with no instrument failure; 0 where Syntology's instrument failed); community (archive-listed): 12 samples from 3 repositories, 6 ran (5 with no instrument failure; 1 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

No sample is linked to this paper from 1 of its repositories that Syntology harvested for other papers:

Levels written between 2026-09-22 and 2026-09-26 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

thudm/glm-130b officialmentioned in papermentioned on GitHubpytorchApache-2.0Syntology: 9 samples, 9 ran (0 instrument-failed) · 0 unverified report
thudm/chatglm mentioned on GitHubpytorchApache-2.0Syntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to ChatGLM: A Family of Large Language Models from GLM-130B to GLM-4 All Tools (arXiv:2406.12793; that paper's own run record: 21 ran (of which 0 constructed an object rather than computing a result; 15 with no instrument failure: 1 honoured, 0 violated, 14 with no contract checked; 6 where Syntology's instrument failed) · 8 unverified); nothing checks that they implement this paper's method. report
thudm/chatglm2-6b mentioned on GitHubpytorchNOASSERTIONSyntology: not harvested report
thudm/chatglm3 mentioned on GitHubpytorchSyntology: 2 samples, 0 ran · 2 unverified report
2023-MindSpore-4/Code12 mindsporeSyntology: not harvested report
2023-MindSpore-4/Code12 mindsporeSyntology: not harvested report
THUDM/GLM pytorchSyntology: 4 samples, 2 ran (1 instrument-failed) · 2 unverified report
jackaduma/ChatGLM-LoRA-RLHF-PyTorch pytorchMITSyntology: 6 samples, 4 ran (0 instrument-failed) · 2 unverified report
modelscope/modelscope pytorchApache-2.0Syntology: not harvested report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.

Code Syntology ran Syntology

21 samples harvested: 15 ran (of which 0 constructed an object rather than computing a result; 14 with no instrument failure: 0 honoured, 0 violated, 14 with no contract checked; 1 where Syntology's instrument failed) · 6 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

1ran · our draft was wrong
14ran
6unverified

Licence: 0 of the 21 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 4 repositories linked to this paper, official or community; the list below is grouped by repository, each group headed by its name and what it is to the paper. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.

thudm/glm-130b official repository 9 samples, 9 ran (0 instrument-failed) · 0 unverified
F1_metric evaluation/metrics.py ran Apache-2.0 (permissive) · 57bdd79eeeb0d09e · report fixture: signature predictions:list/1/int, examples:list/1/dict · returned float · level recorded 2026-09-25
accuracy_metric in 7 papers evaluation/metrics.py ran Apache-2.0 (permissive) · 1bc1a496ad4d784f · report fixture: signature predictions:list/1/int, examples:list/1/dict · returned float · level recorded 2026-09-25
add_bminf_args initialize.py ran Apache-2.0 (permissive) · 945d1222f0c75dab · report fixture: signature parser:ArgumentParser/0/? · returned ArgumentParser · level recorded 2026-09-24
add_evaluation_specific_args evaluate.py ran Apache-2.0 (permissive) · 8c1dee88ecad5be5 · report fixture: signature parser:ArgumentParser/0/? · returned ArgumentParser · level recorded 2026-09-25
find_all_tasks evaluate.py ran Apache-2.0 (permissive) · 1a1a6bb1bc387926 · report fixture: signature all_task_config_path:list/1/str · returned list · level recorded 2026-09-25
get_masks_and_position_ids generate.py ran Apache-2.0 (permissive) · 5530d6c17cee956e · report fixture: signature seq:Tensor/2/int, mask_position:int/0/int, max_gen_length:int/0/int, gmask:bool/0/bool · returned tuple · level recorded 2026-09-25
isEnglish generate.py ran Apache-2.0 (permissive) · 294d09efc94ec53e · report fixture: signature s:str/0/str · returned bool · level recorded 2026-09-25
pad_batch in 12 papers evaluation/dataset.py ran Apache-2.0 (permissive) · 4cd519b7c609ddfa · report fixture: signature tokens:ndarray/1/int, position_ids:ndarray/1/int, attention_mask:ndarray/1/int, max_seq_length:int/0/int · returned tuple · level recorded 2026-09-25
precision_metric evaluation/metrics.py ran Apache-2.0 (permissive) · cef36ffea76c70c8 · report fixture: signature predictions:list/1/int, examples:list/1/dict · returned float · level recorded 2026-09-25
thudm/chatglm3 community (archive-listed) 2 samples, 0 ran · 2 unverified
load_tokenizer_and_model in 8 papers finetune_demo/finetune_hf.py unverified Apache-2.0 (permissive) · 632dd3e505d6e594 · report
print_model_size finetune_demo/finetune_hf.py unverified Apache-2.0 (permissive) · 677f282a0ca855b5 · report
THUDM/GLM community (archive-listed) 4 samples, 2 ran (1 instrument-failed) · 2 unverified
PromptSpell model/modeling_glm.py ran MIT (permissive) · 184ed80cb890ac12 · report fixture: returned Tensor · level recorded 2026-09-24
init_method_normal in 7 papers model/modeling_glm.py ran · our draft was wrong MIT (permissive) · 6bcca529f47d7b8e · report fixture: signature std:float/0/float · returned function · level recorded 2026-09-22
GLMModel model/modeling_glm.py unverified MIT (permissive) · c9043275a83fa6fd · report
print_rank_0 model/modeling_glm.py unverified MIT (permissive) · 58b8c47b2ea3036c · report
jackaduma/ChatGLM-LoRA-RLHF-PyTorch community (archive-listed) 6 samples, 4 ran (0 instrument-failed) · 2 unverified
format_example in 43 papers cover_alpaca2jsonl.py ran MIT (permissive) · 1b801af1b3425cfa · report fixture: signature example:dict/0/? · returned dict · level recorded 2026-09-26
gelu in 308 papers
census: 43 implementations from 74 papers, 6 distinct outputs on one shared input
models/modeling_chatglm.py ran MIT (permissive) · 43c9688838aff8b2 · report fixture: returned Tensor · level recorded 2026-09-24
gelu_impl in 5 papers models/modeling_chatglm.py ran MIT (permissive) · c8f235d13277facd · report fixture: returned Tensor · level recorded 2026-09-24
preprocess in 284 papers
census: 11 implementations from 13 papers, 10 distinct outputs across 5 buckets, one shared input per bucket
tokenize_dataset_rows.py ran MIT (permissive) · 2df80eb832dfdf12 · report fixture: signature tokenizer:MockTokenizer/0/?, config:MockConfig/0/?, example:dict/0/?, max_seq_length:int/0/int · returned dict · level recorded 2026-09-25
load_tf_weights_in_chatglm_6b models/modeling_chatglm.py unverified MIT (permissive) · 25fd6233234767aa · report
preprocess_function in 29 papers train_reward_model.py unverified MIT (permissive) · 732abe979cb6bf39 · report

Method as code Syntology

What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it. Siblings are assemblies lifted from this paper in the same batch for the same method: alternative readings kept side by side; none replaces or supersedes another.

2 assemblies on this paper: 2 harvested, 0 generated, listed in 1 groups (siblings lifted in one batch form one group).

2 sibling assemblies for GLM-130B (harvested), lifted in the same batch on 2026-09-09: alternative readings kept side by side; none replaces or supersedes another.

harvested Assembly for GLM-130B (graph method: GLM-130B). 2 bricks; individually on a fixture: 0 ran · 2 unverified. The assembly has not been run end-to-end.

one of 2 siblings

  1. load_tokenizer_and_model entry · level 0 · unverified · 632dd3e505d6e594
  2. print_model_size helper · level 0 · unverified · 677f282a0ca855b5

harvested Assembly for GLM-130B (graph method: GLM-130B). 4 bricks; individually on a fixture: 2 ran (of which 0 constructed an object rather than computing a result; 1 with no instrument failure: 0 honoured, 0 violated, 1 with no contract checked; 1 where Syntology's instrument failed) · 2 unverified. The assembly has not been run end-to-end.

one of 2 siblings

  1. GLMModel entry · level 0 · unverified · c9043275a83fa6fd
  2. PromptSpell helper · level 1 · ran · 184ed80cb890ac12
  3. init_method_normal helper · level 1 · ran · our draft was wrong · 6bcca529f47d7b8e
  4. print_rank_0 helper · level 0 · unverified · 58b8c47b2ea3036c

Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2210.02414") returns these assemblies with each brick's role and wiring (how to connect).

Tasks

Language ModelingLanguage ModellingLong-Context UnderstandingMulti-task Language UnderstandingQuantizationmodel

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Language Modelling BIG-bench-lite GLM-130B (3-shot) Accuracy 15.11 #1 of 3 Archive leaderboard report
Language Modelling BIG-bench-lite GLM-130B (1-shot) Accuracy 14.91 #2 of 3 Archive leaderboard report
Language Modelling BIG-bench-lite GLM-130B (0-shot) Accuracy 13.31 #3 of 3 Archive leaderboard report
Language Modelling CLUE (AFQMC) GLM-130B Accuracy 71.2 #1 of 2 Archive leaderboard report
Language Modelling CLUE (AFQMC) ERNIE 3.0 Titan-260B Accuracy 69.0 #2 of 2 Archive leaderboard report
Language Modelling CLUE (C3) GLM-130B Accuracy 77.5 #1 of 2 Archive leaderboard report
Language Modelling CLUE (C3) ERNIE 3.0 Titan-260B Accuracy 54.9 #2 of 2 Archive leaderboard report
Language Modelling CLUE (CMNLI) GLM-130B Accuracy 77.0 #1 of 2 Archive leaderboard report
Language Modelling CLUE (CMNLI) ERNIE 3.0 Titan-260B Accuracy 51.7 #2 of 2 Archive leaderboard report
Language Modelling CLUE (CMRC2018) GLM-130B Accuracy 55.7 #1 of 2 Archive leaderboard report
Language Modelling CLUE (CMRC2018) ERNIE 3.0 Titan-260B Accuracy 16.6 #2 of 2 Archive leaderboard report
Language Modelling CLUE (DRCD) GLM-130B Accuracy 77.1 #1 of 2 Archive leaderboard report
Language Modelling CLUE (DRCD) ERNIE 3.0 Titan-260B Accuracy 29.5 #2 of 2 Archive leaderboard report
Language Modelling CLUE (OCNLI_50K) GLM-130B Accuracy 74.7 #1 of 2 Archive leaderboard report
Language Modelling CLUE (OCNLI_50K) ERNIE 3.0 Titan-260B Accuracy 44.6 #2 of 2 Archive leaderboard report
Language Modelling CLUE (WSC1.1) GLM-130B Accuracy 83.9 #1 of 2 Archive leaderboard report
Language Modelling CLUE (WSC1.1) ERNIE 3.0 Titan-260B Accuracy 81.1 #2 of 2 Archive leaderboard report
Language Modelling FewCLUE (BUSTM) GLM-130B Accuracy 77.5 #1 of 2 Archive leaderboard report
Language Modelling FewCLUE (BUSTM) ERNIE 3.0 Titan-260B Accuracy 64.4 #2 of 2 Archive leaderboard report
Language Modelling FewCLUE (CHID-FC) GLM-130B Accuracy 90.1 #1 of 2 Archive leaderboard report
Language Modelling FewCLUE (CHID-FC) ERNIE 3.0 Titan-260B Accuracy 87.1 #2 of 2 Archive leaderboard report
Language Modelling FewCLUE (CLUEWSC-FC) GLM-130B Accuracy 77.4 #1 of 2 Archive leaderboard report
Language Modelling FewCLUE (CLUEWSC-FC) ERNIE 3.0 Titan-260B Accuracy 53.5 #2 of 2 Archive leaderboard report
Language Modelling FewCLUE (EPRSTMT) GLM-130B Accuracy 92.5 #1 of 2 Archive leaderboard report
Language Modelling FewCLUE (EPRSTMT) ERNIE 3.0 Titan-260B Accuracy 88.8 #2 of 2 Archive leaderboard report
Language Modelling FewCLUE (OCNLI-FC) GLM-130B Accuracy 73.8 #1 of 2 Archive leaderboard report
Language Modelling FewCLUE (OCNLI-FC) ERNIE 3.0 Titan-260B Accuracy 53.8 #2 of 2 Archive leaderboard report
Language Modelling LAMBADA GLM-130B (bidirectional attention) Accuracy 80.2 #12 of 37 Archive leaderboard report
Language Modelling The Pile GLM-130B Bits per byte 0.634 #5 of 39 Archive leaderboard report
Language Modelling The Pile Jurassic-1 Bits per byte 0.65 #7 of 39 Archive leaderboard report
Language Modelling The Pile GPT-3 Bits per byte 0.742 #16 of 39 Archive leaderboard report
Long-Context Understanding Ada-LEval (BestAnswer) ChatGLM3-6b-32k 12k 0.9 #7 of 10 Archive leaderboard report
Long-Context Understanding Ada-LEval (BestAnswer) ChatGLM3-6b-32k 16k 0.5 #7 of 10 Archive leaderboard report
Long-Context Understanding Ada-LEval (BestAnswer) ChatGLM3-6b-32k 1k 39.8 #7 of 10 Archive leaderboard report
Long-Context Understanding Ada-LEval (BestAnswer) ChatGLM3-6b-32k 2k 18.8 #7 of 10 Archive leaderboard report
Long-Context Understanding Ada-LEval (BestAnswer) ChatGLM3-6b-32k 4k 9.0 #7 of 10 Archive leaderboard report
Long-Context Understanding Ada-LEval (BestAnswer) ChatGLM3-6b-32k 6k 5.0 #7 of 10 Archive leaderboard report
Long-Context Understanding Ada-LEval (BestAnswer) ChatGLM3-6b-32k 8k 3.4 #7 of 10 Archive leaderboard report
Long-Context Understanding Ada-LEval (BestAnswer) ChatGLM2-6b-32k 12k 0.0 #10 of 10 Archive leaderboard report
Long-Context Understanding Ada-LEval (BestAnswer) ChatGLM2-6b-32k 16k 0.3 #10 of 10 Archive leaderboard report
Long-Context Understanding Ada-LEval (BestAnswer) ChatGLM2-6b-32k 1k 31.2 #10 of 10 Archive leaderboard report
Long-Context Understanding Ada-LEval (BestAnswer) ChatGLM2-6b-32k 2k 10.9 #10 of 10 Archive leaderboard report
Long-Context Understanding Ada-LEval (BestAnswer) ChatGLM2-6b-32k 4k 4.5 #10 of 10 Archive leaderboard report
Long-Context Understanding Ada-LEval (BestAnswer) ChatGLM2-6b-32k 6k 1.6 #10 of 10 Archive leaderboard report
Long-Context Understanding Ada-LEval (BestAnswer) ChatGLM2-6b-32k 8k 1.6 #10 of 10 Archive leaderboard report
Long-Context Understanding Ada-LEval (TSort) ChatGLM3-6b-32k 16k 0.7 #9 of 10 Archive leaderboard report
Long-Context Understanding Ada-LEval (TSort) ChatGLM3-6b-32k 2k 2.3 #9 of 10 Archive leaderboard report
Long-Context Understanding Ada-LEval (TSort) ChatGLM3-6b-32k 4k 2.4 #9 of 10 Archive leaderboard report
Long-Context Understanding Ada-LEval (TSort) ChatGLM3-6b-32k 8k 2.0 #9 of 10 Archive leaderboard report
Long-Context Understanding Ada-LEval (TSort) ChatGLM2-6b-32k 16k 0.9 #10 of 10 Archive leaderboard report
Long-Context Understanding Ada-LEval (TSort) ChatGLM2-6b-32k 2k 0.9 #10 of 10 Archive leaderboard report
Long-Context Understanding Ada-LEval (TSort) ChatGLM2-6b-32k 4k 0.2 #10 of 10 Archive leaderboard report
Long-Context Understanding Ada-LEval (TSort) ChatGLM2-6b-32k 8k 0.7 #10 of 10 Archive leaderboard report
Multi-task Language Understanding MML GLM-130B Average (%) 44.8 #30 of 44 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Introduced by this paper: GLM

AWAREAdamAttentionAttention DropoutBPECosine AnnealingDense ConnectionsDropoutERNIEGLMGPT-3Layer NormalizationLinear LayerLinear Warmup With Cosine AnnealingMulti-Head AttentionResidual ConnectionSoftmaxWeight Decay

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections