← 回到 Reading
ByteByteGo 2026-08-18

The New American AI Model Designed to be Customized

本節說明理解 language model architecture 必備的四個基礎概念:tokens、parameters、training 與 layers。Tokens 是模型處理的細粒度文字塊(granular text chunks),而 parameters 則是訓練過程中迭代微調的內部數值。Training 透過大量文字上的 next-token prediction、gradients 與 backpropagation 來最佳化這些 parameters。最後,輸入會依序通過疊加的 layers——例如 Inkling 模型中的 66 個 layers——其中每個 layer 都會先執行一個 attention 步驟,接著執行一個 feed-forward 步驟。Inkling 採用 Mixture of Experts (MoE) 架構,將儲存模型的成本與運行模型的成本解耦。Inkling 遵循 DeepSeek 發表的方法,並非讓 tokens 通過每一個 feed-forward network,而是為每個 token 從 256 個 experts 中選出 6 個。在整個 975-billion-parameter 模型中,處理單一 token 時只有約 41 billion 個 parameters(約 4%)處於 active 狀態。Full-precision 的 checkpoint 需要在像 NVIDIA B300 或 H200 GPUs 這類專用硬體上配置至少 2 TB 的 GPU memory,而 quantized checkpoint 則將記憶體需求降低至四張 B300 卡上約 600 GB。在 Mixture of Experts 架構中,routers 會對候選 experts 進行評分,以選出處理每個 token 的 top subset,但訓練過程中的正向回饋迴圈(positive feedback loops)可能會導致 routing collapse,使得只有少數幾個 experts 被利用。傳統的 auxiliary balance loss 懲罰項會產生與主要預測任務衝突的 gradients,進而降低輸出品質。Thinking Machines 採用由 Wang 等人最初提出並由 DeepSeek 採用的方法解決了這個問題,該方法使用由 token counts 更新且不經 backpropagation 的 bias values 來調整 expert 選擇評分。這能在不影響 gradient updates 的情況下保持 expert load balanced,同時還有額外的兩個 shared experts 與這六個 routed experts 並行無條件運作。

閱讀原文 ↗
目錄 10 段
  1. 01Groundwork
  2. 02Sparsity
  3. 03Routing
  4. 04Attention
  5. 05Position
  6. 06Convolutions
  7. 07Multimodality
  8. 08Effort
  9. 09Tradeoffs
  10. 10結論

Groundwork

本節說明理解 language model architecture 必備的四個基礎概念:tokens、parameters、training 與 layers。Tokens 是模型處理的細粒度文字塊(granular text chunks),而 parameters 則是訓練過程中迭代微調的內部數值。Training 透過大量文字上的 next-token prediction、gradients 與 backpropagation 來最佳化這些 parameters。最後,輸入會依序通過疊加的 layers——例如 Inkling 模型中的 66 個 layers——其中每個 layer 都會執行一個 attention 步驟,接著執行一個 feed-forward 步驟。

  • Token 是文字區塊,通常小於句子,且往往小於單字,罕見字詞會被拆分成多個 token。
  • Parameter 是個別學習得來的數值,一開始為隨機雜訊,並在 training 期間更新數百萬次。
  • Training 會依據 next-token prediction 的誤差,利用透過 backpropagation 同時計算出的 gradient 來調整 parameter。
  • Layer 是循序處理的階段,其中每個 layer 都包含一個 attention 步驟與一個 feed-forward 步驟。
  • Inkling 模型包含 66 個 stacked layers,token representations 會循序通過這些 layer。

Sparsity

Inkling 採用 Mixture of Experts (MoE) 架構,將儲存模型的成本與執行模型的成本解耦。Inkling 並非讓 token 通過每個 feed-forward network,而是依循 DeepSeek 發表的方法,針對每個 token 從 256 個 experts 中選出 6 個。在整個 975-billion-parameter 模型中,處理單一 token 時只有約 41 billion 個 parameter(約 4%)處於 active 狀態。Full-precision checkpoint 需要在 NVIDIA B300 或 H200 GPU 等專用硬體上具備至少 2 TB 的 GPU memory,而 quantized checkpoint 則可將 memory 需求降低至四張 B300 卡約 600 GB。

  • Inkling 將每個 layer 的標準單一 feed-forward network 替換為 256 個 experts,每個 token 僅執行六個。
  • Inkling 總共包含 975 billion 個 parameter,但每個 token 僅活化約 41 billion 個 parameter(~4%)。
  • Thinking Machines 實作 Inkling 的 Mixture of Experts 設計時,主要基於 DeepSeek 發表的方法。
  • Inkling 的 full-precision checkpoint 需要至少 2 TB 的合併 GPU memory,可在 8 張 NVIDIA B300 卡或 16 張 NVIDIA H200 卡上執行。
  • Inkling 的 quantized checkpoint 版本需要約 600 GB 的 memory,可放入四張 NVIDIA B300 卡中。

Routing

