{
  "work_date": "2026-10-29",
  "published_date": "2026-10-30",
  "route": "blog/speed-bottleneck-breakthrough-20261029/",
  "marker": "tabu-speed-milestone-20261029",
  "sources": [
    {
      "id": "tabu-throughput-20261029/REPORT.md",
      "sha256": "de5b0b86326693851886077467bb11eab3a85553a3959fe3104d7164736dbabe"
    },
    {
      "id": "presence-profile-20261029/REPORT.md",
      "sha256": "4e00c91d6f07a61652032d21f7c80af6175e717293f21697729e3e90c655633f"
    },
    {
      "id": "presence-step-optimization-20261029/REPORT.md",
      "sha256": "3960db9d257e1f70ffafedc8faddc6713c2b6317e827ce5bcc58d14a78f90d1c"
    },
    {
      "id": "same-host-speed-20261029/REPORT.md",
      "sha256": "892e362e4ab5f1b050e4c0f748dd0181096496ec50275789d1eaa0561247fb6e"
    },
    {
      "id": "cuda-speed-causes-20261029/REPORT.md",
      "sha256": "51445594e472595b85e30a185ea81c734d711b5187983102aab34cd10c27136a"
    },
    {
      "id": "tabu-16x128-speed-20261029/REPORT.md",
      "sha256": "d8e090da21fd3c97fad4f541626a76435f2738d74a3150f80c07c021b1331773"
    }
  ],
  "rows": [
    [
      "old64",
      0.272308,
      0.123542
    ],
    [
      "small-only",
      0.150889,
      0.088897
    ],
    [
      "small-fast-checkpoint",
      0.124333,
      0.074684
    ],
    [
      "small-fast",
      0.095969,
      0.055123
    ],
    [
      "small-sdpa",
      0.081473,
      0.053782
    ],
    [
      "tabicl",
      0.085949,
      0.066065
    ],
    [
      "kumo",
      0.072717,
      0.05244
    ]
  ],
  "zh": {
    "title": "参数很少，训练却慢：我们如何找到 TabU 的速度瓶颈",
    "lead": "一个只有208万参数的模型，在同一台机器上，训练一步却要花参考模型三倍左右的时间。10月29日，我们追着这个反差查了下去。最后发现，参数量遮住了一个更重要的问题：模型究竟在反复处理多少东西。",
    "labels": [
      "原64／256",
      "仅缩到16／128",
      "＋缓存、检查、读出快路径",
      "＋小表关闭重算",
      "＋融合注意力",
      "TabICL v2",
      "Kumo Small"
    ],
    "sections": [
      [
        "速度开始影响我们对模型的判断",
        "TabU希望从一张表的已有观测中，形成能够用于预测的表示。我们为每一行保留多个子表示，让它们与单元格、列汇总反复交换信息。这个设计共享大量权重，参数量相当小。\n\n小参数很容易带来一种直觉：训练成本也应该低。但同机比较给出了相反的结果。在那张回归任务上，TabU完整训练一步约需0.271秒，TabICL约0.087秒，Kumo约0.073秒。分类任务也有明显差距。\n\n这影响的不只是等待时间。同样训练两小时，慢的模型会少见许多任务；最后成绩落后时，结构、训练量和课程覆盖便混在一起，很难判断究竟是哪一项出了问题。我们需要先弄清这笔计算成本花在了哪里。"
      ],
      [
        "修掉一个明显问题，差距还在",
        "第一轮排查在苹果显卡上找到了实实在在的问题。为了省内存，训练会丢掉部分中间结果，在反向传播时重新计算。第一次前向已经用上了快速实现，重算时却又回到了慢实现；一些已经算过的量也没有复用。把这些路径接好、合并零散检查后，单位映射实验版在M1的两个任务上快了约1.8～2倍。\n\n这是一项有效修复。但接下来，把TabU、TabICL和Kumo放到同一台NVIDIA GB10上，差距仍然存在。我们必须继续查CUDA路径，不能拿苹果显卡上的改善来解释另一套运行环境。\n\n新的剖析又给出一个很醒目的线索：TabU每步启动约八九千次GPU计算，远多于两个参考模型，等待GPU返回检查结果的次数也多得多。于是先做一个很小的对照——保留全部数值检查，只集中读取结果。最终只省了约4%～7%的时间。\n\n这次结果校正了我们的判断。同步多确实有成本，却解释不了两到四倍的差距。剖析图里的大数字，只能提示下一步查哪里；一个解释究竟有多大分量，还得单独改动、重新计时。"
      ],
      [
        "参数表里看不见的计算量",
        "继续往结构里看，真正值得注意的是中间状态的数量。原来的TabU为每行保留64个128维子表示。在320行的回归任务上，每层仅这一部分就有20,480个向量，后面还要继续做投影、注意力和更新。权重可以共享，这些计算仍然要逐个完成。\n\n列方向也有类似问题：每列固定维护256个汇总槽。槽的用途是用有限的汇总状态处理一批行，但这次分类任务连同Query一共才192行，固定256个槽在这里已经没有起到压缩行数的作用。\n\n这解释了“小参数”为什么没有带来“低计算量”。我们节省了需要学习的权重，却保留了相当多需要反复处理的状态。参数量和每一步的工作量，原来是两件相差很远的事。\n\n于是做了直接的结构对照：每行64个子表示减为16个，每列256个关系槽减为128个。仅这一步，回归耗时下降约45%，分类下降约28%；参数量却只从208万降到203万，减少约2.7%。这个结果让状态规模的重要性变得很具体。"
      ],
      [
        "把剩下的重复工作一项项拿掉",
        "缩小状态之后，继续处理实现中的额外开销：保存前向已经计算过的量，供反向复用；把数值检查集中到更新参数之前；省掉当前预测用不到的支路，以及只为了取得目标监督而重复做的整表编码。\n\n对于这两张小表，显存还有余量，我们也关闭了部分省内存重算，直接保存中间结果。最后，把拆开的注意力计算接入CUDA融合实现，同时保留零输入的零贡献和Presence的梯度。\n\n下面每一行TabU版本都在上一行基础上继续修改。计时包含预处理、前向、反向、检查、梯度裁剪和参数更新；每步恢复同一个起点，预热后轮换测7次。这样可以看见每一档究竟带来了多少收益。"
      ],
      [
        "这次突破，把下一步研究变得更便宜了",
        "最终，回归完整步从0.272秒降到0.081秒，分类从0.124秒降到0.054秒，吞吐约为原来的3.34倍和2.30倍。在这两张任务上，TabU略快于TabICL，已经接近Kumo。\n\n这次排查也让我们修正了研究顺序。此前对参数量的关注，掩盖了中间状态的规模；对局部算子提速的关注，也没有及时暴露整步执行中的绕路。完整训练步的剖析应该更早做，同机对照也应该更早进入日常实验。\n\n速度改善给接下来的研究提供了实际空间：相同时间可以尝试更多训练任务、更快得到一个设计的反馈。我们也有了更清楚的比较方式——既看相同任务量下学到了多少，也看相同时间内最终能学到多少。\n\n目前还不能回答的是：16个子表示和128个槽，是否足以保住原来的能力。减少重复计算与缩小表示容量，需要分别对待。这次速度结果已经成立；缩小模型后的学习收益、回归表现和旧能力保持，是接下来要回答的问题。"
      ]
    ],
    "technical_title": "测量条件、配套改动与证据",
    "technical_notes": [
      "这篇回顾记录截至本次测速阶段的进展。两张冻结任务分别为：回归256条Support＋64条Query、33列；二分类128条Support＋64条Query、17列。三家使用同一GB10和相同输入，保留各自原生预处理与损失函数。网络使用FP32，关闭TF32。结论适用于这两张任务，尚未覆盖更大、更宽表。",
      "“16／128”分别指每行子表示数与每列关系槽数，隐藏维度仍为128。共享分类码仍为64维：每个子表示输出4维，闭式系数相应改为128×4矩阵。速度对照继续使用原有mean-onehot分类头；新增共享码矩阵头另做功能验收。",
      "168项测试通过，实际CUDA矩阵读出的前后向、Null和预测一致性通过。融合路径相对小模型原执行的原始梯度相对L2差小于1.6e−4；严格逐位重放未通过，原失败及量化差异均保留。减少重算增加显存，不能据此全局关闭宽表重算。",
      "原权重、裁剪后的权重和对应Adam起点均保留。缩小结构与取旧权重子集是一个新候选，不是旧模型的严格续训。本页公开的是回顾、摘要数据和来源标识，完整运行包与权重没有随网页发布。"
    ]
  },
  "en": {
    "title": "Small weights, expensive steps: finding TabU’s training bottleneck",
    "lead": "A model with 2.08 million parameters took roughly three times as long as a reference model to train one step on the same machine. On October 29, we followed that discrepancy into the implementation—and into the amount of intermediate state our architecture was carrying.",
    "labels": [
      "Original 64 / 256",
      "Only shrink to 16 / 128",
      "+ cache, guards, readout path",
      "+ disable small-task recomputation",
      "+ fused attention",
      "TabICL v2",
      "Kumo Small"
    ],
    "sections": [
      [
        "Training cost was complicating the research",
        "TabU builds predictive representations from observed table data. Its design keeps multiple subunits for each row and repeatedly exchanges information with cells and column summaries. Much of the weight is shared, giving the model a small parameter count.\n\nThe matched timings challenged our intuition about that economy. A regression step took about 0.271 seconds for TabU, 0.087 for TabICL and 0.073 for Kumo. Classification also showed a substantial gap.\n\nThis cost affected interpretation as well as convenience. Under an equal time budget, the slower model sees fewer tasks. Architecture, training exposure and curriculum coverage then become entangled in the final score. We needed to understand what each step was spending its time on."
      ],
      [
        "One real fix did not explain the whole gap",
        "Our first investigation found a concrete problem on Apple GPUs. Activation checkpointing discards intermediate results to save memory and recomputes them during backward. The initial forward used a fast implementation, but recomputation returned to a slow one. Some previously computed quantities were also calculated again. Fixing these paths and batching checks made two M1 steps of the identity-presence variant roughly 1.8–2 times faster.\n\nThat improvement did not transfer automatically to NVIDIA. When we put all three models on the same GB10, TabU remained substantially slower. We had to inspect the CUDA execution separately.\n\nThe next profile showed roughly eight to nine thousand GPU kernel launches per TabU step, along with many synchronizations. We tested one explanation directly: retain all finite-value checks, but collect their results together. It saved only about 4–7%.\n\nFrequent synchronization was a real cost, but it could not explain the full gap. A striking number in a profile points to an experiment; it does not tell us how much time a change will recover."
      ],
      [
        "The work hidden by the parameter count",
        "The intermediate states were much larger than the weights suggested. Each row carried 64 subunits of width 128. On the 320-row regression task, that alone meant 20,480 vectors per layer, each participating in projections, attention and updates. Shared weights did not eliminate those repeated applications.\n\nEach column also maintained 256 summary slots. Those slots can compress a large collection of rows, but the classification task contained only 192 rows including Query. Here, a fixed set of 256 slots did not compress the row count.\n\nWe had economized on learned weights while retaining a large amount of state to process. That distinction suggested a direct comparison: reduce row subunits from 64 to 16 and relation slots from 256 to 128.\n\nThat change alone cut regression time by about 45% and classification time by 28%. Parameter count fell by only 2.7%, from 2.08 million to 2.03 million. The result made the importance of intermediate-state size tangible."
      ],
      [
        "Removing the remaining extra work",
        "With smaller states, we continued reducing execution overhead. Forward intermediates were reused in backward. Finite checks were collected before parameter updates. We removed branches unused by the current prediction and avoided encoding the whole table twice just to obtain target supervision.\n\nThe two small tasks also had enough memory to retain intermediates rather than recompute them. Finally, we moved attention onto a fused CUDA implementation while preserving zero-source contributions and the learned Presence gradient.\n\nEach TabU row below adds a change to the row above. Timing covers preprocessing, forward and backward, checks, gradient clipping and the optimizer update. Every step restores the same starting state; seven rotated measurements follow warmup."
      ],
      [
        "A cheaper next round of research",
        "The final regression step fell from 0.272 to 0.081 seconds; classification fell from 0.124 to 0.054. Throughput increased by about 3.34× and 2.30×. On these tasks, TabU became slightly faster than TabICL and approached Kumo.\n\nThe investigation also corrected our priorities. Attention to parameter count had obscured the size of intermediate state. Attention to individual fast operators had left detours in the complete step undiscovered. Whole-step profiling and matched-host comparisons should have entered our research earlier.\n\nThe practical gain is room for more learning experiments: more tasks within the same time, and quicker feedback on a design. We can now ask separately how much a model learns from equal task exposure and how well it performs after equal training time.\n\nWe still need to establish whether 16 subunits and 128 slots retain enough capacity. Removing redundant computation and reducing representation size have different implications. The speed result is established for these tasks; learning gains, regression performance and retention after shrinking remain the next questions."
      ]
    ],
    "technical_title": "Measurement details and supporting evidence",
    "technical_notes": [
      "This retrospective ends at the timing stage. Regression used 256 Support and 64 Query rows with 33 columns; binary classification used 128 Support and 64 Query rows with 17 columns. All systems used the same GB10 and inputs, retaining native preprocessing and losses. The network used FP32 with TF32 disabled. Larger and wider tables were not covered.",
      "The 16/128 configuration changes row subunits and relation slots; hidden width stays 128. A 128×4 coefficient matrix lets 16 subunits reconstruct the unchanged 64-dimensional shared category code. Timing retained the existing mean-onehot head; the shared-code matrix head was qualified separately.",
      "The final suite passed 168 tests. CUDA matrix-head forward/backward, Null and prediction checks passed. Fused raw-gradient relative L2 differences were below 1.6e−4 against the small reference. Strict bitwise replay failed; failures and measured differences are retained. Less recomputation uses more memory and is not a universal wide-table setting.",
      "The original weights, sliced candidate and corresponding Adam state are preserved. Shrinking and taking a weight subset creates a new candidate, not strict continuation. This page publishes a retrospective, summary data and source identities, not the complete run bundle or model weights."
    ]
  },
  "editorial_revision": "2026-10-30-v2",
  "table_after_section": 3
}
