返回 FLUED 主页面Back to FLUED overview

Chapter 02 · 怎么做Chapter 02 · How It Works

Architecture · v3.6

FLUED v3.6

512 字节进,一个 readout 包出512 bytes in, one readout package out

v3.6 把问题压到最硬的一档:整条 prompt 经动态切分、逐段摘要和 KDA 状态机(逐通道门控 delta 规则的线性注意力)串行消费后,只保留一个 readout 包——1536 个标量的逻辑读出单位。decoder 必须从这个固定大小的状态里把原文还原回来。本页给出管线、两个训练任务与当前公平对比锚点;所有数字为单 seed 演示口径,不构成性能结论。

v3.6 pushes the problem to its hardest setting: the whole prompt is consumed serially through dynamic segmentation, per-chunk summarization, and a KDA state machine (linear attention with a channel-wise gated delta rule), keeping only one readout package — a logical readout unit of 1,536 scalars. The decoder must restore the original text from this fixed-size state. This page gives the pipeline, the two training tasks, and the current fair-comparison anchors; all numbers are single-seed demo protocol and do not constitute performance claims.

上一章 · 研究问题:FLUED 赌语言可以先翻译成连续潜空间、再精确还原回字节——本章看 v3.6 如何把这条赌注压成一条具体流水线。

Previous · Research question: FLUED bets that language can be translated into a continuous latent space and then restored precisely to bytes — this chapter shows how v3.6 presses that bet into a concrete pipeline.

Architecture Trace

架构追踪:每代一张自上而下的流水线

Architecture trace: one top-to-bottom pipeline per generation

追踪的意思是逐节点对照真实代码:每张卡是一条从上而下的前向流水线,节点对应公开仓库里的具体模块,卡尾记录该代的结局。下方先给当前主线 v3.6(S0.5 GRPO 是它的训练阶段延伸,作从属卡挂在主卡之后,不占独立代际),再按时间序回溯 v0.4 → v2 → v3.1 → v3.2 → v3.3 → v3.4 六代,最后把竞争对手 BLT / H-Net / BPE 放到同一尺度上对照。

Tracing means checking each node against real code: every card is a top-to-bottom forward pipeline whose nodes map to concrete modules in the public repository, with the generation's outcome recorded at the end. Below we start with the current mainline v3.6 (S0.5 GRPO is its training-stage extension, attached as a subordinate card rather than its own generation), then go back in time through v0.4 → v2 → v3.1 → v3.2 → v3.3 → v3.4, and finally place the competitors BLT / H-Net / BPE on the same scale.

当前主线 · v3.6(KDA 世代)Current mainline · v3.6 (KDA generation)

v3.6 · flued/v36/model.py(369 行lines)· canonical v36.1

整条 prompt → 单个 readout 包

Whole prompt → a single readout package

状态:当前主线。S0 动态边界 + KDA 串行状态把 512B prompt 压成 1×1,536 标量;masked 0.149 打赢 HNet-DiT 瓶颈臂 0.142(单 seed 同口径)。

Status: current mainline. S0 dynamic boundaries + a serial KDA state compress a 512B prompt into 1×1,536 scalars; masked 0.149 beats the HNet-DiT bottleneck arm's 0.142 (single seed, same protocol).

  1. 字节流 512B单样本全上下文 · 无窗口无 stride
  2. byte stream 512Bone sample, full context · no window, no stride
  3. PlainByteLookupd_byte 384 · PAD-offset
  4. byte encoder ×3DiTStyleBlock · RoPE + ALiBi
  5. segmentor ×9 + headS0 段落标签预训后冻结 · 教师 F1 0.886
  6. segmentor ×9 + headpretrained on S0 paragraph labels, then frozen · teacher F1 0.886
  7. tanh 有界置信度 → 动态切分conf > 0.94 · UTF-8 续字节禁切 · 首字节强切 · 容量截断
  8. tanh-bounded confidence → dynamic segmentationconf > 0.94 · no cuts at UTF-8 continuation bytes · forced cut at first byte · capacity truncation
  9. ChunkBuildermax 64 chunks / span 64
  10. ChunkSummarizer4 slot 注意力池化 + FFN → d_mem 512(每段一个 memory)
  11. ChunkSummarizer4-slot attention pooling + FFN → d_mem 512 (one memory per chunk)
  12. WriteHeadk L2 归一 · v · β sigmoid(bias −2)· α 逐通道衰减
  13. WriteHeadk L2-normalized · v · β sigmoid (bias −2) · α channel-wise decay
  14. KDAStateMachineS ← αS − βk(kᵀS) + βkvᵀ · 4 头 k128/v256 · 状态随样本生灭
  15. KDAStateMachineS ← αS − βk(kᵀS) + βkvᵀ · 4 heads k128/v256 · state lives and dies with each sample
  16. readout query ×1 + realign终态读出 4×256=1,024 → MLP realign → 包 1×1,536
  17. readout query ×1 + realignfinal-state readout 4×256=1,024 → MLP realign → package 1×1,536
  18. TinyBackbone3L pre-norm · 仅任务二经过
  19. TinyBackbone3L pre-norm · task two only
  20. GlobalSpanDecoder与 encoder 共享 byte 表 · cosine logits
  21. GlobalSpanDecodershares the byte table with the encoder · cosine logits
  22. byte logits任务一 direct 精准还原 · 任务二 backbone 改写后还原(5% span 1-8 原生 mask)
  23. byte logitstask one: direct exact restoration · task two: restoration after backbone rewriting (native 5% span 1-8 mask)

