ChatGLM-6B is an open-source dialogue language model that understands and generates both Chinese and English text. It is built on the General Language Model (GLM) architecture and is designed for researchers, developers, and companies who want to run a bilingual conversational model locally rather than relying on a hosted API. The project also offers a parameter-efficient fine-tuning method so downstream developers can adapt the model to their own applications.
Developers load the model through Hugging Face's transformers library with a few lines of Python and call model.chat() with a prompt to receive a text response. The model can be quantized to 8-bit or 4-bit precision to cut GPU memory needs, or run on CPU or Apple Silicon Macs at reduced speed. The repository includes a command-line demo, a Gradio-based web demo, and a FastAPI server so the model can be used interactively or called from other programs.
ChatGLM-6B can hold multi-turn conversations, remembering prior exchanges through a history parameter, and supports use cases such as self-introduction, outline writing, copywriting, email drafting, information extraction, role play, and comparative review. Multiple GPUs can be used together through an included utility that splits the model across devices, and a related project, VisualGLM-6B, extends the model with image understanding. Accelerated community implementations exist for faster inference and lower-memory deployment.
ChatGLM-6B's code is released under the Apache-2.0 license, and the model weights are free for academic research and commercial use after registering through a questionnaire. It runs on Linux, Windows, and macOS with Apple Silicon, needing roughly 13GB of memory at full precision or as little as 6GB with 4-bit quantization. The team notes the model is small enough that answers are not always accurate, and no official web, Android, iOS, or Windows app has been built from it.