GLM-5.3-Flash - former ox-alpha

https://www.reddit.com/r/LocalLLaMA/comments/1vyzzxu/megathread_glm53flash_former_oxalpha/ 

Megathread for discussing the release of GLM-5.3-Flash.
关于 GLM-5.3-Flash 版本的发布,大家一起来讨论吧。

  • Quants   量化分析师

  • Fine-Tunes & Abliterations
    微调与删除

  • Chat Templates   聊天模板

  • Inference Server Support & Configuration
    推理服务器支持与配置

  • Experiences, Benchmarks & Model Comparisons
    经验、基准测试与模型对比

We'll try to clean up future duplicates around the release and point them here.
我们会努力在发布后清理掉那些重复的条目,并将它们指向这里。

Highlights  重点内容

GLM-5.3-Flash is the first natively multimodal model in the GLM-5 series, and the first open-weight release of the glm5_next architecture. Z.ai's pitch: outperforms GLM-5.2 at one-tenth the price while approaching Claude Opus 4.8 on coding and agentic benchmarks. It introduces:
GLM-5.3-Flash 是 GLM 系列中首款原生支持多模态处理的模型,也是 glm5_next 架构首个开放版本的发布版本。Z.ai 表示:该模型的性能优于 GLM-5.2,但价格仅为后者的十分之一;在编码和智能体评估方面的表现接近 Claude Opus 4.8 的水平。此外,该模型还引入了多项改进……

  • Hybrid Sparse + Linear Attention: 45 layers laid out as repeating blocks of 3x KDA linear attention followed by 1x DeepSeek-style sparse attention (34 linear / 11 sparse layers). The sparse layers use a lightning indexer (32 heads, dim 128) with a top-k budget of 2048 tokens, sharply reducing long-context serving cost.
    混合式稀疏结构+线性注意力机制:共 45 层网络结构,由重复出现的 3x KDA 线性注意力层组成,随后是 1x DeepSeek 风格的稀疏注意力层(34 个线性层与 11 个稀疏层)。稀疏层采用闪电索引器(32 个头部,维度为 128),使用 top-k 策略进行优化,总标记数不超过 2048 个,从而显著降低了处理长上下文信息时的成本。

  • Manifold-Constrained Hyper-Connections (mHC): widened residual streams with manifold-constrained mixing between layers, adopted to further improve scaling efficiency.
    多面体约束超连接(mHC):这种连接方式通过多面体约束的方式对残差数据进行混合处理,从而进一步提升扩展效率。

  • Natively Multimodal: a 24-layer ViT (448px, patch 14, 2x2 spatial merge) with temporal patching, so image and video tokens are in the vocabulary. Trained on a 30T-token multimodal corpus.
    原生多模态模式:采用 24 层结构的中文词表,每层包含 448 像素的词汇单元,采用 2x2 的空间合并技术来处理时空信息。同时支持图像和视频标记的输入。该模型在包含 30TB 数据量的多模态语料库上进行训练而成。

  • MTP head shipped in the weights: 1 next-N prediction layer; the official vLLM recipe uses it with 5 speculative tokens.
    在权重设置中,MTP 头部的结构如下:第一个层是下一个 N 预测层;而官方的 vLLM 实现方式则是使用 5 个推测标记来组合使用这一结构。

  • FP8 first: the main repo is FP8 (e4m3, dynamic activation scaling). A separate official BF16 repo exists.
    FP8 首先:主要的存储库是 FP8(e4m3,动态激活缩放)。此外,还有一个独立的官方 BF16 存储库。