瓶颈备注:v36.1 decoder 条件 = package.mean + chunk_pos 广播;S0.7 逐段条件化已证检索瓶颈可解(unmasked 0.351 / PPL 12.1),但非默认。

Bottleneck note: the v36.1 decoder condition is package.mean + chunk_pos broadcast; S0.7 per-chunk conditioning has shown the retrieval bottleneck is solvable (unmasked 0.351 / PPL 12.1), but it is not the default.

S0.5 · 挂在 v3.6 主线之后 · 不改架构S0.5 · attached after the v3.6 mainline · no architecture change

GRPO 边界优化 GRPO boundary optimization 训练阶段 · 非独立架构training stage · not a separate architecture

结局:hard 停点 24.3 段 ≈ 用户手标 21B,教师粒度之争了结;质量与控制臂打平——GRPO 当前价值 = 选粒度,非提质量。

Outcome: hard stop at 24.3 segments ≈ 21B human-marked granularity — the teacher-granularity debate is settled; quality ties the control arm, so GRPO's current value = choosing granularity, not improving quality.

  1. v3.6 已训基线自 3K 检查点续训 2K 步
  2. trained v3.6 baselinecontinued 2K steps from the 3K checkpoint
  3. 同前缀采 G=8 个切分方案组内排名优势 · 免 value net
  4. sample G=8 segmentations per prefixwithin-group ranking advantage · no value net
  5. 约束走可微直接损失E[count] = Σcut_prob(不走采样计数率项)
  6. constraint as a differentiable direct lossE[count] = Σcut_prob (no sampled count-rate term)
  7. 微调边界 + β 写入门R4 定稿;R1–R3 三轮失败教训见下方 #frontier
  8. fine-tune boundaries + the β write gateR4 finalized; the three failed rounds R1–R3 are documented under #frontier below

历代架构(按时间序 v0.4 → v3.4)Past generations (in time order, v0.4 → v3.4)

v0.4 · flued/model.py · FLUEDAutoencoder

tied 权重自编码器

tied-weight autoencoder

结局:共享逆被三重证据判死,tied inverse 路线关闭。

Outcome: the shared inverse was ruled out by triple evidence; the tied-inverse line is closed.

  1. byte idsvocab 257 · PAD-offset
  2. tied Transformer blocksencoder / decoder 共享同一组权重
  3. tied Transformer blocksencoder / decoder share one set of weights
  4. sigmoid(Linear(ΔH))相邻隐状态差 ΔH = h_t − h_{t−1} → 边界概率adjacent hidden-state delta ΔH = h_t − h_{t−1} → boundary probability
  5. 软指派矩阵 AO(T²) 池化 · 可微切分(训练期)
  6. soft assignment matrix AO(T²) pooling · differentiable segmentation (during training)
  7. latent units
  8. tied inverse decoder逆序减块(MHA / FFN 减回)· 与正向共享参数
  9. tied inverse decoderreverse-order block subtraction (MHA / FFN subtracted back) · shares parameters with the forward pass
  10. bytes 还原bytes restored
v2 · flued/model.py · 328M tied 放大 + 去噪目标v2 · flued/model.py · 328M tied scale-up + denoising objective

去噪重建规模化

Denoising reconstruction at scale

结局:三种子重建稳定,但暴露 denoising / compression / boundary 训练动力学冲突;公平 D1 稳定但落后 BPE(0.8732 vs 0.8066 BPB)。

