Skip to main content
QUICK REVIEW

[Paper Review] ChatGLM: A Family of Large Language Models from GLM-130B to GLM-4 All Tools

Team GLM, :|arXiv (Cornell University)|Jun 18, 2024
Topic Modeling175 citations
TL;DR

ChatGLM presents a family of LLMs culminating in GLM-4 and GLM-4 All Tools, achieving strong performance on English and Chinese benchmarks and enabling autonomous tool use for complex tasks.

ABSTRACT

We introduce ChatGLM, an evolving family of large language models that we have been developing over time. This report primarily focuses on the GLM-4 language series, which includes GLM-4, GLM-4-Air, and GLM-4-9B. They represent our most capable models that are trained with all the insights and lessons gained from the preceding three generations of ChatGLM. To date, the GLM-4 models are pre-trained on ten trillions of tokens mostly in Chinese and English, along with a small set of corpus from 24 languages, and aligned primarily for Chinese and English usage. The high-quality alignment is achieved via a multi-stage post-training process, which involves supervised fine-tuning and learning from human feedback. Evaluations show that GLM-4 1) closely rivals or outperforms GPT-4 in terms of general metrics such as MMLU, GSM8K, MATH, BBH, GPQA, and HumanEval, 2) gets close to GPT-4-Turbo in instruction following as measured by IFEval, 3) matches GPT-4 Turbo (128K) and Claude 3 for long context tasks, and 4) outperforms GPT-4 in Chinese alignments as measured by AlignBench. The GLM-4 All Tools model is further aligned to understand user intent and autonomously decide when and which tool(s) touse -- including web browser, Python interpreter, text-to-image model, and user-defined functions -- to effectively complete complex tasks. In practical applications, it matches and even surpasses GPT-4 All Tools in tasks like accessing online information via web browsing and solving math problems using Python interpreter. Over the course, we have open-sourced a series of models, including ChatGLM-6B (three generations), GLM-4-9B (128K, 1M), GLM-4V-9B, WebGLM, and CodeGeeX, attracting over 10 million downloads on Hugging face in the year 2023 alone. The open models can be accessed through https://github.com/THUDM and https://huggingface.co/THUDM.

Motivation & Objective

  • Assess the performance of GLM-4 and GLM-4 All Tools on standard academic benchmarks and long-context tasks.
  • Describe pre-training, alignment, and architectural decisions enabling improved Chinese and English capabilities.
  • Evaluate instruction-following, alignment, and safety aspects across multiple benchmarks.
  • Demonstrate the All Tools capability for autonomous tool use (web, Python, image generation) and agent tasks.

Proposed method

  • Describe pre-training data composition and tokenization strategy (ten trillion tokens, bilingual focus).
  • Explain architectural choices (no bias except QKV, RMSNorm, SwiGLU, RoPE2D, Group Query Attention) and context-length scaling up to 128K/1M.
  • Outline multi-stage post-training alignment (SFT, RLHF) and data quality controls.
  • Summarize All Tools integration including web browser, Python interpreter, text-to-image model, and user-defined functions.
  • Describe evaluation setups across benchmarks (MMLU, GSM8K, MATH, BBH, GPQA, HumanEval, AlignBench, LongBench-Chat, NCB, Berkeley Function Call Leaderboard, AgentBench).
Figure 1 : The timeline of the GLM family of language, code, vision, and agent models. The focus of this report is primarily on the language models, i.e., ChatGLM. The APIs are publicly available at https://bigmodel.cn and open models can be accessed through https://github.com/THUDM .
Figure 1 : The timeline of the GLM family of language, code, vision, and agent models. The focus of this report is primarily on the language models, i.e., ChatGLM. The APIs are publicly available at https://bigmodel.cn and open models can be accessed through https://github.com/THUDM .

Experimental results

Research questions

  • RQ1How close do GLM-4 and GLM-4 All Tools come to GPT-4 and Claude on standard benchmarks?
  • RQ2Can GLM-4's Chinese alignment and long-context abilities match or surpass competing models?
  • RQ3What impact do architectural innovations and long-context training have on performance and efficiency?
  • RQ4How effective is GLM-4 All Tools at autonomous tool use and agent tasks?
  • RQ5What are the safety and risk profiles of GLM-4 compared to state-of-the-art models?

Key findings

  • GLM-4 (0520) achieves MMLU 83.3, GSM8K 93.3, MATH 61.3, BBH 84.7, GPQA 39.9, HumanEval 78.5, approaching GPT-4 Turbo and Claude 3 Opus on many benchmarks.
  • In instruction following, GLM-4-0520 matches GPT-4 Turbo (2024-04-09) in prompt/instruction settings and Chinese translation prompts with high similarity to GPT-4 Turbo.
  • GLM-4 outperforms GPT-4 and matches GPT-4 Turbo in Chinese alignment on AlignBench, and GLM-4 128K context length matches GPT-4 Turbo and Claude 3 Opus on long-context tasks (LongBench-Chat).
  • GLM-4 All Tools can autonomously select and use tools (web browser, Python interpreter, text-to-image model) to complete complex tasks and often surpasses GPT-4 All Tools in practical information access and math solving.
  • GLM-4-9B-Chat and GLM-4-Air offer competitive performance with reduced latency and cost, with long-context extensions (128K/1M) and code/problem-solving capabilities.
  • On safety, GLM-4 shows competitive scores on SafetyBench across most dimensions, closely mirroring Claude 3 Opus and approaching GPT-4 family in overall safety.
Figure 2 : An Illustrative Example of GLM-4 All Tools.
Figure 2 : An Illustrative Example of GLM-4 All Tools.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.