Parcae透過穩定循環架構實現參數效率提升,達到兩倍Transformer品質
Parcae透過穩定循環架構實現參數效率提升,達到兩倍Transformer品質。
Parcae是新型穩定循環語言模型,透過層循環增加FLOPs而不擴大參數,解決傳統Transformer在邊緣裝置上記憶體開銷暴增的問題。研究發現,在固定參數預算下,同步增加循環次數與資料量,能遵循可預測的權重定律,達成優於兩倍大小Transformer的效能。
傳統擴展限制
傳統固定深度架構透過增加參數或資料擴展FLOPs以提升品質,但這導致記憶體佔用增加,尤其在模型移至邊緣裝置、推論成本飆升時問題嚴重。作者質疑:能否不膨脹記憶體足跡即擴展品質?
循環架構不穩定問題
循環架構透過多次將激活傳遞相同層塊來增加運算,具潛力但訓練極不穩定,常見殘差爆炸與損失尖峰。作者將循環重構為殘差流的非線性時變動態系統,捨棄非線性項(如Attention與MLP貢獻)後,轉為離散線性時不變(LTI)系統,其穩定性由A矩陣特徵值決定:光譜範數須小於1,否則不穩定。
實證顯示,不穩定訓練的特徵半徑≥1,穩定者<1,此線性近似捕捉主要不穩定來源。
Parcae穩定設計
Parcae明確參數化注入參數,滿足LTI穩定條件:使用連續公式並以ZOH與Euler離散化,確保光譜半徑<1。結果:
- 對超參數選擇顯著更穩健,訓練簡易且可擴展。
- 優於參數與資料匹配的先前循環Transformer,驗證困惑度降低6.3%。
- 優於強大Transformer基線,770M Parcae匹配1.3B Transformer品質,達兩倍大小模型水準。
此外,需少量小技巧確保乾淨訓練,詳見論文。
訓練擴展定律
在固定參數與FLOP預算下,作者交易訓練中平均循環次數(mean recurrence)與資料:增加循環即比例減少token,維持FLOP固定。發現:
- 增加平均循環並減少token,驗證損失低於低循環多資料。
- 拋物線擬合提取各FLOP等級最佳循環與token預算,均遵循權重定律,指数一致。
相較固定深度Parcae,使用最佳循環預測的循環Parcae形成更嚴格Pareto邊界,驗證損失更低,下游品質更好。初始擴展定律建議:在固定FLOP下,循環與資料同步增加。
測試時擴展
測試時,Parcae透過循環擴展運算,遵循可預測飽和指數衰減。
效能比較與基準
擴展至1.3B參數,Parcae在固定參數與資料預算下,CORE與Core-Extended品質提升2.99與1.18點,相對品質達兩倍Transformer的87.5%。770M Parcae幾乎等同1.3B Transformer下游品質。
使用FineWeb-Edu資料訓練,nanochat啟發設定下,Parcae優於所有匹配基線。
開源資源與模型
作者釋出訓練程式碼與模型,加速參數重用探索:
- GitHub:https://github.com/sandyresearch/parcae/
- HuggingFace:https://huggingface.co/collections/SandyResearch/parcae
- 論文:https://arxiv.org/abs/2604.12946
- 部落格:https://sandyresearch.github.io/parcae/
預訓練模型(FineWeb-Edu訓練,無下游微調):
| 模型 | 參數 | Prelude | Core | Coda | 模型維度 | 循環次數 |
|---|---|---|---|---|---|---|
| Parcae-140M | 140M | 2 | 2 | 2 | 768 | 8 |
| Parcae-370M | 370M | 4 | 4 | 4 | 1024 | 8 |
| Parcae-770M | 770M | 6 | 6 | 6 | 1280 | 8 |
| Parcae-1.3B | 1.3B | 8 | 8 | 8 | 1536 | 8 |
使用指南
PyPI套件簡易載入:pip install parcae-lm,如parcae_lm.from_pretrained("SandyResearch/parcae-140m")。
訓練配置(YAML於launch_configs/):
- parcae-small-140m.yaml (Parcae 140M)
- parcae-medium-370m.yaml (Parcae 370M)
- parcae-large-770m.yaml (Parcae 770M)
- parcae-xlarge-1_3b.yaml (Parcae 1.3B)
- 對應GPT基線
單節點:bash runs/run_training.sh launch_configs/parcae-small-140m.yaml parcae-small 8。
多節點(Slurm):CONFIG=launch_configs/parcae-large-770m.yaml sbatch launch_job.slurm。
評估:python scripts/eval.py --hf_repo SandyResearch/parcae-140m --eval_tasks core(支援CORE、Core-Extended、BPB、LAMBADA)。
資料下載:FineWeb-Edu 100B/350B token、Huginn;tokenizer訓練與評估腳本齊全。
重現擴展定律:runs/sweep_recurrence.sh與runs/sweep_flops.sh。
架構細節
Parcae分三塊:Prelude(P)轉換輸入為潛在狀態e;Recurrent(R)迭代更新隱藏狀態ht,T次循環中注入e(加法或串接投影);Coda(C)處理最終hT輸出。命名致敬羅馬命運三女神:Nona(P)、Decima(R)、Morta(C)。
基於karpathy/nanochat、seal-rg/recurrent-pretraining、Lightning-AI/litgpt,Docker鏡像ghcr.io/sandyresearch/parcae。
未來展望
作者興奮於參數效率極限,推論記憶體成本上升下,層循環等重用方法大有可為。合作@togethercompute、@zacknovack、@BergKirkpatrick、@realDanFu,歡迎聯繫[email protected]探討後續。
此研究於2026年4月14日發表,首度為循環模型建立穩定訓練與擴展定律,為記憶體受限裝置開啟高效邊界。
We’ve been thinking a lot about scaling laws, wondering if there is a more effective way to scale FLOPs without increasing parameters.
— Hayden Prairie (@hayden_prairie) April 15, 2026
Turns out the answer is YES – by looping blocks of layers during training. We find that predictable scaling laws exist for layer looping,… pic.twitter.com/1lOjmy6IWx
Full Paper: https://t.co/LWYIMOCvAA
— Hayden Prairie (@hayden_prairie) April 15, 2026
Blog: https://t.co/uPMt8Lam0E
Traditional scaling laws tell us that to achieve the best performance, we need to scale FLOPs, often with more parameters or data. But as models move to the edge and inference costs skyrocket, we have been interested in a way to scale quality without inflating the memory… pic.twitter.com/CuyUkyo66b
— Hayden Prairie (@hayden_prairie) April 15, 2026
While instability can be hard to reason about, we observed that a simple linear framework captured a significant source. Specifically, we recast looping as a nonlinear time variant dynamical system over the residual. By dropping the nonlinear term (e.g., contribution from… pic.twitter.com/72ys973B6P
— Hayden Prairie (@hayden_prairie) April 15, 2026
Our new looped architecture, Parcae, fixes these issues by explicitly parameterizing the injection parameters to upload the LTI stability conditions. The results: (1) Parcae is significantly more robust to hyperparameter selection, making them simple to train and scale up; (2)…
— Hayden Prairie (@hayden_prairie) April 15, 2026
Alright, but our main goal is to see if we can use looping to scale more efficiently without increasing parameters. To study this, we explore a setting where, under a fixed parameter count and FLOP budget, we trade off mean recurrence in training with data (e.g., if we increase… pic.twitter.com/yLMOZNqlc5
— Hayden Prairie (@hayden_prairie) April 15, 2026
We are super excited about how far we can push parameter efficiency! With the growing costs of memory overhead during inference, we think there is a lot to explore in parameter reuse methods such as layer looping. To help accelerate this process, we are releasing training code…
— Hayden Prairie (@hayden_prairie) April 15, 2026