Outcome: three-seed reconstruction stable, but training-dynamics conflicts among denoising / compression / boundary exposed; fair D1 stable but behind BPE (0.8732 vs 0.8066 BPB).

  1. byte / mask idsvocab 258 · MASK_ID 257 · PAD-offset
  2. tied Transformer blocksSDPA + SwiGLU 3072 · 动态正弦 PEdynamic sinusoidal PE
  3. boundary_head(ΔH)五类字节类型边界先验(utf8_cont / ascii / cjk / op / digit)boundary priors over five byte types (utf8_cont / ascii / cjk / op / digit)
  4. banded 软指派矩阵 Alog-space · assignment_window 128
  5. banded soft assignment matrix Alog-space · assignment_window 128
  6. latent unitslength-aware 压缩目标compression target
  7. tied inverse decoder逆序减块 · 与正向共享参数
  8. tied inverse decoderreverse-order block subtraction · shares parameters with the forward pass
  9. bytes 还原bytes restoredclean / denoise 混合mix(denoise_prob 0.7 · corrupt 15% · span 1-8)
v3.1 · tools/analysis/v3_1/ · 语言编码器原型v3.1 · tools/analysis/v3_1/ · language-encoder prototype

readout / summary 分工确立

readout / summary division of labor established

结局:2M codec 闭环能学(recon 0.506 · length_acc 0.973 · units/byte 0.117);latent backbone 小胜 segment-mask byte 基线(0.178 vs 0.150),但早期 clean encode 评估有侧漏风险。

Outcome: the 2M codec loop is learnable (recon 0.506 · length_acc 0.973 · units/byte 0.117); the latent backbone edged out the segment-mask byte baseline (0.178 vs 0.150), but early clean-encode evaluation risked information leakage.

  1. byte ids
  2. weak boundary startsUTF-8 / 标点 / 长度弱规则标签
  3. weak boundary startsweak-rule labels from UTF-8 / punctuation / length
  4. shared segment representationmean_first_last 聚合aggregation
  5. readout latent对外 backbone 唯一接口the only interface to the external backbone
  6. summary latent → causal memory内部机制 · 只读旧 memory · 段后写入
  7. summary latent → causal memoryinternal mechanism · reads only old memory · written after each chunk
  8. length / slot allocator显式 span 长度 1..Lmaxexplicit span length 1..Lmax
  9. latent-to-byte decoder
  10. byte span
v3.2 / v3.2.1 · strict masked-source

先 mask 后 encode

Mask first, encode after

结局:先在 byte 输入层 mask、再 encode,堵住 clean readout 侧漏;严格口径下 latent backbone 明显超过 byte 基线(mask_acc 0.1898 vs 0.1440,+0.046)——当时 v3 系列最干净的正向证据。

Outcome: masking at the byte input layer before encode closed the clean-readout leak; under the strict protocol the latent backbone clearly beat the byte baseline (mask_acc 0.1898 vs 0.1440, +0.046) — then the cleanest positive evidence of the v3 series.

  1. byte ids
  2. byte 输入层先 maskstrict masked-source · 堵 clean encode 侧漏
  3. mask at the byte input layer firststrict masked-source · closes the clean-encode leak
  4. memory-free boundaryboundary 不读 memory,防互相污染
  5. memory-free boundaryboundary never reads memory, avoiding cross-contamination
  6. memory-conditioned interpreterchunk + 过去 memory → readout
  7. memory-conditioned interpreterchunk + past memory → readout
  8. causal append-only summarytop-k retrieval 未证默认收益,留实验分支
  9. causal append-only summarytop-k retrieval showed no proven default benefit; kept as an experimental branch
  10. readout latent → minimal backbonemasked latent infill 验证
  11. readout latent → minimal backbonevalidated by masked latent infill
  12. latent-to-byte decoder
  13. byte span
v3.3 · flued/v33/ · 模块化拆分v3.3 · flued/v33/ · modular decomposition

职责边界确立

Responsibility boundaries established

结局:架构截止点——各职责拆成独立模块,转向系统消融与公开复现。

Outcome: architecture cutoff — each responsibility split into its own module; focus turned to systematic ablation and public reproduction.

  1. StructuredByteLookup
  2. SignedBoundarySegmentor
  3. DualThresholdPolicy
  4. ChunkBuilder
  5. LatentMemoryInterpreter读 other-memory,不读当前段reads other-memory, never the current chunk
  6. CausalLowRankSequenceMemory
  7. SharedParameterDecoder
v3.4 · flued/v34/model.py · 单体 probe + 消融矩阵v3.4 · flued/v34/model.py · monolithic probe + ablation matrix

消融驱动取舍

Ablation-driven trade-offs

结局:memory / emit 举证失败关闭;plain lookup + 独立 decoder + uniform 边界固化为 canonical_v35。

Outcome: memory / emit failed to justify themselves and were closed; plain lookup + standalone decoder + uniform boundaries were frozen as canonical_v35.

  1. PlainByteLookup
  2. DiTStyleBlock 堆叠RoPE + ALiBi + 噪声条件
  3. DiTStyleBlock stackRoPE + ALiBi + noise conditioning
  4. FixedDualThresholdPolicy+ SoftBoundaryBridge 硬执行软反传hard execution, soft backprop
  5. ChunkBuilder
  6. QueryPool / DenseNoSelfMemory并行 · no-selfparallel · no-self
  7. SmallChunkARCorrectionchunk 内小 AR 修正small in-chunk AR correction
  8. rate_emit硬发声计入真实计算账本hard emission counted in the real compute ledger
  9. SpanDecoder独立 / 共享逆两臂对照standalone vs shared-inverse arms compared

竞争对手:同一个问题的三种回答Competitors: three answers to the same question

竞争对手 · BLT · blt_baseline/model.pyCompetitor · BLT · blt_baseline/model.py

熵驱动动态 patching

Entropy-driven dynamic patching

信号性质:纯局部统计——边界来自 byte LM 的逐字节熵,不为下游任务学习语义边界。

Nature of the signal: purely local statistics — boundaries come from a byte LM's per-byte entropy, not learned for the downstream task.

  1. byte LMd512 / 4L · 逐字节 entropyper-byte entropy
  2. EntropyPatcher熵超阈值下刀cuts where entropy exceeds the threshold
  3. local encoder / decoderpatch 内局部进出local in/out within each patch
竞争对手 · H-Net · flued/hnet_repro/model.pyCompetitor · H-Net · flued/hnet_repro/model.py

余弦不相似度动态分块

Cosine-dissimilarity dynamic chunking

E20 现象:无显式压缩激励时边界退化——DiT 标准臂 ~1 chunk,瓶颈臂 ~190 chunks,无中间态。

The E20 phenomenon: without explicit compression pressure, boundaries degenerate — ~1 chunk in the DiT standard arm, ~190 chunks in the bottleneck arm, no middle ground.

  1. byte encoder ×2causal block · RoPE
  2. 余弦不相似度 DCcosine-dissimilarity DC0.5·(1−cos) > 0.5 硬下采样 · 直通估计回传hard downsampling · straight-through estimator
  3. 因果主干 ×9复现用 causal Transformer · 论文 Mamba-2 留 R2
  4. causal trunk ×9reproduction uses a causal Transformer · the paper's Mamba-2 is left to R2
  5. dechunk → decoder ×3chunk 表示回投字节位chunk representations projected back to byte positions
竞争对手 · BPE · 离线统计分词Competitor · BPE · offline statistical tokenization

固定词表,与语义无关

A fixed vocabulary, semantics-blind

切分最碎:同一中文样本 148 段(对照 v3.6 S0 臂 ~13 段);边界由离线频次合并决定,与模型语义无关。

The finest cuts: 148 segments on the same Chinese sample (vs ~13 for the v3.6 S0 arm); boundaries are decided by offline frequency merges, unrelated to model semantics.

  1. 离线语料统计频次最高字节对迭代合并
  2. offline corpus statisticsiterative merging of the most frequent byte pairs
  3. 固定词表vocab 8,192
  4. fixed vocabularyvocab 8,192
  5. 查表切分在线无参数、不看上下文
  6. table-lookup segmentationno parameters at inference, no context

Forward Pipeline

从字节流到单个 readout 包

From a byte stream to a single readout package

前向是一条单向流水线:编码、切分、摘要、写入、读出。没有窗口、没有 stride,512 字节作为一个完整样本被一次性消费。左侧高亮节点是 v3.6 的核心创新,暗一档的是常规模块;右侧解释卡与对应节点组纵向对齐。

The forward pass is a one-way pipeline: encode, segment, summarize, write, read out. No window, no stride — 512 bytes are consumed as one complete sample. Highlighted nodes on the left are v3.6's core innovations, dimmed ones are conventional modules; the explanation cards on the right align vertically with their node groups.

  1. 字节流 512B单样本全上下文 · 无窗口无 stride
  2. byte stream 512Bone sample, full context · no window, no stride
  3. byte encoder ×3DiTStyleBlock · RoPE + ALiBi · d_byte 384
  4. segmentor ×9(S0 冻结)细长 DiT · 段落标签预训后冻结 · 教师 F1 0.886
  5. segmentor ×9 (S0, frozen)slim DiT · pretrained on paragraph labels, then frozen · teacher F1 0.886
  6. 动态切分tanh 置信度 > 0.94 下刀 · UTF-8 续字节禁切 · 首字节强切 · 容量截断
  7. dynamic segmentationcut at tanh confidence > 0.94 · no cuts at UTF-8 continuation bytes · forced cut at first byte · capacity truncation
  8. ChunkBuildermax 64 chunks / span 64
  9. ChunkSummarizer4 slot 注意力池化 + FFN → 每段一个 memory(d_mem 512)
  10. ChunkSummarizer4-slot attention pooling + FFN → one memory per chunk (d_mem 512)
  11. WriteHeadk L2 归一norm · v · β sigmoid(bias −2)· α 逐通道衰减channel-wise decay
  12. KDA 状态机串行 delta-rule 写入 · S ← αS − βk(kᵀS) + βkvᵀ · 4 头 k128/v256
  13. KDA state machineserial delta-rule writes · S ← αS − βk(kᵀS) + βkvᵀ · 4 heads k128/v256
  14. readout 包 ×1终态读出 4×256=1,024 → realign MLP → 1,536 标量
  15. readout package ×1final-state readout 4×256=1,024 → realign MLP → 1,536 scalars
  16. TinyBackbone3L 双向 pre-norm · 仅任务二经过
  17. TinyBackbone3L bidirectional pre-norm · task two only
  18. 共享 span decoder与 encoder 共享字节表 · cosine logits
  19. shared span decodershares the byte table with the encoder · cosine logits
  20. byte logits任务一 direct 精准还原 · 任务二 backbone 改写后还原(5% span 1-8 原生 mask)task one: direct exact restoration · task two: restoration after backbone rewriting (native 5% span 1-8 mask)

Two Training Tasks

同一个 readout 包,两条还原路径

One readout package, two restoration paths

训练由两个任务共同约束:一个考精准记忆,一个考经主干改写后的信息存活。掩码为原生 5%、span 1-8 的字节掩码。

Training is constrained jointly by two tasks: one tests exact memory, the other tests whether information survives rewriting by the backbone. Masks are native byte masks at 5%, span 1-8.

任务一 · 精准还原(direct)

Task one · exact restoration (direct)

  • readout 包直接进共享 span decoder。
  • The readout package goes straight into the shared span decoder.
  • 目标:逐字节精准还原文本,指标 direct_acc。
  • Goal: restore the text byte for byte; metric direct_acc.
  • 检验状态本身是否无损携带全文信息。
  • Tests whether the state itself carries the full text losslessly.

任务二 · 经主干改写还原(backbone)

Task two · restoration after backbone rewriting

  • readout 包先经 TinyBackbone 改写,再由 decoder 全部还原。
  • The readout package is first rewritten by TinyBackbone, then fully restored by the decoder.
  • 目标:掩码位置补全,指标 backbone_masked_acc(即演示与评估的主口径 masked_acc)。
  • Goal: complete the masked positions; metric backbone_masked_acc (the main masked_acc protocol used in the demo and evaluation).
  • 检验信息经过主干计算后是否仍然存活。
  • Tests whether information survives a pass of backbone computation.

两个任务共享同一份编码与切分,差别只在 readout 包之后是否插入主干。v3.6 报告的主指标一律是任务二口径。

The two tasks share the same encoding and segmentation; they differ only in whether a backbone is inserted after the readout package. All headline metrics reported for v3.6 use the task-two protocol.

Fair Comparison Anchors

公平对比锚点(2026-08-02 证据)

Fair-comparison anchors (evidence of 2026-08-02)

对比只在同一信息传输预算下成立:v3.6 与 HNet-DiT 瓶颈臂在可比压缩档位上比较 masked acc;H-Net AR 复现作为 next-byte 天花板锚。HNet-DiT 标准臂边界退化(约 1 个 chunk),不在同一压缩口径,故不作锚点。

Comparisons only hold at the same information-transmission budget: v3.6 and the HNet-DiT bottleneck arm are compared on masked acc at comparable compression tiers; the H-Net AR reproduction serves as a next-byte ceiling anchor. The HNet-DiT standard arm's boundaries degenerate (~1 chunk), so it sits outside this compression protocol and is not used as an anchor.

模型Model 口径Protocol 指标Metric 信息传输Transmission 定位Role
FLUED v3.6 (S0) 任务二 masked acc(eval)task-two masked acc (eval) 0.149 1,536 标量1,536 scalars 主模型 · 单 readout 包main model · single readout package
HNet-DiT 瓶颈臂HNet-DiT bottleneck arm masked acc(eval) 0.142 97,540 标量97,540 scalars 公平对比臂 · 过度切分fair-comparison arm · over-segmented
H-Net AR 复现H-Net AR reproduction next-byte BPB 0.653 逐位置 hidden stateper-position hidden state 天花板锚(不同任务口径)ceiling anchor (different task protocol)

~60× 信息传输效率~60× information-transmission efficiency

在 masked acc 基本持平(0.149 vs 0.142)的档位上,v3.6 的跨块通信量为 1,536 标量,瓶颈臂 97,540 标量,约 60 倍差距。

At essentially tied masked acc (0.149 vs 0.142), v3.6 transmits 1,536 scalars across chunks versus 97,540 for the bottleneck arm — roughly a 60-fold gap.

两臂退化是现象不是 bugBoth degenerate arms are a phenomenon, not a bug

无显式压缩激励时动态切分无中间态:标准臂几乎不切(约 1 chunk),瓶颈臂过度切分(约 190 chunks)。演示页可直观看到这两条臂的真实切分。

Without explicit compression pressure, dynamic segmentation has no middle ground: the standard arm barely cuts (~1 chunk) while the bottleneck arm over-segments (~190 chunks). The demo page shows both arms' real segmentations directly.

口径声明Protocol statement

以上均为单 seed、演示性质证据,用于锚定当前研究方向;不构成多种子或尺度上的性能结论。

All of the above is single-seed, demo-grade evidence meant to anchor the current research direction; it is not a multi-seed or scale-level performance claim.

Module-by-Module

v3.6 vs H-Net:逐模块三列对齐

v3.6 vs H-Net: three columns aligned module by module

比的是训练方式与不同模块的算子差异:边界怎么切、梯度怎么回传、怎么汇聚压缩、怎么上采样还原。第一列是 FLUED v3.6;第二列是原 H-Net 的论文机制;第三列是我方把 H-Net 主干换成 DiT 的公平对比臂,与 v3.6 同口径跑 masked infilling。

Compared here are training regimes and operator differences per module: how boundaries cut, how gradients flow back, how chunks are pooled and compressed, and how upsampling restores bytes. Column one is FLUED v3.6; column two is the original H-Net paper mechanism; column three is our fair-comparison arm that swaps H-Net's trunk for DiT, run under the same masked-infilling protocol as v3.6.