Model Overview  模型概述

  • Type: Causal Language Model with Vision Encoder (Glm5NextForConditionalGeneration)
    类型:带视觉编码器的因果语言模型( Glm5NextForConditionalGeneration

  • Training Stage: Pre-training (30T multimodal tokens) & Post-training
    训练阶段:预训练(使用 30T 多模态标记数据)与训练后处理

  • License: MIT   许可证:MIT 许可证

Language Model  语言模型

  • Number of Parameters: 320B with 18B activated
    参数数量:320B 个参数,其中 18B 个处于激活状态

  • Hidden Dimension: 4096   隐藏维度:4096

  • Vocabulary: 154,880   词汇量:154,880 个词

  • Number of Layers: 45 (first 3 dense MLP, remaining 42 MoE)
    层数数量:45 层(前 3 层用于构建密集型多层感知器,其余 42 层用于构建元学习器)

  • Hidden Layout: 11 x (3 x (KDA Linear Attention -> MoE) -> 1 x (Sparse Attention -> MoE)), plus 1 trailing linear layer
    隐藏式布局:11 个卷积层,每个卷积层包含 3 个子模块(每个子模块采用 KDA 线性注意力机制 -> 模块级输出),最后再添加一个线性尾端层。

  • KDA Linear Attention (34 layers):
    KDA 线性注意力机制(34 层架构):

    • Number of Heads: 64
      数量:64 个

    • Head Dimension: 128   头部尺寸:128

  • Sparse Attention (11 layers, DeepSeek-style):
    稀疏注意力机制(11 层结构,采用 DeepSeek 风格设计):

    • Number of Attention Heads: 64
      注意力分配数量:64 个

    • QK / V Head Dimension: 256 / 256
      QK / V 头部尺寸:256 / 256

    • Indexer: 32 heads, head dim 128
      索引器:32 个头单元,每个头单元的尺寸为 128 单位

    • Budget: top-2048 tokens   预算:最高可配置 2048 个代币

  • Mixture of Experts:   专家混合模型:

    • Number of Experts: 288 routed + 1 shared
      专家数量:288 名路由专家 + 1 名共享专家

    • Number of Activated Experts: 8 routed + 1 shared
      已激活的专家数量:8 位远程专家 + 1 位共享专家

    • Expert Intermediate Dimension: 2048
      专家级中级配置:2048

    • Dense Intermediate Dimension (layers 0-2): 12288
      密集的中间维度(第 0 到 2 层):12288

  • mHC: enabled   mHC:已启用

  • MTP: 1 layer   MTP:1 层

  • Context Length: 1,048,576 tokens (max_position_embeddings); evaluated at 300K text / 164K vision
    上下文长度:1,048,576 个标记( max_position_embeddings );评估时每 30 万文本对应 164 千个视觉数据点。

Vision Encoder  视觉编码器

  • Depth: 24 layers, hidden 1024, 16 heads
    深度:24 层,隐藏层有 1024 层,16 个分支

  • Image Size: 448 x 448, Patch Size: 14
    图片尺寸:448 x 448,块尺寸:14

  • Spatial Merge: 2 x 2, Temporal Patch: 2 (video)
    空间合并:2×2;时间切片:2 个(视频)

  • Output Projection: 4096 (LM hidden)
    输出分辨率:4096(隐藏层维度)

Weights  权重

  • zai-org/GLM-5.3-Flash - FP8 (e4m3, dynamic), 62 shards, ~331 GB
    zai-org/GLM-5.3-Flash - FP8(e4m3,动态类型),62 个分片,~,331GB

  • zai-org/GLM-5.3-Flash-BF16 - BF16, 120 shards, ~640 GB
    zai-org/GLM-5.3-Flash-BF16 - BF16 格式,120 个分片,~,64TB 容量

Architecture diagram  架构图

Benchmarks  基准指标

Benchmark chart  基准图表

Recommended sampling parameters
推荐的采样参数

From generation_config.json and the eval setup on the model card:
来自 generation_config.json ,以及模型卡上的评估设置:

  • Default: temperature=1.0, top_p=0.95 (max generation length 163,840 for evals)
    默认设置:温度值为 1.0,顶部参数值为 0.95。最大生成长度可达 163,840 个单元。

  • Agentic coding (NL2Repo): temperature=1.0, top_p=1.0
    主动式编码(NL2Repo):温度设置为 1.0,最高奖励系数设为 1.0。

  • DeepSWE: temperature=0.95, top_p=1.0
    DeepSWE:温度参数为 0.95,顶部权重系数为 1.0

  • Vision (BabyVision): temperature=1.0, top_p=0.95
    愿景(BabyVision):温度设置为 1.0,顶部权重为 0.95

Inference  推理

vLLM (official recipe, vLLM 0.27.0+, FlashInfer 0.6.17+ for NoPE sparse MLA, Hopper and newer):
vLLM(官方版本,vLLM 0.27.0 及以上版本,同时需要 FlashInfer 0.6.17 及以上版本,适用于 NoPE 稀疏 MLA、Hopper 以及更新型的方法):

vllm serve zai-org/GLM-5.3-Flash \  --tensor-parallel-size 4 \  --kv-cache-dtype fp8 \  --speculative-config '{"method":"mtp","num_speculative_tokens":5}' \  --tool-call-parser glm47 \  --reasoning-parser glm45 \  --enable-auto-tool-choice \  --served-model-name zai-org/GLM-5.3-Flash

SGLang: official cookbook has verified configs for H100/H200/B200/B300/GB200/GB300 (TP4/EP4), with adaptive MTP for low-latency and --mm-feature-transport cpu to offload vision features.
SGLang:官方食谱已确认了 H100/H200/B200/B300/GB200/GB300(TP4/EP4)型号的配置参数。同时,系统还具备自适应 MTP 功能,可实现低延迟运行,并支持通过 --mm-feature-transport cpu 来卸载视觉处理任务。

Also supported at launch: TokenSpeed, KTransformers (CPU/GPU hybrid tutorial linked below).
在发布时还支持以下资源:TokenSpeed、KTransformers(下方链接中的 CPU/GPU 混合教程)。

Official Links  官方链接

Popular  受欢迎的