SuperAPIAI Directory

chatglm2-6b

huggingface.co · AI assistants

ChatGLM2-6B is the second-generation version of the open-source bilingual Chinese-English dialogue model ChatGLM-6B. Based on the GLM hybrid objective function, it has undergone 1.4T Chinese-English token pre-training and human preference alignment training. Compared with the first generation, its performance has improved substantially on benchmarks such as MMLU, CEval, GSM8K, and BBH; the context length has been extended from 2K to 32K, and the dialogue stage is trained with an 8K context; it adopts Multi-Query Attention technology, improving inference speed by 42%, and under INT4 quantization, 6G of GPU memory can support an 8K dialogue length. The weights are fully open for academic research, and free commercial use is permitted after completing a questionnaire registration.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsWeb

About this tool

ChatGLM2-6B is the second-generation version of the open-source bilingual Chinese-English dialogue model ChatGLM-6B, and has undergone multiple upgrades while retaining the first-generation model's features such as fluent dialogue and a relatively low deployment threshold.

Purpose: This model is mainly used for bilingual Chinese-English dialogue generation and can serve as a foundation model for chatbots and conversational AI applications. It also supports academic research and commercial use (registration required).

Main capabilities:

  • Performance improvements: Based on the GLM hybrid objective function, it has undergone 1.4T Chinese-English token pre-training and human preference alignment training. Evaluations show that, compared with the first-generation model, performance has improved substantially on datasets such as MMLU (+23%), CEval (+33%), GSM8K (+571%), and BBH (+60%), giving it strong competitiveness among open-source models of the same size.
  • Longer context: Based on FlashAttention technology, the base model's context length has been extended from 2K to 32K, and the dialogue stage is trained with an 8K context length, allowing more dialogue turns. However, the current version has limited ability to understand single-turn ultra-long documents, which will be optimized in subsequent iterations.
  • More efficient inference: Based on Multi-Query Attention technology, inference speed is 42% faster than the first generation, with lower GPU memory usage; under INT4 quantization, the dialogue length supported by 6G of GPU memory has increased from 1K to 8K.
  • Open license: The weights are fully open for academic research, and free commercial use is permitted after completing a questionnaire registration. The code follows the Apache-2.0 license, and use of the model weights must comply with the Model License.

Usage: Model files can be downloaded from the Hugging Face repository and run; the official code examples call the model to generate dialogue. For more usage instructions (including command-line and web DEMO, and model quantization to save GPU memory), please refer to the GitHub Repo.

Applicable scenarios: Suitable for application development requiring bilingual Chinese-English dialogue capabilities, academic research, dialogue system prototyping, and more.

Limitations: The current version has limited ability to understand single-turn ultra-long documents; commercial use requires completing a questionnaire registration; use of the model weights must comply with the Model License.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools