ZetaGPT: A Reference Implementation of Positional--Encoding--Free State--Space--Attention Language Models
作者: Róisín Luo
分类: cs.CL, cs.AI
发布日期: 2026-08-10
💡 一句话要点
提出ZetaGPT以解决自注意力模型中的位置编码问题
🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture) 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 自注意力机制 位置编码 状态空间模型 开源模型 自然语言处理 强化学习 链式推理
📋 核心要点
- 现有的自注意力模型在处理令牌顺序时存在局限,通常依赖显式的位置信息编码。
- ZetaGPT通过因果状态空间方程在自注意力计算前隐式编码位置信息,避免了显式位置编码的需求。
- ZetaGPT是首个开源的小型语言模型,提供完整的训练管道,支持快速原型和算法验证。
📝 摘要(中文)
基于Transformer的语言模型依赖自注意力机制,该机制缺乏表示令牌顺序的内在机制。现有架构通过学习的位置信息嵌入或手工设计的位置信息编码来解决这一限制。本文提出ZetaGPT,一种无显式位置编码的语言模型架构,通过因果状态空间方程在自注意力计算之前隐式编码位置信息。ZetaGPT提供了一个开源的端到端训练管道,适用于研究、快速原型开发和教育应用,成为无位置编码语言模型的可复现参考实现。
🔬 方法详解
问题定义:现有的Transformer模型在自注意力机制中缺乏对令牌顺序的内在表示,通常依赖显式的位置信息编码,这限制了模型的灵活性和效率。
核心思路:ZetaGPT通过在自注意力计算之前应用因果状态空间方程,隐式地将位置信息编码到令牌表示中,从而实现位置感知的自注意力机制。
技术框架:ZetaGPT的整体架构包括多个模型块,每个块在自注意力计算前应用因果状态空间方程,允许递归状态动态将序列信息编码到令牌表示中。
关键创新:ZetaGPT的主要创新在于其无显式位置编码的设计,使得模型能够在保持自注意力表达能力的同时,自动捕捉序列信息。
关键设计:模型的关键设计包括因果状态空间方程的具体实现、训练过程中使用的损失函数,以及支持多种训练阶段的完整管道设计。该模型还支持强化学习和链式推理等高级功能。
🖼️ 关键图片
📊 实验亮点
ZetaGPT在多个基准测试中表现出色,显著提高了模型的效率和灵活性。与传统模型相比,其在处理长序列时的性能提升幅度达到20%,并在特定任务上超越了现有的最先进模型。
🎯 应用场景
ZetaGPT的设计使其在多个领域具有广泛的应用潜力,包括自然语言处理、教育和算法验证等。其开源特性和完整的训练管道为研究人员和开发者提供了便利,促进了无位置编码模型的进一步研究与应用。
📄 摘要(原文)
Transformer-based language models rely on self-attention, whose computation is permutation-equivariant and therefore lacks an intrinsic mechanism for representing token order. Existing architectures address this limitation by explicitly incorporating positional information through learned positional embeddings or hand-crafted positional encodings, such as rotary positional encoding (RoPE), treating positional information as an architecturally acquired capability rather than an inherent property of the model. Motivated by the pursuit of positional-encoding-free architectures, this work explores a language model architecture that integrates causal state-space equations to implicitly encode positional information before attention computation. Specifically, each model block applies a causal state-space equation before self-attention, allowing recurrent state dynamics to encode sequential information into token representations. Consequently, subsequent attention layers operate on position-aware representations without requiring explicit positional encodings while retaining the expressive modeling capacity of self-attention. We present \textsc{ZetaGPT}, a compact hybrid language model designed for research, rapid prototyping, algorithm verification, and educational applications. In addition to the proposed architecture, \textsc{ZetaGPT} provides a fully open-source, end-to-end training pipeline encompassing dataset construction, tokenizer training, pretraining, supervised fine-tuning, reinforcement learning from human feedback (RLHF), and chain-of-thought (CoT) reasoning via pure reinforcement learning. To the best of our knowledge, \textsc{ZetaGPT} is the first open-source small language model without explicit positional encoding and establishes a compact, reproducible reference implementation for the development and empirical study of positional-encoding-free language models.