ModernBERT's 28 layers aren't uniform: 18 slide a 128-token window, only 10 attend fully

AIQuanting · x · 2026-09-21

AIQuanting points out that the 28 layers in the model's config aren't uniform: 18 layers use a 128-token sliding window while only 10 attend over the full span, so most of the stack reads locally even with 8192 tokens available.

The follow-up discussion clarifies that maxpositionembeddings: 8192 is just a config field — downstream laya cards list 512, agent configs cap at 512, and laya-multilingual variants list 1024. Extra limits added downstream can be safely removed.

Related event: Debate over ModernBERT long-context: sliding-window layers and 8192 limit questioned(5 posts)→

Original post →

More from Models

Models channel →