在 Mixture of Experts 架構中,router 會對候選 experts 進行評分,以選出 top subset 來處理每個 token,但 training 期間的正回饋循環可能會導致 routing collapse,也就是只有少數幾個 experts 被使用。傳統的 auxiliary balance loss 懲罰會產生與主要 prediction 任務衝突的 gradient,進而降低輸出品質。Thinking Machines 透過採用 Wang 等人最初提出並由 DeepSeek 使用的方法解決了這個問題,該方法使用依 token 計數更新且不經過 backpropagation 的 bias 值來調整 expert selection 分數。這樣可以在不影響 gradient 更新的情況下維持 expert load balanced,同時還有兩個額外的 shared experts 與六個 routed experts 一起無條件執行。

  • Inkling 的 router 使用 sigmoid 函數對 256 個 experts 進行評分,並為每個 token 挑選 top six 來執行。
  • 未受約束的 expert selection 可能會導致 routing collapse,其中極少數 experts 主導了運算,而其餘 experts 則維持未充分訓練狀態。
  • 傳統的 load-balancing 懲罰會產生與 next-token prediction 目標競爭的 gradient,通常會降低文字品質。
  • Thinking Machines 與 DeepSeek 採用了 Wang 等人提出的一項技術,將外部 bias 套用至 expert selection 分數,而不會影響 output weighting 或 backpropagation。
  • 每個 token 都由總共八個 experts 處理:六個 routed experts 和兩個 shared experts,其分數會一起進行 normalization。

Attention

標準 attention 運算會隨 sequence length 呈平方級增長,這使得在 66 個 layers 上建立 one-million-token context window 的運算成本高到令人卻步。為了解決這個問題,Inkling 以 5:1 的比例交替使用 sliding-window attention layers 與 full-attention layers,包含 55 個 sliding-window layers 與 11 個 full-attention layers。Long-range 資訊會流經 full-attention layers,而 sliding-window layers 則以較低的運算成本處理 local context。Inkling 還利用八個 key-value heads 來降低 generation 期間的 memory overhead。

  • 標準 attention 比較的複雜度會隨 sequence length 呈平方級增長,一百萬個 token 在每個 layer 的比較次數約達到一兆次。
  • Inkling 在總共 66 個 layers 中支援一百萬個 token 的 context window。
  • 根據 vLLM 專案筆記,Inkling 以 5:1 的比例交替配置 sliding-window layers 與 full-attention layers,由 55 個 sliding-window layers 與 11 個 full-attention layers 組成。
  • Long-range dependencies 會透過等間距放置(例如第 6、12 和 18 層)的 11 個 full-attention layers 進行傳遞。
  • Inkling 採用 8 個 key-value heads,以減少文字生成期間的記憶體消耗。

Position

Attention mechanisms 本身缺乏 sequence order 資訊,因此需要如 Rotary Position Embedding (RoPE) 這類 positional representation 方法。然而,當 context lengths 遠遠超出訓練時所見的長度時,RoPE 在外推(extrapolate)上可能會遇到困難,因為新的旋轉角度落在了模型已學習的範圍之外。為了解決長序列的此問題,Thinking Machines 在 Inkling 模型中採用了 Shaw et al. 風格的早期 relative positional encoding 機制。此方法將基於距離學習到的 bias 值直接加到 attention scores 上,並對超過特定 cutoff 的距離進行 clamp,從而避免了外推未見過數值的需求。

  • Attention 中 query 與 key 的比較不包含內建的順序資訊,因此需要顯式的 positional encoding。
  • Rotary Position Embedding (RoPE) 的運作方式是依據 sequence position 等比例旋轉 query 與 key 的角度,但在外推至超出訓練 context windows 時可能會失效。
  • Inkling 模型採用了受 Shaw 等人啟發的 relative position 機制,而非現代標準的 RoPE。
  • 此 relative positioning 方法會將對應於 token 距離的學習數值直接加至 attention scores 中,並將所有超過固定 cutoff 的距離映射至單一共享參數。
  • Thinking Machines 觀察到,此 relative 機制不僅表現更佳,且比 RoPE 能更有效地外推至更長的 contexts。

Convolutions

Inkling 整合了滑動窗口為 4 個 token 的 localized convolution 操作,以處理局部 sequence mixing。由於標準的 attention mechanisms 對相鄰 token 沒有內建的 bias,convolution 能透過已學習的權重在結構上提供這種 local context。Thinking Machines 將這些 convolutions 插入到 attention layers 內部的 key 與 value 上,以及在 attention 與 feed-forward 輸出重新匯入主 residual path 之前。這讓 attention 能保留其學習容量給複雜的 dependencies,而非基礎的 local proximity。

  • Inkling 使用窗口大小為 4 個位置的 convolution,透過已學習的權重將一個 token 與其前 3 個相鄰 token 進行 mixing。
  • Convolutions 提供了結構性的 local mixing,而無需依賴 attention 去學習相鄰 token 之間的關聯。
  • Thinking Machines 在每個 attention layer 內部的 key 與 value 上配置了 convolutions。
  • 在重新匯入主模型流(main model stream)之前,convolutions 會被應用於 attention 與 feed-forward blocks 的輸出。
  • 使用 convolutions 預先混合鄰近 context,能釋放 attention 的容量,讓其專注於真正需要學習的 dependencies。