模块Module FLUED v3.6 H-Net 原版(论文机制)H-Net original (paper mechanism) HNet-DiT(我方公平对比臂)HNet-DiT (our fair-comparison arm)
边界算子Boundary operator segmentor 9 层细长 DiT → tanh 有界置信度 >0.94 下刀 + UTF-8 续字节禁切segmentor: 9 slim DiT layers → cut at tanh-bounded confidence >0.94 + no cuts at UTF-8 continuation bytes 相邻隐状态余弦不相似度 0.5·(1−cos) >0.5 下刀(routing module,2 层 encoder 之上)cut where adjacent hidden-state cosine dissimilarity 0.5·(1−cos) >0.5 (routing module, above a 2-layer encoder) 同 H-Net 原版(余弦不相似度)same as H-Net original (cosine dissimilarity)
边界梯度(训练方式)Boundary gradient (training regime) 不走主任务梯度:S0 段落标签 BCE 独立预训后冻结;S0.5 用 GRPO(组相对策略梯度)做离散边界优化No main-task gradient: independently pretrained on S0 paragraph labels with BCE, then frozen; S0.5 uses GRPO (group relative policy optimization) for discrete boundary optimization STE 直通估计器端到端回传(hard boundary + (prob − prob.detach()))+ ratio loss 把边界率压向 0.2STE straight-through estimator, end-to-end (hard boundary + (prob − prob.detach())) + a ratio loss pushing the boundary rate toward 0.2 同原版 STE,但训练目标换成 masked infillingsame STE as the original, but the training objective is masked infilling
汇聚 / 压缩算子Pooling / compression operator ChunkSummarizer 4-slot 注意力池化逐段产 memory → WriteHead k/v/β/α 门控 → KDA 状态机串行 delta-rule 写入ChunkSummarizer 4-slot attention pooling produces one memory per chunk → WriteHead k/v/β/α gating → serial delta-rule writes into the KDA state machine 按边界硬切 + chunk 均值池化 → chunk_proj 进主干hard cuts at boundaries + chunk mean pooling → chunk_proj into the trunk 同原版same as the original
主干Backbone TinyBackbone 3 层双向 Transformer,只看 1 个 readout 包(1,536 标量)TinyBackbone: 3-layer bidirectional Transformer seeing only 1 readout package (1,536 scalars) 层级主干,论文为 Mamba-2;我方复现因 Windows 环境用 9 层因果 Transformer(已披露差异)hierarchical trunk, Mamba-2 in the paper; our reproduction uses a 9-layer causal Transformer due to the Windows environment (difference disclosed) 7 层双向 Transformer(38.2M 对齐 39M 目标)7-layer bidirectional Transformer (38.2M, aligned to the 39M target)
解码 / 上采样算子Decoding / upsampling operator GlobalSpanDecoder:slot+cond 经 DiTStyleBlock,与 encoder 共享字节表做 cosine logitsGlobalSpanDecoder: slot+cond through DiTStyleBlock, cosine logits against the byte table shared with the encoder dechunk:取「最后完成 chunk」的主干输出回贴字节级 + 边界概率平滑 + encoder 残差(decoder_skip)dechunk: paste the trunk output of the "last completed chunk" back to byte level + boundary-probability smoothing + encoder residual (decoder_skip) 同原版;标准臂保留 byte 旁路(skip),瓶颈臂砍旁路逼信息走瓶颈same as the original; the standard arm keeps the byte bypass (skip), while the bottleneck arm removes it to force information through the bottleneck
训练目标Training objective 两任务:readout→decoder 精准还原 + readout→backbone 改写→decoder 全量还原(5% span 1-8 mask 原生)two tasks: readout→decoder exact restoration + readout→backbone rewrite→decoder full restoration (native 5% span 1-8 mask) next-byte 自回归autoregression masked infilling(5% span 1-8,与 v3.6 同口径)masked infilling (5% span 1-8, same protocol as v3.6)
压缩激励Compression pressure 率控制 100% 归边界(CBIU 锚点协议 + GRPO 线)rate control assigned 100% to boundaries (CBIU anchor protocol + the GRPO line) ratio loss = (边界率boundary rate − 0.2)² × 0.03 无显式激励 → 边界退化:标准臂塌成 ~1 chunk、瓶颈臂碎到 ~190 chunks(E20 的对照证据)No explicit pressure → boundary degeneration: the standard arm collapses to ~1 chunk, the bottleneck arm fragments to ~190 chunks (the E20 control evidence)
实测(单 seed)Measured (single seed) masked 0.149 @ 1,536 标量1,536 scalars AR 复现 next-byte BPB 0.653(全信息天花板锚)AR reproduction next-byte BPB 0.653 (full-information ceiling anchor) std 0.324 @ 262,144 标量(天花板)/ 瓶颈 0.142 @ 97,540std 0.324 @ 262,144 scalars (ceiling) / bottleneck 0.142 @ 97,540

总结论:同口径硬指标 v3.6 masked 0.149 ≈ HNet-DiT 瓶颈臂 0.142,但 v3.6 只传 1,536 标量,约 60× 信息传输效率;H-Net 两臂在无显式压缩激励时边界必退化,动态切分无中间态。

Bottom line: under the same protocol, v3.6 masked 0.149 ≈ the HNet-DiT bottleneck arm's 0.142, but v3.6 transmits only 1,536 scalars — about 60× information-transmission efficiency. Without explicit compression pressure, both H-Net arms' boundaries degenerate; dynamic segmentation has no middle ground.

Latest Evidence · 2026-08-04

S0.5–S0.7:粒度之争了结,瓶颈锁定 readout 通道

S0.5–S0.7: the granularity debate settled, the bottleneck localized to the readout channel

三条新证据(E21 / E22 / E23,候选口径):GRPO 改变的是切分粒度而不是质量;summarizer 容量消融全线无效;真正的瓶颈在下游 readout 的包均值条件通道。均为单 seed 演示口径,不构成性能结论。

Three new pieces of evidence (E21 / E22 / E23, candidate protocol): GRPO changes segmentation granularity, not quality; the summarizer-capacity ablation came back null across the board; the real bottleneck is the package-mean conditioning channel of the downstream readout. All single-seed demo protocol — not performance claims.

