Skip to content

Feature Request: Support for GLM 5.2 #24730

Description

@artraze

Prerequisites

  • I am running the latest code. Mention the version if possible as well.
  • I carefully followed the README.md.
  • I searched using keywords relevant to my issue to make sure that I am creating a new issue that is not already open (or closed).
  • I reviewed the Discussions, and have a new and useful enhancement to share.

Feature Description

Add support for GLM 5.2, which makes use of sparse attention acceleration by skipping top-k index calculation for some layers

Motivation

GLM 5.2 is currently the top ranked open weights model.

Possible Implementation

The main change since 5.1 seems to be the sparse sparse attention, specifically the index_skip_topk_offset: 3 and index_topk_freq: 4 which signal that the sparse attention is only recalculated every 4 layers after the first 3, while in GLM 5.1 it was calculated every layer. A indexer_types: [...] is provided, but seems to just codify the offset+freq.

(I would figure this is being worked on, but I couldn't find any discussion, PR, or issue so I figured I would make one. If no one is actually looking into it, I could give it a shot at some point today.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions