GLM-4 MoE (GLM-4.5 / GLM-4.7)

View as Markdown

GLM-4.5 and GLM-4.7 are Mixture-of-Experts variants of the GLM family released under the zai-org HuggingFace organization. GLM-4.7-Flash is a lighter variant with fewer active parameters.

TaskText Generation (MoE)
ArchitectureGlm4MoeForCausalLM / Glm4MoeLiteForCausalLM
Parametersvaries
HF Orgzai-org

Available Models

  • GLM-4.5-Air (Glm4MoeForCausalLM)
  • GLM-4.7 (Glm4MoeForCausalLM)
  • GLM-4.7-Flash (Glm4MoeLiteForCausalLM): lightweight MoE variant

Architectures

  • Glm4MoeForCausalLM — GLM-4.5, GLM-4.7
  • Glm4MoeLiteForCausalLM — GLM-4.7-Flash

Example HF Models

ModelHF ID
GLM-4.5-Airzai-org/GLM-4.5-Air
GLM-4.7zai-org/GLM-4.7
GLM-4.7-Flashzai-org/GLM-4.7-Flash

Example Recipes

RecipeDescription
glm_4.5_air_te_deepep.yamlSFT — GLM-4.5-Air with TE + DeepEP
glm_4.7_te_deepep.yamlSFT — GLM-4.7 with TE + DeepEP
glm_4.7_flash_te_deepep.yamlSFT — GLM-4.7-Flash with TE + DeepEP
glm_4.7_flash_te_packed_sequence.yamlSFT — GLM-4.7-Flash with packed sequences

Try with NeMo AutoModel

1. Install (full instructions):

$pip install nemo-automodel

2. Clone the repo to get the example recipes:

$git clone https://github.com/NVIDIA-NeMo/Automodel.git
$cd Automodel

This recipe was validated on 8 nodes × 8 GPUs (64 H100s). See the Launcher Guide for multi-node setup.

3. Run the recipe from inside the repo:

$automodel --nproc-per-node=8 examples/llm_finetune/glm/glm_4.5_air_te_deepep.yaml

1. Pull the container and mount a checkpoint directory:

$docker run --gpus all -it --rm \
> --shm-size=8g \
> -v $(pwd)/checkpoints:/opt/Automodel/checkpoints \
> nvcr.io/nvidia/nemo-automodel:26.04.00

2. Navigate to the AutoModel directory (where the recipes are):

$cd /opt/Automodel

3. Run the recipe:

$automodel --nproc-per-node=8 examples/llm_finetune/glm/glm_4.5_air_te_deepep.yaml

See the Installation Guide and LLM Fine-Tuning Guide.

Fine-Tuning

See the LLM Fine-Tuning Guide and the Large MoE Fine-Tuning Guide.

Hugging Face Model Cards