Multimodality

Inkling 直接處理影像與音訊,無需依賴個別預訓練的 encoder networks。音訊以 mel spectrograms 表示,並透過無需預訓練的 dMel 方法進行量化。影像被劃分為 40x40 像素的 patches,並透過四階段的 hMLP stem 獨立處理,compute overhead 極低。兩種模態都通過輕量級的 conversion layer,並與 text tokens 一起合併為單一序列,所有的 multimodal 組件均與 base model 一同從頭訓練(trained from scratch)。

  • Inkling 捨棄了個別預訓練的 vision 與 audio encoders,轉而採用從頭訓練(trained from scratch)的 end-to-end 架構。
  • 音訊處理採用 dMel 方法將 mel spectrogram 響度值四捨五入至固定層級,無需事先訓練。
  • 影像被分割為 40x40 像素的 patches 並輸入至 hMLP stem,增加的 compute overhead 不到 1%。
  • Multimodal 輸入通過輕量級的 conversion layer,以加入貫穿該模型 66 個 layers 的 text tokens。
  • Thinking Machines 在推出 Inkling 的兩個月前,就已首次在即時互動系統中實作了這種 multimodal 方法。

Effort

Thinking Machines 引入了介於 0 到 1 之間的可調式 effort 設定,以控制 Inkling 模型在回答前的推理(reasoning)時長。這項行為並非強制設定嚴格的 token budget,而是透過 reinforcement learning、根據 effort prompt 動態調整 token-cost penalties 來訓練 Inkling。在機制上,effort level 會在對話開始前作為 system message 插入,獨立於 maximum token limit。在 Terminal Bench 2.1 程式編碼 benchmark 上,Inkling 僅使用約三分之一的 token 就達到了與 NVIDIA Nemotron 3 Ultra 相同的效能。

  • Effort 被參數化為介於 0 到 1 之間的值,文件中記錄的 presets 包括 0、0.1、0.2、0.7、0.9(預設)與 0.99。
  • effort level 是在對話開始前,以初始 system message 的方式制式傳入。
  • effort response 是透過 reinforcement learning 進行訓練,方法是針對不同的 effort labels 調整對應的 per-token penalty costs。
  • Effort 獨立於 maximum token limit 運作,並鼓勵進行更長的 reasoning,但不對長度或品質提供 hard guarantees。
  • 在 Terminal Bench 2.1 上,Inkling 達到了與 NVIDIA 的 Nemotron 3 Ultra 相當的分數,同時生成的 token 數僅約為其三分之一。

Tradeoffs

Inkling 背後的架構選擇涉及在運算效率、硬體需求與模型行為之間的明確 trade-offs。Sparse routing 與 mostly-local attention 降低了 per-token compute costs 並實現了大型 context windows,但它們也帶來了高 memory footprints 與受限的 layer context。此外,採用 relative position encoding 破壞了與主流基於 RoPE 的 serving infrastructure 的相容性。儘管 Thinking Machines 承認其他模型在 baseline strength 上超越了 Inkling,但 Inkling 透過首日提供的 quantized checkpoints,針對直接適應與 fine-tuning 進行了最佳化。

  • Sparse routing 降低了 per-token 的 inference cost,但由於必須載入完整模型,因此最低 memory footprint 依然居高不下。
  • Mostly-local attention 實現了 100 萬 token 的 context window,代價是大多數層只能獲得受限的 sequence perspective。
  • 採用 relative position encoding 解決了 extrapolation 問題,但需要在針對 RoPE 配置的 serving frameworks 中額外開發支援。
  • 雖然提供了 open weights,但未附帶 training datasets、程式碼或確切的 training recipes,限制了審查與完全可重現性(reproducibility)。
  • Thinking Machines 建議在面向消費者的部署中採用外部 moderation tools,而非依賴模型內建的 refusals 機制。
  • Inkling 透過初期的 fine-tuning 支援與 quantized checkpoints,特別鎖定可客製化的企業級應用場景。

結論

Inkling 的架構將總參數儲存與 per-token compute 分離,儲存了 9750 億個參數,同時僅運行約 410 億個 active parameters。該模型透過在選擇時引入 selection bias、但在 output weighting 中將其排除來平衡 expert routing,避免了衝突的 training objectives。其 long-context 設計採用了 55 個 sliding-window layers 以及 11 個 full-attention layers,並搭配 relative position representations。此外,reasoning effort 被設計為一種可訓練的設定,使 benchmark evaluations 能夠在可調整的效能曲線上運作。

  • Inkling 儲存了 9750 億個總參數,同時每個 token 僅活化約 410 億個參數。
  • Expert load balancing 在 selection 階段引入 bias,但在 output weighting 階段將其排除,以避免 auxiliary training 的衝突。
  • 該模型使用 55 個 sliding-window layers 以及 11 個 full-attention layers 來處理 long contexts,以進行長距離的資訊傳遞(propagation)。
  • Relative position encoding 讓距離遙遠的 token 能夠依賴頻繁觀察到的距離數值。
  • Reasoning effort 可配置為一種經過訓練的設定,能產生可變的 benchmark 曲線而非固定分數。