# zai-org/glm-4

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/zai-org-glm-4).**

7,058 stars · 608 forks · Python · apache-2.0

## Links

- GitHub: https://github.com/zai-org/GLM-4
- awesome-repositories: https://awesome-repositories.com/repository/zai-org-glm-4.md

## Topics

`chatglm` `chatglm-6b` `glm` `glm-4` `glm4`

## Description

GLM-4 is a large language model and fine-tuning framework designed for human-like text production, complex reasoning, and multilingual conversation. It functions as a multimodal system capable of processing high-resolution visual content and as a long-context model designed to analyze documents with a context window of up to one million tokens.

The project differentiates itself through a function calling interface that enables AI agent development by connecting the model to external APIs and real-time web browsing. It includes specialized capabilities for generating functional programming code, SVG graphics, and performing research-style synthesis.

The framework covers a broad capability surface including supervised model training with distributed GPU acceleration, model adapter deployment, and NPU-targeted inference. It provides tools for multi-turn dialogue management, visual reasoning, and a code execution environment for verifying mathematical and logical results.

The model can be hosted via an OpenAI-compatible API interface for integration into other applications.

## Tags

### Artificial Intelligence & ML

- [Large Language Models](https://awesome-repositories.com/f/artificial-intelligence-ml/large-language-models.md) — Provides a generative AI model capable of human-like text production, complex reasoning, and multilingual conversation.
- [Autoregressive Text Generation](https://awesome-repositories.com/f/artificial-intelligence-ml/sequence-generation/autoregressive-text-generation.md) — Implements a transformer-based autoregressive architecture to generate coherent natural language sequences.
- [Multi-turn Interaction Managers](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-systems-frameworks/conversational-voice-interaction/conversational-ai-agents/conversational-turn-detection/multi-turn-interaction-managers.md) — Manages stateful multi-turn conversations by recalling previous exchanges to ensure coherent interactions. ([source](https://github.com/zai-org/GLM-4/blob/main/README_zh_240605.md))
- [AI Agent Development](https://awesome-repositories.com/f/artificial-intelligence-ml/ai-agent-development.md) — Enables the development of autonomous agents capable of tool use and web browsing.
- [Web Browsing Tools](https://awesome-repositories.com/f/artificial-intelligence-ml/artificial-intelligence-tooling/agent-and-tool-integrations/web-browsing-tools.md) — Provides autonomous agents with real-time internet access to ground responses in current data. ([source](https://github.com/zai-org/GLM-4/blob/main/README_20240605.md))
- [External Tool Integration](https://awesome-repositories.com/f/artificial-intelligence-ml/external-tool-integration.md) — Interfaces with external APIs and functions to enable automated agent-based workflows. ([source](https://github.com/zai-org/GLM-4/blob/main/README_20240605.md))
- [Function Calling Interfaces](https://awesome-repositories.com/f/artificial-intelligence-ml/function-calling-interfaces.md) — Implements a function calling interface that enables the model to execute external tools and APIs.
- [Tool Calling](https://awesome-repositories.com/f/artificial-intelligence-ml/generative-ai-resources/decoding-generation-controls/tool-calling.md) — Maps natural language intent to structured API requests for automated function execution.
- [Large Language Models](https://awesome-repositories.com/f/artificial-intelligence-ml/language-model-orchestration/large-language-models.md) — Provides a large-scale language model capable of complex reasoning and multilingual conversation.
- [Long-Context Models](https://awesome-repositories.com/f/artificial-intelligence-ml/large-language-models/long-context-models.md) — Employs a massive context window of up to one million tokens for analyzing extended documents.
- [LLM Fine-Tuning Toolsets](https://awesome-repositories.com/f/artificial-intelligence-ml/llm-fine-tuning-toolsets.md) — Offers a framework for supervised fine-tuning and adapter deployment to improve domain-specific performance.
- [Long Context Processing](https://awesome-repositories.com/f/artificial-intelligence-ml/long-context-processing.md) — Analyzes and extracts information from extremely large input sequences in a single pass. ([source](https://github.com/zai-org/GLM-4/blob/main/README_20240605.md))
- [Position Embedding Scaling](https://awesome-repositories.com/f/artificial-intelligence-ml/long-context-training-optimizations/context-window-management/position-embedding-scaling.md) — Extends the token window using positional embedding scaling to process up to one million tokens.
- [Multi-Modal Embedding Models](https://awesome-repositories.com/f/artificial-intelligence-ml/multi-modal-tokenizers/multi-modal-embedding-models.md) — Integrates high-resolution visual features into a shared vector space for joint visual and linguistic reasoning.
- [Multilingual Text Processing](https://awesome-repositories.com/f/artificial-intelligence-ml/multilingual-text-processing.md) — Processes and generates text across twenty-six different languages for global multilingual communication. ([source](https://github.com/zai-org/GLM-4/blob/main/README_zh_240605.md))
- [Multimodal Analysis Tools](https://awesome-repositories.com/f/artificial-intelligence-ml/multimodal-analysis-tools.md) — Processes high-resolution images and complex files for visual reasoning and text recognition.
- [Multimodal Large Language Models](https://awesome-repositories.com/f/artificial-intelligence-ml/multimodal-large-language-models.md) — Implements a neural architecture capable of processing and reasoning over both high-resolution visual content and text.
- [Natural Language Generation](https://awesome-repositories.com/f/artificial-intelligence-ml/natural-language-generation.md) — Produces human-like text responses for dialogue, general reasoning, and complex communication tasks. ([source](https://github.com/zai-org/GLM-4/blob/main/README_240605.md))
- [Supervised Fine-Tuning Frameworks](https://awesome-repositories.com/f/artificial-intelligence-ml/supervised-fine-tuning-frameworks.md) — Provides a framework for aligning pretrained models to specific tasks using supervised fine-tuning and distributed GPU acceleration.
- [OpenAI-Compatible APIs](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-systems-frameworks/model-integration-serving/model-integration-interfaces/ai-integration-apis/openai-compatible-apis.md) — Exposes model capabilities through a standardized API interface compatible with the OpenAI specification. ([source](https://github.com/zai-org/GLM-4/tree/main/inference))
- [Code and UI Generation](https://awesome-repositories.com/f/artificial-intelligence-ml/code-and-ui-generation.md) — Generates functional programming code, HTML layouts, and SVG graphics for technical illustrations and animations. ([source](https://github.com/zai-org/GLM-4/blob/main/README.md))
- [Code Execution Environments](https://awesome-repositories.com/f/artificial-intelligence-ml/code-execution-environments.md) — Provides a sandboxed environment to execute code for verifying mathematical and logical results. ([source](https://github.com/zai-org/GLM-4/blob/main/README_20240605.md))
- [Complex Problem Solving](https://awesome-repositories.com/f/artificial-intelligence-ml/complex-problem-solving.md) — Performs multi-step reasoning and mathematical logic to solve intricate, open-ended problems and research queries. ([source](https://github.com/zai-org/GLM-4#readme))
- [Distributed Training](https://awesome-repositories.com/f/artificial-intelligence-ml/distributed-training-frameworks/distributed-training.md) — Supports distributed training across multiple GPUs to enable scaling on massive datasets.
- [NPU Inference Execution](https://awesome-repositories.com/f/artificial-intelligence-ml/hardware-accelerated-inference/npu-inference-execution.md) — Optimizes tensor operations specifically for execution on neural processing units to reduce latency.
- [Context Window Scaling](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-inference-serving/model-integration-pipelines/model-inference/inference-context-customization/token-context-limiting/context-window-scaling.md) — Increases the maximum token limit using scaling techniques to process inputs exceeding native sequence lengths. ([source](https://github.com/zai-org/GLM-4/blob/main/README.md))
- [Model Fine-Tuning](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-training-and-tuning/fine-tuning-and-customization/model-fine-tuning.md) — Adjusts existing model parameters on custom datasets to specialize performance for specific domains. ([source](https://github.com/zai-org/GLM-4#readme))
- [Fine-tuned Model Deployment](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-training-and-tuning/fine-tuning-and-customization/model-fine-tuning/fine-tuned-model-deployment.md) — Provides procedures for integrating trained model adapters into inference pipelines via adapter configuration mapping. ([source](https://github.com/zai-org/GLM-4/tree/main/finetune))
- [Dialogue Loss Masking](https://awesome-repositories.com/f/artificial-intelligence-ml/masked-language-modeling/masked-image-modeling/masked-loss-calculations/dialogue-loss-masking.md) — Utilizes role-specific loss masking during training to optimize the handling of sequential multi-turn interactions. ([source](https://github.com/zai-org/GLM-4/tree/main/finetune))
- [Parameter-Efficient Adapters](https://awesome-repositories.com/f/artificial-intelligence-ml/model-weight-management/hypernetwork-weight-injection/parameter-efficient-adapters.md) — Uses adapter-based weight mapping to specialize model performance without full network retraining.
- [Natural Language Code Generators](https://awesome-repositories.com/f/artificial-intelligence-ml/natural-language-code-generators.md) — Generates functional programming code and SVG graphics from natural language instructions.
- [Supervised Fine-Tuning](https://awesome-repositories.com/f/artificial-intelligence-ml/supervised-fine-tuning.md) — Employs supervised fine-tuning with distributed GPU acceleration to optimize model weights on labeled datasets. ([source](https://github.com/zai-org/GLM-4/tree/main/finetune))
- [Visual Content Analysis](https://awesome-repositories.com/f/artificial-intelligence-ml/visual-content-analysis.md) — Processes high-resolution images to perform text recognition, chart understanding, and general visual reasoning. ([source](https://github.com/zai-org/GLM-4/blob/main/README_20240605.md))

### Development Tools & Productivity

- [Research Synthesis](https://awesome-repositories.com/f/development-tools-productivity/project-scaffolding-config-code-generation/code-generation/llm-driven/content-synthesis-engines/research-synthesis.md) — Synthesizes information using search tools to generate long-form comparative analyses and detailed research reports. ([source](https://github.com/zai-org/GLM-4/blob/main/README.md))