E21 · S0.5 GRPO 边界优化E21 · S0.5 GRPO boundary optimization

对 segmentor 边界 + β 写入门做组相对策略优化(GRPO:同前缀采 G 个切分方案、组内排名优势、免 value network)。R1–R3 三轮失败教训:纯质量奖励 → 碎切捷径冲 59/64 段;采样计数率项 → 温度涂抹脱钩;确定性罚项 → 组内零方差被优势归一化消掉——核心教训:组相对优势只能优化组内有方差的量。R4 定稿:约束走可微直接损失 E[count]=Σcut_prob,预算 18 ≈ 部署 24 段锚用户粒度 → masked 与控制臂双口径打平,但边界裁决成功:hard 停点 24.3 段 ≈ 用户 21B,教师粒度之争了结。GRPO 当前价值 = 选粒度,非提质量。

Group relative policy optimization on the segmentor boundaries + the β write gate (GRPO: sample G segmentations per prefix, within-group ranking advantage, no value network). Lessons from the three failed rounds R1–R3: a pure quality reward → a fragmenting shortcut rushing to 59/64 segments; a sampled count-rate term → decoupled by temperature smearing; a deterministic penalty → zero within-group variance erased by advantage normalization. Core lesson: group-relative advantage can only optimize what varies within the group. R4 finalized: the constraint becomes a differentiable direct loss E[count]=Σcut_prob, budget 18 ≈ 24 deployed segments anchored to human granularity → masked ties the control arm on both protocols, but the boundary ruling succeeded: hard stop at 24.3 segments ≈ 21B human-marked — the teacher-granularity debate is settled. GRPO's current value = choosing granularity, not improving quality.

E22 · S0.6 summarizer 容量全因子E22 · S0.6 summarizer-capacity full factorial

slots / hidden / d_mem 三因子 2³ 共 8 臂、20K step 从零消融:主效应 ≤ 0.24pp,全部无效。天花板不在 summarizer——瓶颈锁定到下游 readout 的包均值条件通道,直接把问题推向 S0.7 的逐段条件化诊断。

A 2³ full factorial over slots / hidden / d_mem — 8 arms trained from scratch for 20K steps: main effects ≤ 0.24pp, all null. The ceiling is not in the summarizer — the bottleneck was localized to the package-mean conditioning channel of the downstream readout, pushing the question directly to S0.7's per-chunk conditioning diagnostic.

E23 · S0.7 逐段条件化诊断E23 · S0.7 per-chunk conditioning diagnostic

per_chunk_readout:KDA 每消费一段即从当前状态读出该段条件向量,替代均值 + 位置广播。unmasked 全位置 acc 0.190 → 0.351(+16pp)、PPL 33.9 → 12.1——信息确实在 KDA 状态里,均值通道是检索瓶颈,路线活。masked 0.154 → 0.141 未过预注册线(口径:masked 测的是从未进状态的字节,靠推断而非检索)。率口径修正:该臂传输 ~27K 标量,仍比 HNet-DiT 瓶颈臂(~97K)便宜 ~3.6×。

per_chunk_readout: after consuming each chunk, KDA reads that chunk's conditioning vector from the current state, replacing mean + position broadcast. Unmasked all-position acc 0.190 → 0.351 (+16pp), PPL 33.9 → 12.1 — the information is indeed in the KDA state; the mean channel is the retrieval bottleneck, and the line stays alive. Masked 0.154 → 0.141 missed the pre-registered bar (protocol note: masked measures bytes that never entered the state — inference, not retrieval). Rate correction: this arm transmits ~27K scalars, still ~3.6× cheaper than the HNet-DiT bottleneck arm (~97K).

用户裁定(2026-08-04):masked 保持必备项不降级;S0.7 不设默认——canonical 维持 v36.1,per_chunk_readout 默认关;新条件化下 GRPO 是否重跑待定。

Ruling (2026-08-04): masked stays a required metric and is not downgraded; S0.7 is not made default — canonical stays v36.1 with per_chunk_readout off by default; whether GRPO reruns under the new conditioning is undecided.

Code Anchors

每个关键节点都能落到公开代码

Every key node lands on public code

链接固定到公开分支的实现行;训练脚本中的任务定义与指标口径应和本页共同阅读。

Links pin to implementation lines on the public branch; read them together with the task definitions and metric protocols in the training scripts.

Next · CH.03 管线看完了——让它在你眼前跑一遍 The pipeline is clear — now watch it run in front of you 进入演示 →Enter the demo →