[{"data":1,"prerenderedAt":3186},["ShallowReactive",2],{"site-info":3,"post-tideway-one-memory-pool":99,"related-zh-TW-tideway-one-memory-pool":1735},{"id":4,"company":5,"extension":16,"meta":17,"services":18,"social":96,"stem":97,"__hash__":98},"site\u002Fsite.yml",{"name":6,"nameEn":7,"email":8,"address":9,"addressEn":10,"lineUrl":11,"lineId":12,"duns":13,"youtube":14,"youtubeId":15},"銡策數位有限公司","Jecision Digital Co., Ltd.","contact@jecision.com","231 新北市新店區北新路二段 262 號 3 樓之 3","3F.-3, No. 262, Sec. 2, Beixin Rd., Xindian Dist., New Taipei City 231, Taiwan","https:\u002F\u002Fline.me\u002FR\u002Fti\u002Fp\u002F@374qnumi","@374qnumi","963905705","https:\u002F\u002Fwww.youtube.com\u002Fshorts\u002F6UE0WTmyjsg","6UE0WTmyjsg","yml",{},[19,43,69],{"key":20,"zh":21,"en":32},"audit",{"title":22,"tagline":23,"summary":24,"points":25,"deliverable":29,"detail":30,"duration":31},"企業 AI 導入健檢","先看清楚，再花錢","60 分鐘線上訪談，盤點最耗時、最依賴人力的營運環節；我們會告訴你哪些工作現在就能交給 AI、哪些還不成熟。",[26,27,28],"現況盤點：梳理日常營運中最耗時、最依賴人力的環節","痛點診斷：判斷哪些工作現在就能交給 AI，哪些建議先保留人力","可行性評估：依你的業務特性與預算，篩選適合的模型與工具","《企業 AI 導入建議報告書》（PDF）","含 1–2 個「開發成本最低、成效最明顯」的優先項目、技術棧建議、預期節省的人力時間與下一步","訪談 60 分鐘，報告書 3 個工作天內交付",{"title":33,"tagline":34,"summary":35,"points":36,"deliverable":40,"detail":41,"duration":42},"AI Readiness Audit","Look before you spend","A 60-minute remote audit of the workflows that eat the most time and people-power — and an honest answer on what AI can take over today, and what it cannot.",[37,38,39],"Audit the daily workflows that consume the most time and headcount","Triage which tasks AI can own today, and which should stay human","Shortlist the models and tools that fit your budget and constraints","AI Adoption Recommendation Report (PDF)","One or two highest-ROI entry points, a recommended tech stack, expected hours saved, and the concrete next step","60-minute call, report delivered within 3 business days",{"key":44,"zh":45,"en":56},"prompt",{"title":46,"tagline":47,"summary":48,"points":49,"deliverable":53,"detail":54,"duration":55},"提示詞工程","讓 AI 穩定產出，而不是碰運氣","針對你的實際任務設計提示詞與多步驟工作流，並做極限測試，確保換了資料、換了人操作也不會走鐘。",[50,51,52],"客製提示詞：ChatGPT、Claude、Gemini、Midjourney 等主流工具的專屬模板","除錯與優化：修掉幻覺、格式跑掉、時好時壞的問題","工作流建置：把複雜任務拆成多步驟提示詞與可重複的 SOP","提示詞文件或設定檔","附使用說明與範例，並提供 1 對 1 教學，確保你與團隊能自己維護","依任務複雜度報價，通常 3–7 個工作天",{"title":57,"tagline":58,"summary":59,"points":60,"deliverable":66,"detail":67,"duration":68},"Prompt Engineering","Make AI produce reliably, not by luck","Prompt sets and multi-step workflows designed for your actual tasks, stress-tested so they keep working when the data or the operator changes.",[61,62,64],"Custom prompts for ChatGPT, Claude, Gemini, Midjourney and friends",{"Debugging and tuning":63},"kill hallucinations, broken formats and flaky output",{"Workflow design":65},"break complex work into repeatable multi-step SOPs","Prompt library or exportable config","Ships with usage notes and examples, plus a 1:1 walkthrough so your team can maintain it","Quoted by complexity, typically 3–7 business days",{"key":70,"zh":71,"en":82},"poc",{"title":72,"tagline":73,"summary":74,"points":75,"deliverable":79,"detail":80,"duration":81},"極速 PoC","五天，看到能跑的東西","不談架構藍圖，直接做一個能動的雛形。五個工作天內交付線上可操作的智能體，用你真實的資料驗證。",[76,77,78],"Day 1：15 分鐘對焦，鎖定單一痛點與資料盤點","Day 2–4：模型串接、邏輯設計與雛形開發","Day 5：Demo 展示與 AI 擴展建議書","可線上操作的智能體雛形","交付範圍為概念驗證與展示，不含後續維運或大規模伺服器部署；要進階成完整系統會另行報價","5 個工作天",{"title":83,"tagline":84,"summary":85,"points":86,"deliverable":93,"detail":94,"duration":95},"Rapid PoC","Five days to something that runs","No architecture decks — a working prototype built in five business days, validated against your real data.",[87,89,91],{"Day 1":88},"15-minute scoping call, one pain point, data inventory",{"Day 2–4":90},"model integration, logic design, prototype build",{"Day 5":92},"live demo plus an AI expansion recommendation","A runnable online agent prototype","Proof of concept and demo scope only; ongoing operations and large-scale deployment are quoted separately","5 business days",[],"site","XTwARfVAOcrXNiKehsM6V6cdkd2HXy4d5yZVrSWrI3Q",{"zh":100,"en":955},{"id":101,"title":102,"author":103,"body":104,"cover":934,"coverAlt":935,"date":936,"description":937,"draft":938,"extension":939,"featured":938,"lang":940,"meta":941,"navigation":942,"ogImage":943,"path":944,"seo":945,"slug":946,"stem":947,"tags":948,"translationKey":946,"updated":953,"__hash__":954},"blog\u002Fblog\u002Fzh-TW\u002Ftideway-one-memory-pool.md","你不需要 512 GB 記憶體，你需要更好的記憶體管理","Jecision",{"type":105,"value":106,"toc":922},"minimark",[107,130,133,141,144,147,150,153,156,161,168,171,189,196,277,280,283,286,290,293,365,368,376,379,385,389,392,395,398,404,407,416,419,426,430,433,443,503,506,509,512,519,537,543,546,549,553,559,565,571,577,583,587,594,601,604,666,669,742,745,748,751,754,758,761,831,834,841,844,847,850,871,874,894,911,919],[108,109,110,114],"blockquote",{},[111,112,113],"p",{},"這篇沒有我們的實測。數據來自 arXiv 2611.14848〈Tideway〉（Duke University，2026-11-10）與作者開源的程式碼：這是 preprint，我們沒有找到獨立複現；四套對照組裡有兩套是作者在別的引擎上重現機制，不是原系統。文中的倍數與表格，凡是我們自己算的都會標出來。",[111,115,116,117,124,125],{},"論文：",[118,119,123],"a",{"href":120,"rel":121},"https:\u002F\u002Farxiv.org\u002Fabs\u002F2611.14848",[122],"nofollow","arXiv 2611.14848","｜程式碼：",[118,126,129],{"href":127,"rel":128},"https:\u002F\u002Fgithub.com\u002FAfterglow231\u002FTideway",[122],"Afterglow231\u002FTideway",[111,131,132],{},"一台 64 GiB 記憶體、32 GB 顯示記憶體的機器，正在讀一段 32K 的 prompt。",[111,134,135,136,140],{},"它的 RAM 裝得下 44% 的專家權重，但 prefill 跑完，有 ",[137,138,139],"strong",{},"86–99%"," 的專家流量是從 SSD 讀進來的。",[111,142,143],{},"這篇拆的就是這 86% 怎麼來的——為什麼同樣的記憶體，換一種管理方式能快 1.97 倍，以及你的機器該不該為它多買記憶體。",[111,145,146],{},"名詞先對齊。MoE（混合專家）把每層的 FFN 切成很多個「專家」，每個 token 只啟動少數幾個。prefill 是讀 prompt 的階段，decode 是逐個產生 token 的階段，TPOT 是每個輸出 token 的平均時間，KV cache 是對話越長越大的注意力快取。",[111,148,149],{},"剛剛那 44% 幾乎沒派上用場。而且不是哪個引擎寫壞了——四個對照組（FreeToken、llama.cpp、FlashMoE、SSD-LLaMA）都掉進同一個坑。",[111,151,152],{},"問題不在模型太大，在它們把記憶體當成三層各自獨立的快取：VRAM 快取 RAM、RAM 快取 SSD；三個階層各自決定踢誰——多數是 LRU（最久沒用的先踢），FlashMoE 用學出來的替換策略；llama.cpp 則把決定權交給作業系統的 mmap（粒度是分頁，碰到 SSD 就 thrash）。",[111,154,155],{},"先從帳單開始。",[157,158,160],"h2",{"id":159},"先看帳單512-gib-記憶體要四萬美元","先看帳單：512 GiB 記憶體要四萬美元",[111,162,163,164,167],{},"論文裡最大的那顆模型是 DeepSeek-V4-Flash。",[137,165,166],{},"檔案用 FP4 存，還是 155 GiB","。",[111,169,170],{},"先看市面上的機器長什麼樣。論文引了四份 2026 年的資料：預裝機報價、3DMark 提交、跑 BOINC 的主機、Steam 硬體調查。結論一致：",[172,173,174,181,186],"ul",{},[175,176,177,180],"li",{},[137,178,179],{},"16–64 GiB 是主流","：涵蓋三組 RTX 5090 族群的 64–84%、Steam 機器的 99%",[175,182,183],{},[137,184,185],{},"超過 128 GiB 的，任何一組都至多 11%",[175,187,188],{},"買得起最貴消費級顯卡的人，記憶體也停在 64 GiB",[111,190,191,192,195],{},"價格是另一回事。論文畫了一張預裝機報價圖：128 GiB 以內低於 $10k，然後斷崖——",[137,193,194],{},"256 GiB 約 $26k，512 GiB 約 $41k","（512 GiB 就是市面上俗稱的 512 GB）。",[197,198,199,218],"table",{},[200,201,202],"thead",{},[203,204,205,209,212,215],"tr",{},[206,207,208],"th",{},"記憶體",[206,210,211],{},"覆蓋率",[206,213,214],{},"預裝機約價",[206,216,217],{},"裝得下 155 GiB 的權重嗎",[219,220,221,236,249,263],"tbody",{},[203,222,223,227,230,233],{},[224,225,226],"td",{},"16–64 GiB",[224,228,229],{},"RTX 5090 族群 64–84%、Steam 99%",[224,231,232],{},"低於 $10k",[224,234,235],{},"不行",[203,237,238,241,244,246],{},[224,239,240],{},"128 GiB",[224,242,243],{},"論文未給",[224,245,232],{},[224,247,248],{},"不行，權重就多 27 GiB",[203,250,251,254,257,260],{},[224,252,253],{},"256 GiB",[224,255,256],{},">128 GiB 合計至多 11%",[224,258,259],{},"約 $26k",[224,261,262],{},"可以，KV cache 另計",[203,264,265,268,271,274],{},[224,266,267],{},"512 GiB",[224,269,270],{},"同上",[224,272,273],{},"約 $41k",[224,275,276],{},"可以",[111,278,279],{},"（覆蓋率與價格來自論文：16–64 GiB 涵蓋 RTX 5090 族群的 64–84% 與 Steam 的 99%，超過 128 GiB 的至多 11%；論文沒有單獨給 128／256／512 GiB 的比例。「27 GiB」是 155 − 128 的算術。）",[111,281,282],{},"「買更多記憶體」不是一個選項，是兩倍到四倍價格的機器。而且就算真的買到 256 GiB，155 GiB 的權重佔掉六成（155 ÷ 256，我們的算術），剩下的 101 GiB 要放 KV cache 與啟動區。",[111,284,285],{},"那如果問題不是「記憶體不夠」，而是「記憶體用得不好」呢？",[157,287,289],{"id":288},"模型只能往下溢vramramssd","模型只能往下溢：VRAM、RAM、SSD",[111,291,292],{},"測試機是 RTX 5090，32 GB VRAM。論文把系統記憶體上限壓在 16 到 128 GiB 之間，模擬不同預算的機器。三顆模型：",[197,294,295,314],{},[200,296,297],{},[203,298,299,302,305,308,311],{},[206,300,301],{},"模型",[206,303,304],{},"總參數（啟動）",[206,306,307],{},"精度",[206,309,310],{},"權重大小",[206,312,313],{},"32 GB 卡上的缺口",[219,315,316,333,349],{},[203,317,318,321,324,327,330],{},[224,319,320],{},"Qwen3.6-35B-A3B",[224,322,323],{},"35B（3B）",[224,325,326],{},"BF16",[224,328,329],{},"約 70 GB",[224,331,332],{},"約 38 GB",[203,334,335,338,341,343,346],{},[224,336,337],{},"Gemma4-26B-A4B",[224,339,340],{},"26B（4B）",[224,342,326],{},[224,344,345],{},"約 52 GB",[224,347,348],{},"約 20 GB",[203,350,351,354,356,359,362],{},[224,352,353],{},"DeepSeek-V4-Flash",[224,355,243],{},[224,357,358],{},"原生 FP4",[224,360,361],{},"155 GiB",[224,363,364],{},"約 123 GiB",[111,366,367],{},"前兩顆的權重大小是我們按 BF16 每參數 2 bytes 算的，缺口是減掉顯卡標示的 32 GB；DeepSeek 的 123 GiB 是 155 − 32 GiB。都不是論文給的數字。",[111,369,370,371,375],{},"三顆都裝不進 32 GB。DeepSeek-V4-Flash 更極端：它已經是 FP4（每參數 4 bit），再壓下去要面對品質問題，不是換個格式就好。我們在",[118,372,374],{"href":373},"\u002Fblog\u002Fmacaq-one-layer-at-a-time","量化那篇","寫過，量化不是免費的。",[111,377,378],{},"所以權重只能往下一層溢：VRAM 放不下的進 RAM，RAM 也放不下的進 SSD。這件事叫 spill，不是「載入失敗」，是每一次 forward 都可能發生的搬運。",[111,380,381,382,167],{},"接下來只剩一個問題：",[137,383,384],{},"三層要怎麼擺，搬運才不會變成主要成本",[157,386,388],{"id":387},"現有系統錯在哪三層被當成三個獨立快取","現有系統錯在哪：三層被當成三個獨立快取",[111,390,391],{},"大部分推論引擎的記憶體管理，照的是資料中心的成本模型：DRAM 貴、SSD 便宜，所以讓 VRAM 快取 RAM、RAM 快取 SSD；每一個階層自己決定踢誰，彼此不知道對方踢了什麼。",[111,393,394],{},"資料中心有充足的 DRAM，這個假設通常成立。",[111,396,397],{},"在消費級 PC 上，它會把系統弄死。原因分兩個階段。",[111,399,400,403],{},[137,401,402],{},"Prefill（讀 prompt）。"," 一段 8K token 的 chunk 幾乎會啟動每一層的每個專家。prefill 要的不是「少數專家」，是「整個模型掃一遍」。當專家池大於 RAM，掃描就變成循環：載入後面幾層的專家，把前面幾層的踢掉；下一個 chunk 再從頭讀。",[111,405,406],{},"64 GiB 的 RAM 明明裝得下 44% 的池，SSD 還是供應了 baseline 86–99% 的 prefill 專家流量。Tideway 在同一個場景是 52%。（如圖 1；斜紋是四個對照組之間的區間，最低 86%、最高 99%。）",[111,408,409,412,413,167],{},[137,410,411],{},"Decode（生成）。"," 每一步只碰少數專家，但缺一個就卡住。動態 paging 又會打斷 CUDA Graph——固定形狀的圖捕獲不了「這一層要臨時去 SSD 拿一個專家」，所以引擎退回 eager 執行，每個 token 多一段 CPU 調度與同步。llama.cpp 是另一種極端：它幾乎沒有啟動開銷，但 ",[137,414,415],{},"92% 的 decode 時間花在用 CPU 算專家",[111,417,418],{},"注意這兩件事的性質不同。prefill 是「留不住」，decode 是「執行不好」。要同一個系統同時解，才會有後面的設計。",[111,420,421],{},[422,423],"img",{"alt":424,"src":425},"如圖 1：同樣 64 GiB 記憶體，四個對照組的 prefill 專家流量有 86–99% 來自 SSD，Tideway 是 52%；第一列是 RAM 實際裝得下的比例，44%","\u002Fimages\u002Fblog\u002Ftideway-one-memory-pool\u002F01-prefill-traffic.svg",[157,427,429],{"id":428},"洞見一pcie-比-ssd-快所以-ram-裡的專家是副本","洞見一：PCIe 比 SSD 快，所以 RAM 裡的專家是副本",[111,431,432],{},"論文先量了一件事，我認為那是整篇的地基。",[111,434,435,436,439,440,167],{},"同一台機器上，PCIe 5.0 實測 ",[137,437,438],{},"57.6 GB\u002Fs（RAM→VRAM）、57.3 GB\u002Fs（VRAM→RAM）、雙向 102.1 GB\u002Fs","；NVMe SSD 讀取是 ",[137,441,442],{},"6.8 GB\u002Fs",[197,444,445,458],{},[200,446,447],{},[203,448,449,452,455],{},[206,450,451],{},"路徑",[206,453,454],{},"實測頻寬",[206,456,457],{},"相對 SSD",[219,459,460,471,482,493],{},[203,461,462,465,468],{},[224,463,464],{},"PCIe H2D（RAM→VRAM）",[224,466,467],{},"57.6 GB\u002Fs",[224,469,470],{},"約 8.5×",[203,472,473,476,479],{},[224,474,475],{},"PCIe D2H（VRAM→RAM）",[224,477,478],{},"57.3 GB\u002Fs",[224,480,481],{},"約 8.4×",[203,483,484,487,490],{},[224,485,486],{},"PCIe 雙向",[224,488,489],{},"102.1 GB\u002Fs",[224,491,492],{},"約 15×",[203,494,495,498,500],{},[224,496,497],{},"NVMe 讀取（SSD→RAM）",[224,499,442],{},[224,501,502],{},"1×",[111,504,505],{},"倍數是我們拿論文數字相除的，不是論文寫的。",[111,507,508],{},"這代表什麼？一個躺在 RAM 裡的專家，重新服務給 GPU 的成本，大約是從 SSD 讀一次的八分之一。",[111,510,511],{},"但在「三層各自快取」的設計裡，VRAM 踢出來的專家如果 RAM 沒有副本，就直接丟掉。下次要用，得從 SSD 重讀。等於把最有價值的副本當垃圾。",[111,513,514,515,518],{},"Tideway 把 VRAM 和 RAM 合成",[137,516,517],{},"一個池","：",[172,520,521,524,527,534],{},[175,522,523],{},"一份統一的目錄（Residency Table），記每個專家在 VRAM 與 RAM 的哪個槽位",[175,525,526],{},"兩層都有的專家去重，但少數熱門專家允許兩層各留一份",[175,528,529,530,533],{},"VRAM 要踢人時，先看 RAM 有沒有副本：有就放掉 GPU 那份，沒有就",[137,531,532],{},"寫回 RAM","，不是丟掉",[175,535,536],{},"都不行時，才真的回 SSD",[111,538,539,540,167],{},"重點不是「Tideway 做了什麼」，是那個判斷：",[137,541,542],{},"在消費級 PC 上，跨層的價差是好幾倍，不是便宜很多",[111,544,545],{},"所以「留在上一層」本身就有價值。",[111,547,548],{},"（8.5 倍是 PCIe 5.0 與 WD_BLACK SN850X 的實測。換成 PCIe 4.0 或慢一點的 SSD，倍數會縮小，但「PCIe 比 SSD 快數倍」在主流平台成立。）",[157,550,552],{"id":551},"洞見二prefill-要串流decode-要快取","洞見二：prefill 要串流，decode 要快取",[111,554,555,556,167],{},"第二個洞見：兩個階段對記憶體的需求不只是不同，是",[137,557,558],{},"相反",[111,560,561,564],{},[137,562,563],{},"Prefill 要吞吐。"," 反正每個 chunk 都會掃過所有專家，那就別想命中率，想「搬運能不能被計算蓋掉」。Tideway 在 prefill 時把 VRAM 切成三塊：專家、雙緩衝、啟動區。雙緩衝的意思是：第 l 層在算，第 l+1 層的權重已經在搬。RAM 這邊，可重用的專家被 anchors 釘住，只留一個小視窗讓 SSD 的專家流進來。",[111,566,567,570],{},[137,568,569],{},"Decode 要容量。"," 每一步只碰少數專家，但會反覆碰。所以 VRAM 要回到固定位址的槽位，命中率才穩；RAM 當 LRU。執行上把每層切成三段 CUDA Graph（attention、router、experts），在 warmup 時捕獲一次。之後不管命中還是 miss，都只更新槽位、重播同一組圖，不重錄。",[111,572,573,576],{},[137,574,575],{},"階段切換。"," prefill 結束，anchors 放開、借來的 VRAM 還回去、佈局換成 decode 版。多數系統只維護一套佈局（SSD-LLaMA 就固定一套），所以兩個階段至少有一邊不是最佳。（如圖 2，以 64 GiB RAM 的設定為例。）",[111,578,579],{},[422,580],{"alt":581,"src":582},"如圖 2：同一個記憶體池，prefill 時切成串流用的雙緩衝與 anchors，decode 時換回固定槽位與 LRU 快取","\u002Fimages\u002Fblog\u002Ftideway-one-memory-pool\u002F02-phase-layout.svg",[157,584,586],{"id":585},"快多少197-倍的組成","快多少：1.97 倍的組成",[111,588,589,590,593],{},"先講清楚「快 1.97 倍」是什麼意思：",[137,591,592],{},"相對四套對照組裡最快的那一套","，在 270 組固定形狀的配置上平均。不是絕對秒數，也不是「2 秒變 1 秒」。",[111,595,596,597,600],{},"但最值得看的不是平均。",[137,598,599],{},"當 VRAM＋RAM 這個池大到所有專家都放得下時，Tideway 還是快 1.13–1.58 倍","。那時候已經沒有 SSD 的事了；差距來自把 CPU 調度拿掉、把 PCIe 搬運疊到計算後面。也就是說，「管理記憶體」不只是「減少 spill」，它本身就是效能。",[111,602,603],{},"平均與範圍是這樣：",[197,605,606,622],{},[200,607,608],{},[203,609,610,613,616,619],{},[206,611,612],{},"指標",[206,614,615],{},"平均",[206,617,618],{},"範圍",[206,620,621],{},"看的是什麼",[219,623,624,638,652],{},[203,625,626,629,632,635],{},[224,627,628],{},"端到端延遲（static 平均）",[224,630,631],{},"1.97×",[224,633,634],{},"static 1.13–3.18×、agent 軌跡 1.20–3.14×",[224,636,637],{},"一整輪請求",[203,639,640,643,646,649],{},[224,641,642],{},"TTFT（首字延遲）",[224,644,645],{},"2.40×",[224,647,648],{},"1.15–9.04×",[224,650,651],{},"prefill",[203,653,654,657,660,663],{},[224,655,656],{},"Decode 吞吐",[224,658,659],{},"1.61×",[224,661,662],{},"1.20–2.28×",[224,664,665],{},"生成階段",[111,667,668],{},"再往下拆，三個機制各值多少：",[197,670,671,687],{},[200,672,673],{},[203,674,675,678,681,684],{},[206,676,677],{},"版本",[206,679,680],{},"相對上一版",[206,682,683],{},"累積",[206,685,686],{},"做了什麼",[219,688,689,702,715,729],{},[203,690,691,694,697,699],{},[224,692,693],{},"Base：per-tier LRU、同步載入、eager",[224,695,696],{},"—",[224,698,502],{},[224,700,701],{},"起點",[203,703,704,707,710,712],{},[224,705,706],{},"+ 跨層記憶體管理",[224,708,709],{},"1.23×",[224,711,709],{},[224,713,714],{},"prefill 不再 thrash、去重",[203,716,717,720,723,726],{},[224,718,719],{},"+ 非同步搬運與 prefill 管線",[224,721,722],{},"1.36×",[224,724,725],{},"1.67×",[224,727,728],{},"搬運疊在計算後面",[203,730,731,734,736,739],{},[224,732,733],{},"+ 分段的 decode graph",[224,735,722],{},[224,737,738],{},"2.28×",[224,740,741],{},"拿掉 paging 時的 CPU 開銷",[111,743,744],{},"（累積欄是我們把三項增量乘起來的：1.23 × 1.36 ≈ 1.67，再 × 1.36 ≈ 2.28；論文給的總數是 2.28×。）",[111,746,747],{},"TTFT 那邊，前兩項把它推到 2.94×；TPOT 則靠 decode graph 到 2.04×。",[111,749,750],{},"還有一個敏感參數：prefill 的 chunk 大小。從 1K 到 8K，Tideway 相對最快 baseline 的優勢從 1.18× 拉開到 1.57×——chunk 越大，每層算得越久，搬運越藏得住。",[111,752,753],{},"至於絕對時間：如果 baseline 的 TTFT 是 100 秒，2.40 倍大約是 42 秒；如果 baseline 一次固定形狀的請求要 10 分鐘，1.97 倍大約是 5 分鐘；換成 agent 軌跡（1.20–3.14 倍），10 分鐘大約變 3 到 8 分鐘。（這些換算是我們的假設，不是論文量到的絕對值。）",[157,755,757],{"id":756},"它沒解決的限制與代價","它沒解決的：限制與代價",[111,759,760],{},"到這裡該踩煞車了。",[197,762,763,773],{},[200,764,765],{},[203,766,767,770],{},[206,768,769],{},"限制",[206,771,772],{},"對你的意思",[219,774,775,783,791,799,807,815,823],{},[203,776,777,780],{},[224,778,779],{},"仍要 SSD backing",[224,781,782],{},"155 GiB 不會變小；省的是「每次重讀」",[203,784,785,788],{},[224,786,787],{},"單卡、單機",[224,789,790],{},"多卡、多請求、排隊都沒有評測",[203,792,793,796],{},[224,794,795],{},"KV cache 先佔位",[224,797,798],{},"context 越長，專家能用的槽位越少",[203,800,801,804],{},[224,802,803],{},"兩套對照組是重現的",[224,805,806],{},"FlashMoE、SSD-LLaMA 沒開源，作者在 FreeToken 上重現機制，不是原系統對打",[203,808,809,812],{},[224,810,811],{},"沒有 vLLM 對照",[224,813,814],{},"論文沒測；我們認為這篇的服務前提（單卡、單流、模型放得下）和 vLLM 不同",[203,816,817,820],{},[224,818,819],{},"preprint、我們沒找到獨立複現",[224,821,822],{},"8 條 agent 軌跡是 TraceLab 的重播；實驗都出自同一組作者",[203,824,825,828],{},[224,826,827],{},"平台是 PCIe 5.0",[224,829,830],{},"倍數會隨平台變；16 GiB 是在 251 GiB 的機器上壓上限模擬的",[111,832,833],{},"它也還不是可以換進 llama.cpp 的套件。論文實作約 11.8K 行（Python 與 C，GPU kernel 用 Triton 與 CuTe DSL），是一套研究原型。",[111,835,836,837,840],{},"有一件事要說清楚：",[137,838,839],{},"它不是「把模型塞進記憶體」","。155 GiB 的模型在 64 GiB 的機器上，還是有大量權重要從 SSD 來。Tideway 做的是把 spill 的代價降到可接受。",[111,842,843],{},"還有兩件小事值得知道。開銷很小：圖捕獲幾秒、常駐緩衝不到 3% 的 VRAM。所有寫回都在 VRAM 與 RAM 之間，SSD 只讀不寫——對 SSD 壽命是好事。",[157,845,846],{"id":846},"所以你的機器該怎麼看",[111,848,849],{},"三個問題，按順序問。",[851,852,853,859,865],"ol",{},[175,854,855,858],{},[137,856,857],{},"權重和 (VRAM + RAM) 差多少？"," 先算帳：模型大小、KV cache、啟動區。差 10 GB 和差 90 GB，是完全不同的兩件事。",[175,860,861,864],{},[137,862,863],{},"瓶頸在 prefill 還是 decode？"," 長 prompt、多輪 agent、每次重讀大量 context，看 prefill（TTFT）。長輸出、單輪，看 decode（TPOT）。兩者的優化方向相反。",[175,866,867,870],{},[137,868,869],{},"你的 PCIe 與 SSD 是哪一級？"," 如果 SSD 只有 SATA 級（約 0.5 GB\u002Fs）、PCIe 也只有 4.0，那「留在 RAM」的價值比論文那台機器小，spill 的成本更高。",[111,872,873],{},"明天可以做的三件事：",[851,875,876,882,888],{},[175,877,878,881],{},[137,879,880],{},"算一次自己的記憶體帳。"," 權重（參數 × 每參數 byte）＋ KV cache（token × 層數 × KV head 數 × 維度 × 2 × byte）＋ 啟動與框架。十分鐘算得出來，比看十篇評測有用。拿這篇的數字試一次：155 − 32 − 64 ≈ 59 GiB 的權重必須從 SSD 來，還沒算 KV cache 與框架。",[175,883,884,887],{},[137,885,886],{},"量一次你自己的 TTFT\u002FTPOT 分解。"," 大部分引擎都有 log。拿一段 32K 的 prompt 跑一次，看時間花在讀 prompt 還是生成——這決定你該調 chunk size 還是 offload 策略。",[175,889,890,893],{},[137,891,892],{},"把「階段感知」寫進評估清單。"," 不管用 llama.cpp、FreeToken 還是別的，問一句：prefill 和 decode 用的是同一套佈局嗎？如果沒有，那就是這篇講的效率空間。",[111,895,896,897,901,902,905,906,910],{},"我們寫過同一件事的產品版：",[118,898,900],{"href":899},"\u002Fblog\u002Fstrata-125b-on-12gb","125B 跑在 12GB 顯卡上","。那篇講「怎麼用」，這篇講「為什麼現有系統慢、慢在哪一層」。量化那條路看",[118,903,904],{"href":373},"122B 一次只裝一層","；記憶體是瓶頸這個題目，",[118,907,909],{"href":908},"\u002Fblog\u002Flfm3-128k-kv-cache","LFM3 那篇","是另一個角度。",[111,912,913,914,918],{},"如果你在評估地端部署，",[118,915,917],{"href":916},"\u002Fservices","服務頁","有我們的做法。",[111,920,921],{},"記憶體不是不夠，是 VRAM 和 RAM 沒被當成同一個池用。你要的不是 512 GB，是一個不把 RAM 當垃圾桶的排程器。",{"title":923,"searchDepth":924,"depth":924,"links":925},"",2,[926,927,928,929,930,931,932,933],{"id":159,"depth":924,"text":160},{"id":288,"depth":924,"text":289},{"id":387,"depth":924,"text":388},{"id":428,"depth":924,"text":429},{"id":551,"depth":924,"text":552},{"id":585,"depth":924,"text":586},{"id":756,"depth":924,"text":757},{"id":846,"depth":924,"text":846},"\u002Fimages\u002Fblog\u002Ftideway-one-memory-pool.svg","標題「你不需要 512 GB 記憶體，你需要更好的記憶體管理」的技術筆記封面","2026-11-24","主流消費級 PC 的記憶體是 16–64 GiB，論文裡那顆 FP4 的 DeepSeek-V4-Flash 卻要 155 GiB。現有推論系統把 VRAM、RAM、SSD 當三層獨立快取，prefill 的專家流量有 86–99% 從 SSD 來。Tideway 把 VRAM 和 RAM 合成一個池、SSD 當備援：端到端 1.97 倍、TTFT 2.40 倍，以及這些數字的邊界。",false,"md","zh-TW",{},true,"\u002Fimages\u002Fblog\u002Ftideway-one-memory-pool.jpg","\u002Fblog\u002Fzh-tw\u002Ftideway-one-memory-pool",{"title":102,"description":937},"tideway-one-memory-pool","blog\u002Fzh-TW\u002Ftideway-one-memory-pool",[949,950,951,952],"local-llm","moe","memory","inference",null,"47mWcybFLxHcjYBjrJ1lojO-73eid-AMFjGrgB0gqrY",{"id":956,"title":957,"author":103,"body":958,"cover":1724,"coverAlt":1725,"date":936,"description":1726,"draft":938,"extension":939,"featured":938,"lang":1727,"meta":1728,"navigation":942,"ogImage":1729,"path":1730,"seo":1731,"slug":946,"stem":1732,"tags":1733,"translationKey":946,"updated":953,"__hash__":1734},"blog\u002Fblog\u002Fen\u002Ftideway-one-memory-pool.md","You Don't Need 512 GB of RAM",{"type":105,"value":959,"toc":1714},[960,975,978,981,984,987,990,993,996,1000,1006,1009,1026,1033,1104,1107,1110,1113,1117,1120,1188,1191,1198,1201,1207,1211,1214,1217,1220,1226,1229,1239,1242,1248,1252,1255,1264,1320,1323,1326,1329,1336,1354,1361,1364,1368,1371,1377,1383,1389,1395,1399,1406,1462,1468,1471,1474,1542,1545,1548,1551,1554,1558,1561,1631,1634,1641,1644,1648,1651,1671,1674,1694,1704,1711],[108,961,962,965],{},[111,963,964],{},"No benchmarks of our own here. The numbers come from arXiv 2611.14848 (\"Tideway\", Duke University, Nov 10, 2026) and the authors' open-source code. It is a preprint: we found no independent reproduction, and two of the four baselines are the authors' reimplementation of mechanisms, not the original systems. Anything we computed ourselves is labeled.",[111,966,967,968,971,972],{},"Paper: ",[118,969,123],{"href":120,"rel":970},[122]," | Code: ",[118,973,129],{"href":127,"rel":974},[122],[111,976,977],{},"A machine with 64 GiB of RAM and a 32 GB GPU is reading a 32K-token prompt.",[111,979,980],{},"Its RAM can hold 44% of the expert weights, yet once prefill finishes, 86–99% of the expert traffic comes from the SSD.",[111,982,983],{},"This is where that 86–99% comes from — and why the same memory runs 1.97× faster under a different memory manager.",[111,985,986],{},"Some terms first. MoE (mixture of experts) splits each layer's feed-forward network into many small \"experts\" and routes each token to a few of them. Prefill is the phase that reads the prompt; decode is the phase that emits tokens one at a time. TTFT is the time to first token and TPOT the time per output token; the KV cache is the attention state that grows with the conversation, and a CUDA Graph is a captured sequence of GPU kernels that can be replayed without re-dispatching from the CPU.",[111,988,989],{},"Those 44% barely did any work. And this is not one engine being sloppy: all four baselines (FreeToken, llama.cpp, FlashMoE, SSD-LLaMA) fall into the same hole.",[111,991,992],{},"The problem is not that the model is too big. It is that they treat memory as three caches that never talk to each other. VRAM caches RAM, RAM caches the SSD, and each tier runs its own replacement policy — mostly LRU (least recently used), a learned policy in FlashMoE, and in llama.cpp the OS mmap (page granularity, which thrashes once it reaches the SSD).",[111,994,995],{},"Start with the bill.",[157,997,999],{"id":998},"start-with-the-bill-512-gib-of-ram-costs-41000","Start with the bill: 512 GiB of RAM costs $41,000",[111,1001,1002,1003],{},"The largest model in the paper is DeepSeek-V4-Flash. ",[137,1004,1005],{},"Even stored in FP4, it is 155 GiB.",[111,1007,1008],{},"Now look at the machines people actually own. The paper pulls four 2026 datasets: prebuilt desktop quotes, 3DMark submissions, BOINC hosts, and the Steam hardware survey. Same story in all four:",[172,1010,1011,1017,1023],{},[175,1012,1013,1016],{},[137,1014,1015],{},"16–64 GiB is the mainstream",": it covers 64–84% of the three RTX 5090 populations and 99% of Steam machines",[175,1018,1019,1022],{},[137,1020,1021],{},"More than 128 GiB shows up in at most 11%"," of any population",[175,1024,1025],{},"Even people who bought the most expensive consumer GPU stop at 64 GiB",[111,1027,1028,1029,1032],{},"Price is a different matter. The paper plots prebuilt quotes against RAM size: under $10k up to 128 GiB, then a cliff — ",[137,1030,1031],{},"about $26k at 256 GiB, about $41k at 512 GiB"," (usually marketed as 512 GB).",[197,1034,1035,1051],{},[200,1036,1037],{},[203,1038,1039,1042,1045,1048],{},[206,1040,1041],{},"RAM",[206,1043,1044],{},"Coverage",[206,1046,1047],{},"Prebuilt price",[206,1049,1050],{},"Fits 155 GiB of weights?",[219,1052,1053,1066,1078,1091],{},[203,1054,1055,1057,1060,1063],{},[224,1056,226],{},[224,1058,1059],{},"64–84% of RTX 5090 owners, 99% of Steam",[224,1061,1062],{},"under $10k",[224,1064,1065],{},"no",[203,1067,1068,1070,1073,1075],{},[224,1069,240],{},[224,1071,1072],{},"a minority",[224,1074,1062],{},[224,1076,1077],{},"no, 27 GiB short",[203,1079,1080,1082,1085,1088],{},[224,1081,253],{},[224,1083,1084],{},"under 11%",[224,1086,1087],{},"about $26k",[224,1089,1090],{},"yes, KV cache aside",[203,1092,1093,1095,1098,1101],{},[224,1094,267],{},[224,1096,1097],{},"rarer",[224,1099,1100],{},"about $41k",[224,1102,1103],{},"yes",[111,1105,1106],{},"(Coverage and prices are the paper's; \"27 GiB short\" is 155 − 128.)",[111,1108,1109],{},"\"Just buy more RAM\" is not an option. Such a machine costs two to four times as much. And even at 256 GiB, 155 GiB of weights takes 60% of it (our arithmetic: 155 ÷ 256), leaving 101 GiB for the KV cache and activations.",[111,1111,1112],{},"So what if the problem is not how much memory you have, but how it gets used?",[157,1114,1116],{"id":1115},"the-weights-have-to-spill-vram-ram-ssd","The weights have to spill: VRAM, RAM, SSD",[111,1118,1119],{},"The test machine has an RTX 5090 with 32 GB of VRAM. The authors cap host RAM between 16 and 128 GiB to simulate different budgets. Three models:",[197,1121,1122,1141],{},[200,1123,1124],{},[203,1125,1126,1129,1132,1135,1138],{},[206,1127,1128],{},"Model",[206,1130,1131],{},"Total params (active)",[206,1133,1134],{},"Precision",[206,1136,1137],{},"Weight size",[206,1139,1140],{},"Gap on a 32 GB card",[219,1142,1143,1158,1173],{},[203,1144,1145,1147,1150,1152,1155],{},[224,1146,320],{},[224,1148,1149],{},"35B (3B)",[224,1151,326],{},[224,1153,1154],{},"about 70 GB",[224,1156,1157],{},"about 38 GB",[203,1159,1160,1162,1165,1167,1170],{},[224,1161,337],{},[224,1163,1164],{},"26B (4B)",[224,1166,326],{},[224,1168,1169],{},"about 52 GB",[224,1171,1172],{},"about 20 GB",[203,1174,1175,1177,1180,1183,1185],{},[224,1176,353],{},[224,1178,1179],{},"not reported",[224,1181,1182],{},"native FP4",[224,1184,361],{},[224,1186,1187],{},"about 123 GiB",[111,1189,1190],{},"The first two weight sizes are our arithmetic at 2 bytes per parameter (BF16), and their gaps subtract the card's nominal 32 GB; DeepSeek's 123 GiB is 155 GiB − 32 GiB. None of it comes from the paper.",[111,1192,1193,1194,1197],{},"None of the three fits in 32 GB. DeepSeek-V4-Flash is the extreme case: it is already FP4, four bits per parameter. Compressing further is a quality decision, not a format switch. We wrote about that in ",[118,1195,1196],{"href":373},"our quantization piece",": quantization is not free.",[111,1199,1200],{},"So the weights spill: what does not fit in VRAM goes to RAM, and what does not fit in RAM goes to the SSD. This is not a failed load. It is a transfer that can happen on every forward pass.",[111,1202,1203,1204],{},"Which leaves one question: ",[137,1205,1206],{},"how should the tiers be arranged so that moving weights does not become the main cost?",[157,1208,1210],{"id":1209},"what-existing-systems-get-wrong-three-tiers-three-independent-caches","What existing systems get wrong: three tiers, three independent caches",[111,1212,1213],{},"Most inference engines manage memory the way a datacenter would. DRAM is expensive, SSD is cheap, so VRAM caches RAM and RAM caches the SSD, and each tier evicts on its own.",[111,1215,1216],{},"Datacenter servers have abundant DRAM, so the assumption usually holds.",[111,1218,1219],{},"On a consumer PC it kills the system. Two phases, two ways.",[111,1221,1222,1225],{},[137,1223,1224],{},"Prefill (reading the prompt)."," One 8K-token chunk activates nearly every expert in every layer. Prefill does not need \"a few experts\"; it needs a full sweep of the model. Once the expert pool exceeds RAM, the sweep becomes cyclic: loading later layers evicts earlier ones, and the next chunk starts over.",[111,1227,1228],{},"So a 64 GiB machine holds 44% of the pool, and the SSD still supplies 86–99% of the baselines' prefill expert traffic. Tideway comes in at 52% in the same setting. (Figure 1)",[111,1230,1231,1234,1235,1238],{},[137,1232,1233],{},"Decode (generating)."," Each step touches only a few experts, but a single miss stalls it. Dynamic paging also breaks CUDA Graph: a fixed-shape capture cannot express \"fetch one expert from the SSD mid-layer,\" so engines fall back to eager execution and pay host dispatch and sync on every token. llama.cpp is the opposite extreme: almost no launch overhead, but ",[137,1236,1237],{},"92% of its decode time goes to computing experts on the CPU",".",[111,1240,1241],{},"The two failures are different in kind. Prefill fails at retention; decode fails at execution. A system has to solve both.",[111,1243,1244],{},[422,1245],{"alt":1246,"src":1247},"Figure 1: On the same 64 GiB machine, four baselines pull 86–99% of prefill expert traffic from the SSD, while Tideway pulls 52%. The first row is what RAM actually holds, 44%.","\u002Fimages\u002Fblog\u002Fen\u002Ftideway-one-memory-pool\u002F01-prefill-traffic.svg",[157,1249,1251],{"id":1250},"insight-one-pcie-beats-the-ssd-so-the-ram-copy-is-worth-keeping","Insight one: PCIe beats the SSD, so the RAM copy is worth keeping",[111,1253,1254],{},"One measurement in the paper underpins everything else.",[111,1256,1257,1258,1261,1262,1238],{},"On the same machine, PCIe 5.0 delivers ",[137,1259,1260],{},"57.6 GB\u002Fs host-to-device, 57.3 GB\u002Fs device-to-host, and 102.1 GB\u002Fs bidirectional","; the NVMe drive reads at ",[137,1263,442],{},[197,1265,1266,1279],{},[200,1267,1268],{},[203,1269,1270,1273,1276],{},[206,1271,1272],{},"Path",[206,1274,1275],{},"Measured",[206,1277,1278],{},"vs SSD",[219,1280,1281,1291,1301,1311],{},[203,1282,1283,1286,1288],{},[224,1284,1285],{},"PCIe H2D (RAM→VRAM)",[224,1287,467],{},[224,1289,1290],{},"about 8.5×",[203,1292,1293,1296,1298],{},[224,1294,1295],{},"PCIe D2H (VRAM→RAM)",[224,1297,478],{},[224,1299,1300],{},"about 8.4×",[203,1302,1303,1306,1308],{},[224,1304,1305],{},"PCIe bidirectional",[224,1307,489],{},[224,1309,1310],{},"about 15×",[203,1312,1313,1316,1318],{},[224,1314,1315],{},"NVMe read (SSD→RAM)",[224,1317,442],{},[224,1319,502],{},[111,1321,1322],{},"The ratios are our division of the paper's numbers, not the paper's.",[111,1324,1325],{},"So re-serving an expert that already sits in RAM costs roughly one eighth of reading it back from the SSD.",[111,1327,1328],{},"Yet in a three-cache design, an expert evicted from VRAM and absent from RAM is simply dropped. The next access pays for an SSD read. The most valuable copy gets thrown away.",[111,1330,1331,1332,1335],{},"Tideway instead makes VRAM and RAM ",[137,1333,1334],{},"one pool",":",[172,1337,1338,1341,1344,1351],{},[175,1339,1340],{},"one directory (the Residency Table) recording which slot holds each expert in VRAM and in RAM",[175,1342,1343],{},"deduplication across tiers, with a small set of hot experts allowed to live in both",[175,1345,1346,1347,1350],{},"on VRAM eviction, check RAM first: if a copy exists, drop the GPU one; if not, ",[137,1348,1349],{},"write the victim back to RAM"," instead of discarding it",[175,1352,1353],{},"only when neither works does the expert leave for the SSD",[111,1355,1356,1357,1360],{},"The point is not what Tideway implements. The point is the judgment underneath: ",[137,1358,1359],{},"on a consumer PC, crossing a tier costs several times more than staying in it, not a little more."," Keeping the copy one tier up is worth real money.",[111,1362,1363],{},"(The 8.5× comes with a hardware caveat: PCIe 5.0 and a WD_BLACK SN850X. On PCIe 4.0 or a slower SSD the ratio shrinks, but \"PCIe is several times faster than the SSD\" still holds on mainstream hardware.)",[157,1365,1367],{"id":1366},"insight-two-prefill-streams-decode-caches","Insight two: prefill streams, decode caches",[111,1369,1370],{},"The second insight: the two phases do not merely want different layouts. They want opposite ones.",[111,1372,1373,1376],{},[137,1374,1375],{},"Prefill wants throughput."," Every chunk sweeps all experts anyway, so stop optimizing hit rate and start hiding transfers behind compute. Tideway splits VRAM three ways during prefill: experts, a double buffer, and workspace. Layer l computes while layer l+1's weights are already in flight. In RAM, reusable experts are pinned with anchors, and a small streaming window is left for experts arriving from the SSD.",[111,1378,1379,1382],{},[137,1380,1381],{},"Decode wants capacity."," Each step touches few experts, but it touches them again and again. VRAM returns to fixed-address slots so hit rates stay stable; RAM becomes an LRU cache. Each layer is captured as three CUDA Graph segments — attention, router, experts — once at warmup. After that, a hit or a miss only updates slot IDs and replays the same graphs; nothing is recaptured.",[111,1384,1385,1388],{},[137,1386,1387],{},"The switch."," When prefill ends, anchors are released, borrowed VRAM goes back, and the layout flips to the decode version. Most systems keep one layout across both phases (SSD-LLaMA fixes one), so at least one phase pays. Figure 2 shows the same pool under both layouts, using 64 GiB of RAM as the example.",[111,1390,1391],{},[422,1392],{"alt":1393,"src":1394},"Figure 2: The same memory pool under two layouts. During prefill it is split into streaming buffers and pinned anchors; during decode it returns to fixed slots and an LRU cache.","\u002Fimages\u002Fblog\u002Fen\u002Ftideway-one-memory-pool\u002F02-phase-layout.svg",[157,1396,1398],{"id":1397},"how-much-faster-and-where","How much faster, and where",[111,1400,1401,1402,1405],{},"First, what \"1.97× faster\" means: ",[137,1403,1404],{},"against the fastest of four baselines",", averaged over 270 fixed-shape configurations. It is not an absolute wall-clock number, and it is not \"two seconds become one.\"",[197,1407,1408,1424],{},[200,1409,1410],{},[203,1411,1412,1415,1418,1421],{},[206,1413,1414],{},"Metric",[206,1416,1417],{},"Average",[206,1419,1420],{},"Range",[206,1422,1423],{},"What it measures",[219,1425,1426,1439,1450],{},[203,1427,1428,1431,1433,1436],{},[224,1429,1430],{},"End-to-end latency (static average)",[224,1432,631],{},[224,1434,1435],{},"1.13–3.18× static, 1.20–3.14× agent traces",[224,1437,1438],{},"a full request",[203,1440,1441,1444,1446,1448],{},[224,1442,1443],{},"TTFT",[224,1445,645],{},[224,1447,648],{},[224,1449,651],{},[203,1451,1452,1455,1457,1459],{},[224,1453,1454],{},"Decode throughput",[224,1456,659],{},[224,1458,662],{},[224,1460,1461],{},"generation",[111,1463,1464,1465],{},"The most interesting number is not in the average: ",[137,1466,1467],{},"when the pool (VRAM + RAM) holds every expert, Tideway is still 1.13–1.58× faster.",[111,1469,1470],{},"At that point the SSD is out of the picture. The gap comes from removing CPU dispatch and overlapping PCIe transfers with compute. Managing memory is not only about reducing spill; it is performance by itself.",[111,1472,1473],{},"Here is what each mechanism is worth:",[197,1475,1476,1492],{},[200,1477,1478],{},[203,1479,1480,1483,1486,1489],{},[206,1481,1482],{},"Version",[206,1484,1485],{},"Incremental",[206,1487,1488],{},"Cumulative",[206,1490,1491],{},"What it added",[219,1493,1494,1506,1518,1530],{},[203,1495,1496,1499,1501,1503],{},[224,1497,1498],{},"Base: per-tier LRU, sync loads, eager",[224,1500,696],{},[224,1502,502],{},[224,1504,1505],{},"starting point",[203,1507,1508,1511,1513,1515],{},[224,1509,1510],{},"+ cross-tier memory manager",[224,1512,709],{},[224,1514,709],{},[224,1516,1517],{},"stops prefill thrash, dedups",[203,1519,1520,1523,1525,1527],{},[224,1521,1522],{},"+ async transfers and prefill pipeline",[224,1524,722],{},[224,1526,725],{},[224,1528,1529],{},"overlaps transfers with compute",[203,1531,1532,1535,1537,1539],{},[224,1533,1534],{},"+ piecewise decode graphs",[224,1536,722],{},[224,1538,738],{},[224,1540,1541],{},"removes paging dispatch cost",[111,1543,1544],{},"(The cumulative column is our multiplication: 1.23 × 1.36 ≈ 1.67, then × 1.36 ≈ 2.28; the paper's total is 2.28×.)",[111,1546,1547],{},"TTFT gets to 2.94× from the first two; TPOT reaches 2.04× mostly through the decode graphs.",[111,1549,1550],{},"One more sensitive knob: prefill chunk size. From 1K to 8K, Tideway's edge over the fastest baseline widens from 1.18× to 1.57×. Bigger chunks mean more compute per layer to hide transfers behind.",[111,1552,1553],{},"And in absolute terms: if a baseline TTFT is 100 seconds, 2.40× puts you near 42. On the static-shape average, a 10-minute request becomes about 5 minutes; on the agent traces the range is 1.20–3.14×, so 10 minutes becomes 3 to 8. (Those conversions are our hypotheticals, not measured absolute values.)",[157,1555,1557],{"id":1556},"what-it-does-not-fix","What it does not fix",[111,1559,1560],{},"Time to brake.",[197,1562,1563,1573],{},[200,1564,1565],{},[203,1566,1567,1570],{},[206,1568,1569],{},"Limit",[206,1571,1572],{},"What it means for you",[219,1574,1575,1583,1591,1599,1607,1615,1623],{},[203,1576,1577,1580],{},[224,1578,1579],{},"Still needs SSD backing",[224,1581,1582],{},"155 GiB does not shrink; what shrinks is re-reading it",[203,1584,1585,1588],{},[224,1586,1587],{},"One GPU, one machine",[224,1589,1590],{},"multi-GPU, concurrency, and queuing are not evaluated",[203,1592,1593,1596],{},[224,1594,1595],{},"KV cache is reserved first",[224,1597,1598],{},"longer context leaves fewer expert slots",[203,1600,1601,1604],{},[224,1602,1603],{},"Two baselines are reproductions",[224,1605,1606],{},"FlashMoE and SSD-LLaMA are closed-source; mechanisms were reproduced on FreeToken, not the original systems",[203,1608,1609,1612],{},[224,1610,1611],{},"No vLLM baseline",[224,1613,1614],{},"not tested; we think the paper's serving assumptions (single GPU, single stream, model fits) differ",[203,1616,1617,1620],{},[224,1618,1619],{},"Preprint, no independent reproduction we found",[224,1621,1622],{},"the 8 agent traces are TraceLab replays; the experiments come from one group",[203,1624,1625,1628],{},[224,1626,1627],{},"The platform is PCIe 5.0",[224,1629,1630],{},"ratios move with hardware; the 16 GiB case is a RAM cap on a 251 GiB box",[111,1632,1633],{},"It is not a drop-in replacement for llama.cpp. The implementation is about 11.8K lines (Python and C, with GPU kernels in Triton and CuTe DSL) — a research prototype.",[111,1635,1636,1637,1640],{},"One thing needs saying: ",[137,1638,1639],{},"it does not fit the model into memory."," A 155 GiB model on a 64 GiB machine still streams a lot of weights from the SSD. Tideway makes the price of spilling acceptable.",[111,1642,1643],{},"Two smaller notes. The overhead is small: graph capture takes seconds, and persistent buffers use under 3% of VRAM. All write-backs stay between VRAM and RAM; the SSD is read-only, which is good for its endurance.",[157,1645,1647],{"id":1646},"so-how-should-you-look-at-your-machine","So how should you look at your machine?",[111,1649,1650],{},"Three questions, in order.",[851,1652,1653,1659,1665],{},[175,1654,1655,1658],{},[137,1656,1657],{},"How far apart are the weights and (VRAM + RAM)?"," Do the arithmetic first: model size, KV cache, activation workspace. Ten gigabytes short and ninety gigabytes short are different problems.",[175,1660,1661,1664],{},[137,1662,1663],{},"Is prefill or decode your bottleneck?"," Long prompts, multi-turn agents, re-reading a large context: prefill (TTFT). Long outputs, single turns: decode (TPOT). The optimizations point in opposite directions.",[175,1666,1667,1670],{},[137,1668,1669],{},"What generation is your PCIe link, and how fast is your SSD?"," If your SSD is SATA-class (about 0.5 GB\u002Fs) and your bus is PCIe 4.0, keeping experts in RAM is worth less than on the paper's machine, and spilling costs more.",[111,1672,1673],{},"Three things you can do tomorrow:",[851,1675,1676,1682,1688],{},[175,1677,1678,1681],{},[137,1679,1680],{},"Do your own memory arithmetic."," Weights (params × bytes per parameter) + KV cache (tokens × layers × KV heads × head dim × 2 × bytes) + activations and framework overhead. Ten minutes of arithmetic beats ten benchmark posts.",[175,1683,1684,1687],{},[137,1685,1686],{},"Measure your own TTFT\u002FTPOT split."," Most engines log both. Run one 32K prompt and see where the time goes; that tells you whether to tune chunk size or offload policy.",[175,1689,1690,1693],{},[137,1691,1692],{},"Put \"phase-aware\" on your evaluation checklist."," Whether you run llama.cpp, FreeToken, or something else, ask: does prefill use the same layout as decode? If it does, that is the headroom this paper is talking about.",[111,1695,1696,1697,1700,1701,1238],{},"We wrote the product-side version of the same problem in Chinese: a 125B model running on a 12GB card. That piece is \"how to use it\"; this one is \"why the existing stack is slow, and where the time goes.\" For the quantization route, see ",[118,1698,1699],{"href":373},"122B one layer at a time","; for memory as the bottleneck from another angle, ",[118,1702,1703],{"href":908},"the LFM3 piece",[111,1705,1706,1707,1710],{},"If you are evaluating on-prem deployment, ",[118,1708,1709],{"href":916},"our services page"," describes how we approach it.",[111,1712,1713],{},"Memory is not too small. VRAM and RAM simply never get treated as one pool. What you need is not 512 GB — it is a scheduler that does not treat RAM as a trash can.",{"title":923,"searchDepth":924,"depth":924,"links":1715},[1716,1717,1718,1719,1720,1721,1722,1723],{"id":998,"depth":924,"text":999},{"id":1115,"depth":924,"text":1116},{"id":1209,"depth":924,"text":1210},{"id":1250,"depth":924,"text":1251},{"id":1366,"depth":924,"text":1367},{"id":1397,"depth":924,"text":1398},{"id":1556,"depth":924,"text":1557},{"id":1646,"depth":924,"text":1647},"\u002Fimages\u002Fblog\u002Fen\u002Ftideway-one-memory-pool.svg","Cover for the English essay, You Don't Need 512 GB of RAM","Most consumer PCs sit at 16–64 GiB; the paper's frontier MoE is 155 GiB at FP4. Engines keep VRAM and RAM apart, so the SSD supplies 86–99% of their prefill expert traffic. Tideway pools them: 1.97×.","en",{},"\u002Fimages\u002Fblog\u002Fen\u002Ftideway-one-memory-pool.jpg","\u002Fblog\u002Fen\u002Ftideway-one-memory-pool",{"title":957,"description":1726},"blog\u002Fen\u002Ftideway-one-memory-pool",[949,950,951,952],"_Jhsnko5i1NpdPhYO_zkDvv1aPhtY6hVngiZF8hnbR4",[1736,2233],{"id":1737,"title":1738,"author":103,"body":1739,"cover":2220,"coverAlt":2221,"date":2222,"description":2223,"draft":938,"extension":939,"featured":938,"lang":940,"meta":2224,"navigation":942,"ogImage":2225,"path":2226,"seo":2227,"slug":2228,"stem":2229,"tags":2230,"translationKey":2228,"updated":953,"__hash__":2232},"blog\u002Fblog\u002Fzh-TW\u002Fstrata-125b-on-12gb.md","125B 模型，12GB 顯卡，94 tok\u002Fs",{"type":105,"value":1740,"toc":2208},[1741,1758,1761,1764,1767,1770,1776,1783,1787,1790,1804,1807,1811,1818,1821,1824,1828,1834,1837,1887,1890,1893,1899,1905,1909,1912,1915,1918,1921,1982,1989,1994,2001,2004,2010,2016,2022,2025,2028,2034,2041,2048,2052,2055,2062,2065,2113,2116,2123,2131,2134,2154,2157,2160,2163,2170,2182,2185,2205],[108,1742,1743],{},[111,1744,1745,1746,1751,1752,1757],{},"這篇沒有我們的實測。數據來自 Qwen 官方發布、",[118,1747,1750],{"href":1748,"rel":1749},"https:\u002F\u002Fgithub.com\u002FBlockYugaLabs\u002FStrata",[122],"Strata 開源專案"," 的說明，以及一位對岸開發者的",[118,1753,1756],{"href":1754,"rel":1755},"https:\u002F\u002Fwww.bilibili.com\u002Fvideo\u002FBV1WwJy6EEuN\u002F",[122],"公開實測影片","。文中會標明哪個數字是誰給的。",[157,1759,1760],{"id":1760},"三個數字",[111,1762,1763],{},"125B 的模型。12GB 的顯示卡。94 tok\u002Fs。",[111,1765,1766],{},"半年前，這三個數字放在一起是笑話。當時想在家用電腦跑 27B 的模型，量化後 20GB，加上 KV cache，你得有 24GB 的卡才勉強開到 128K 上下文。",[111,1768,1769],{},"現在 125B 跑在 12GB 上，而且不是「能跑」，是「比你讀字還快」。",[111,1771,1772,1773,167],{},"真正變的不是模型變聰明，是",[137,1774,1775],{},"模型有多大，和硬體要多好，已經開始脫鉤",[111,1777,1778,1779,1782],{},"先講清楚前提：94 tok\u002Fs 是 RTX 5070（12GB）搭配 ",[137,1780,1781],{},"64GB 系統記憶體","的成績。只有 32GB 記憶體的話，只能跑砍半的 Coder 版本。這不是「插一張卡就好」的故事。",[157,1784,1786],{"id":1785},"兩個限制被分別繞過","兩個限制，被分別繞過",[111,1788,1789],{},"大模型跑不動，卡在兩件事：",[851,1791,1792,1798],{},[175,1793,1794,1797],{},[137,1795,1796],{},"裝不下","：權重是硬的。這顆模型加上 51B 的 n-gram 查表，量化後檔案還是 70–80GB。",[175,1799,1800,1803],{},[137,1801,1802],{},"算不動","：每個 token 都要讓所有參數參與計算。",[111,1805,1806],{},"Qwen3.8-Flash-Next 處理了第二個，Strata 處理了第一個。",[157,1808,1810],{"id":1809},"第一個限制不是每個專家都要上班","第一個限制：不是每個專家都要上班",[111,1812,1813,1814,1817],{},"Flash-Next 是 MoE（混合專家）架構。官方數字是 125B 總參數、",[137,1815,1816],{},"6B 激活","：每個 token 的計算量，大約等於一個 6B 模型。",[111,1819,1820],{},"打個比方：傳統稠密模型是「公司裡每個部門都得參與每一個案子」，MoE 是「只叫相關的幾個部門進來開會」。",[111,1822,1823],{},"所以「算不動」這件事，先解決了一半。",[157,1825,1827],{"id":1826},"第二個限制把整台電腦當成一台機器","第二個限制：把整台電腦當成一台機器",[111,1829,1830,1831,167],{},"但 6B 的計算量，不代表 6B 的記憶體——",[137,1832,1833],{},"125B 的權重還是得存在某個地方",[111,1835,1836],{},"Strata 的做法是不要全部塞進顯存，按「多常用」分三層放（見圖 1）：",[197,1838,1839,1852],{},[200,1840,1841],{},[203,1842,1843,1846,1849],{},[206,1844,1845],{},"層",[206,1847,1848],{},"放什麼",[206,1850,1851],{},"佔用",[219,1853,1854,1865,1876],{},[203,1855,1856,1859,1862],{},[224,1857,1858],{},"顯存 VRAM",[224,1860,1861],{},"最常命中的專家",[224,1863,1864],{},"12–24 GB",[203,1866,1867,1870,1873],{},[224,1868,1869],{},"系統記憶體",[224,1871,1872],{},"全部專家（開機時載入）",[224,1874,1875],{},"約 47 GB",[203,1877,1878,1881,1884],{},[224,1879,1880],{},"SSD",[224,1882,1883],{},"其餘權重與 n-gram 查表",[224,1885,1886],{},"檔案總量 70–80 GB",[111,1888,1889],{},"（47GB 是那位開發者在 IQ3_S 量化下的實測；官方建議 64GB 記憶體就是為了裝下這一層。）",[111,1891,1892],{},"跑起來的時候，GPU 算它手上的專家；沒命中的，要嘛走 PCIe 搬進顯存，要嘛直接讓 CPU 用記憶體裡的權重算。",[111,1894,1895,1896,167],{},"這就是為什麼 12GB 的卡能跑——",[137,1897,1898],{},"顯存不再是「裝不裝得下」的容器，而是「快取多大」的問題",[111,1900,1901],{},[422,1902],{"alt":1903,"src":1904},"如圖 1：三層記憶體階層——顯存放熱門專家、記憶體放全部專家、SSD 放冷門權重與 n-gram 查表","\u002Fimages\u002Fblog\u002Fstrata-125b-on-12gb\u002F01-memory-tiers.svg",[157,1906,1908],{"id":1907},"還有一個加速器猜然後驗證","還有一個加速器：猜，然後驗證",[111,1910,1911],{},"除了省記憶體，Strata 還用了投機解碼：小模型先猜接下來幾個 token，大模型一次驗證。",[111,1913,1914],{},"猜對就省下好幾步，官方數字大約快 1.6–1.8 倍。",[157,1916,1917],{"id":1917},"實際多快",[111,1919,1920],{},"官方在 RTX 5070（12GB 顯存、64GB RAM）上測到的：",[197,1922,1923,1936],{},[200,1924,1925],{},[203,1926,1927,1930,1933],{},[206,1928,1929],{},"量化",[206,1931,1932],{},"寫答案",[206,1934,1935],{},"讀 prompt（32K）",[219,1937,1938,1949,1960,1971],{},[203,1939,1940,1943,1946],{},[224,1941,1942],{},"Q2_0",[224,1944,1945],{},"94 tok\u002Fs",[224,1947,1948],{},"2,650 tok\u002Fs",[203,1950,1951,1954,1957],{},[224,1952,1953],{},"IQ2_XS",[224,1955,1956],{},"79 tok\u002Fs",[224,1958,1959],{},"2,090 tok\u002Fs",[203,1961,1962,1965,1968],{},[224,1963,1964],{},"IQ3_XXS",[224,1966,1967],{},"62 tok\u002Fs",[224,1969,1970],{},"1,750 tok\u002Fs",[203,1972,1973,1976,1979],{},[224,1974,1975],{},"IQ3_S",[224,1977,1978],{},"53 tok\u002Fs",[224,1980,1981],{},"1,620 tok\u002Fs",[111,1983,1984,1985,1988],{},"24GB 的卡更快。那位開發者在他的 4090 + 64GB RAM 上實測：",[137,1986,1987],{},"解碼約 140 tok\u002Fs、prefill 約 4,400 tok\u002Fs","，256K 上下文開滿也還跑得動。",[108,1990,1991],{},[111,1992,1993],{},"他第一次測到 203 tok\u002Fs，後來發現是 benchmark 沒把 reasoning 時間與快取命中算進去。修正後才是 140。這種「先懷疑自己的量測」比數字本身更有價值。",[111,1995,1996,1997,2000],{},"要注意上面那張表的「讀 prompt 2,650 tok\u002Fs」是快取熱起來之後的數字。",[137,1998,1999],{},"冷啟動第一次讀長文會慢很多","——官方文件寫的是每 30,000 tokens 約一分鐘，大約 500 tok\u002Fs。",[157,2002,2003],{"id":2003},"代價",[111,2005,2006,2009],{},[137,2007,2008],{},"一、量化到 2-bit。"," 94 tok\u002Fs 是 Q2_0 的數字，那是很兇的壓縮。要品質就得犧牲速度——IQ3_S 剩 53 tok\u002Fs。這是取捨，不是免費的。",[111,2011,2012,2015],{},[137,2013,2014],{},"二、記憶體與啟動。"," 開機要把 35–55GB 載進記憶體，電腦會卡 1–3 分鐘；整個程序佔用超過 50GB。32GB 的機器只能跑 Coder 變體（砍掉一半專家），官方也提醒它在中文本表現較弱。",[111,2017,2018,2021],{},[137,2019,2020],{},"三、一次一個請求。"," 預設不支援併發，第二個請求要排隊。開併發得調參數，12GB 的卡上會讓每個回答變慢。",[157,2023,2024],{"id":2024},"調參的迷思",[111,2026,2027],{},"Strata 有不少參數可調：PCIE_FRAC（GPU 與 CPU 怎麼分攤計算）、CPU Workers、MTP 深度、KVGROW。",[111,2029,2030,2031,167],{},"那位開發者花了大量時間做矩陣測試，他的結論是：",[137,2032,2033],{},"官方自動校準就夠了",[111,2035,2036,2037,2040],{},"他自己測出的「快 5%、快 9%」，多跑幾輪就消失，有時候還反過來。原因是速度受當下生成的內容、專家路由狀態、MTP 命中率、GPU 快取影響——這些變異比參數本身還大。這是",[137,2038,2039],{},"在他那台機器上","的結論，換硬體要重新驗證。",[111,2042,2043,2044,2047],{},"有一個參數值得單獨提：",[137,2045,2046],{},"KVGROW","。預設開 256K 上下文時，引擎會先把整段 KV cache 的顯存預留起來，結果短對話也沒位置放熱專家，速度掉到最慢檔。KVGROW 讓 cache 跟著實際用量長大：短對話快，長對話才讓位。",[157,2049,2051],{"id":2050},"所以該不該自架","所以，該不該自架？",[111,2053,2054],{},"先把興奮放一邊，算一算。匯率抓 1 美元 ≈ NT$31.5。",[111,2056,2057,2058,2061],{},"Qwen3.8-Flash 的 API 價格是 ",[137,2059,2060],{},"$0.16 \u002F 百萬 input token、$0.47 \u002F 百萬 output","——output 是 input 的三倍，這段先只算 input，方便比較。",[111,2063,2064],{},"一台跑得舒服的機器（4090 或同級 + 64GB RAM）大約台幣 8–10 萬。",[197,2066,2067,2080],{},[200,2068,2069],{},[203,2070,2071,2074,2077],{},[206,2072,2073],{},"每月 input 用量",[206,2075,2076],{},"API 成本",[206,2078,2079],{},"自架電費",[219,2081,2082,2093,2103],{},[203,2083,2084,2087,2090],{},[224,2085,2086],{},"1,000 萬 token",[224,2088,2089],{},"約 NT$50",[224,2091,2092],{},"NT$250–370",[203,2094,2095,2098,2101],{},[224,2096,2097],{},"1 億 token",[224,2099,2100],{},"約 NT$500",[224,2102,2092],{},[203,2104,2105,2108,2111],{},[224,2106,2107],{},"10 億 token",[224,2109,2110],{},"約 NT$5,000",[224,2112,2092],{},[111,2114,2115],{},"電費怎麼算的：推論時約 350W，每天用兩小時、其餘時間閒置 80W，一個月約 74 度；台電累進電價抓每度 NT$3–5，就是每個月 250–370 元。24 小時滿載的話是 250 度左右，大約 NT$750–1,250。",[111,2117,2118,2119,2122],{},"看表就知道結論：",[137,2120,2121],{},"每月十億 token 以下，API 連電費都比較便宜","，還沒算機器折舊。",[111,2124,2125,2126,2130],{},"粗算回本點：",[2127,2128,2129],"code",{},"10 萬 ÷ (5,000 − 370) ≈ 22 個月","——那是每月十億 token 的量才成立。對絕大多數中小企業，這個量級不會出現。",[111,2132,2133],{},"那自架還有什麼意義？三個：",[172,2135,2136,2142,2148],{},[175,2137,2138,2141],{},[137,2139,2140],{},"隱私","：資料不出門。這是最難用錢換的",[175,2143,2144,2147],{},[137,2145,2146],{},"離線","：工廠、船上、沒有網路的現場",[175,2149,2150,2153],{},[137,2151,2152],{},"不受限","：不用擔心費率調整、政策變更、API 下架",[111,2155,2156],{},"如果你不屬於這三種，用 API 就好，而且會用得比自架開心。",[157,2158,2159],{"id":2159},"真正的重點",[111,2161,2162],{},"這篇想說的不是「125B 好強」。",[111,2164,2165,2166,2169],{},"是",[137,2167,2168],{},"模型大小已經不能拿來判斷硬體需求了","。同樣 125B，你可以用 360GB 的伺服器跑，也可以用 12GB 的遊戲卡跑——差別只在於有沒有人幫你把記憶體階層調度好。",[111,2171,2172,2173,2176,2177,2181],{},"這也是我們做",[118,2174,2175],{"href":916},"地端部署","時真正在處理的問題：不是「這顆模型跑不跑得動」，而是「你的瓶頸在哪一層」。我們在",[118,2178,2180],{"href":2179},"\u002Fwork\u002Fembedded-vision-background","資源受限裝置","上累積的經驗，換到 LLM 上其實是同一件事。",[111,2183,2184],{},"如果你正在評估要不要自架，先問三個問題：",[851,2186,2187,2193,2199],{},[175,2188,2189,2192],{},[137,2190,2191],{},"每月 token 量有沒有到億級？"," 沒有，API 幾乎一定更划算。",[175,2194,2195,2198],{},[137,2196,2197],{},"資料能不能出門？"," 不能，才輪到自架。",[175,2200,2201,2204],{},[137,2202,2203],{},"有沒有 64GB 記憶體與一張 12GB 以上的卡？"," 沒有，連門檻都不到。",[111,2206,2207],{},"三題有兩題是「否」，答案就是 API。",{"title":923,"searchDepth":924,"depth":924,"links":2209},[2210,2211,2212,2213,2214,2215,2216,2217,2218,2219],{"id":1760,"depth":924,"text":1760},{"id":1785,"depth":924,"text":1786},{"id":1809,"depth":924,"text":1810},{"id":1826,"depth":924,"text":1827},{"id":1907,"depth":924,"text":1908},{"id":1917,"depth":924,"text":1917},{"id":2003,"depth":924,"text":2003},{"id":2024,"depth":924,"text":2024},{"id":2050,"depth":924,"text":2051},{"id":2159,"depth":924,"text":2159},"\u002Fimages\u002Fblog\u002Fstrata-125b-on-12gb.svg","125B 模型跑在 12GB 顯卡上的示意圖","2026-10-24","Strata 讓 125B 的 Qwen3.8-Flash-Next 跑在 12GB 顯卡的遊戲機上，解碼 94 tok\u002Fs。拆解它靠什麼做到、代價在哪裡，以及中小企業該不該自架。",{},"\u002Fimages\u002Fblog\u002Fstrata-125b-on-12gb.jpg","\u002Fblog\u002Fzh-tw\u002Fstrata-125b-on-12gb",{"title":1738,"description":2223},"strata-125b-on-12gb","blog\u002Fzh-TW\u002Fstrata-125b-on-12gb",[949,2231,952],"qwen","AzAFYoV9JKM6X1-qHOAhv64-PaZVkfvITS_J8_39_Oc",{"id":2234,"title":2235,"author":103,"body":2236,"cover":3171,"coverAlt":3172,"date":3173,"description":3174,"draft":938,"extension":939,"featured":938,"lang":940,"meta":3175,"navigation":942,"ogImage":3176,"path":3177,"seo":3178,"slug":3179,"stem":3180,"tags":3181,"translationKey":3179,"updated":953,"__hash__":3185},"blog\u002Fblog\u002Fzh-TW\u002Flfm3-128k-kv-cache.md","128K 上下文，1.6 GB 的 KV cache",{"type":105,"value":2237,"toc":3161},[2238,2255,2258,2261,2264,2267,2270,2273,2277,2280,2283,2286,2289,2292,2295,2298,2302,2305,2379,2382,2385,2388,2391,2394,2409,2415,2430,2433,2440,2444,2504,2507,2510,2513,2516,2519,2522,2530,2533,2540,2544,2547,2550,2553,2560,2563,2566,2753,2756,2759,2762,2765,2768,2869,2872,2875,2878,2881,2884,2887,2890,2896,2899,2902,2906,2909,2981,2984,2987,2990,2993,2996,2999,3002,3008,3011,3014,3018,3021,3030,3036,3039,3045,3048,3052,3055,3061,3067,3078,3084,3087,3093,3096,3128,3131,3151,3158],[108,2239,2240,2243],{},[111,2241,2242],{},"數字來自 Liquid AI 2026-10-27 的官方部落格與 model card。我們沒有獨立重跑這兩個模型，官方選的對照組也是他們自己挑的。文裡的平均分、百分比、倍數與差值，都是我們拿官方數字自己算的；任何人都能拿同一張表驗算。",[111,2244,2245,2246,2251,2252],{},"官方原文：",[118,2247,2250],{"href":2248,"rel":2249},"https:\u002F\u002Fwww.liquid.ai\u002Fblog\u002Flfm3",[122],"Introducing LFM3","｜權重：Hugging Face 的 ",[2127,2253,2254],{},"LiquidAI\u002FLFM3-*",[111,2256,2257],{},"一個 agent，前面掛著 128K 的 context。整份 repo、一整本操作手冊、一整天的工具輸出。",[111,2259,2260],{},"它跑在手機上、跑在 Raspberry Pi 5 上、跑在一台沒有獨顯的筆電上。那份 context 的 KV cache 帳單是 1.6 GB，權重另計。",[111,2262,2263],{},"這篇講三件事：這 1.6 GB 是怎麼換來的、那張成績單怎麼組成一個平均、還有它該被用在哪裡。",[111,2265,2266],{},"這是 LFM3-1.7B 的數字。同一個模型，官方那張表 29 列的平均是 49.37，贏過 Qwen3.5-9B 的 47.24。",[111,2268,2269],{},"1.7B 贏 9B，聽起來像架構革命。但把兩件事拆開，畫面會清楚很多。",[111,2271,2272],{},"它那 24 層裡，還有 6 層是普通的全域注意力。而那個平均分，是 29 列等權加起來的。拆開之後，它贏最多的幾項都在「聽話」這一軸，輸最多的幾項都跟知識與長距離有關。",[157,2274,2276],{"id":2275},"_128k-的帳單是一份-kv-cache","128K 的帳單，是一份 KV cache",[111,2278,2279],{},"先講一件大家都同意的事。",[111,2281,2282],{},"模型每生成一個 token，每個注意力層都要回頭看前面所有 token。重算太貴，所以把算過的中間結果存起來。那份東西叫 KV cache。",[111,2284,2285],{},"它跟四件事成正比：會寫 KV 的層數、context 長度、KV head 的數量、每個 head 的維度。每一層、每一個 KV head 的每一個 token，都要存 K 和 V 兩個向量。",[111,2287,2288],{},"所以「支援 128K」在產品頁是一行字，在記憶體裡是 GB 級。",[111,2290,2291],{},"官方給的對照很直接：同樣跑滿 128K，Qwen3.5-4B 的 KV cache 是 4.3 GB，MiniCPM5-2B 是 5.6 GB。",[111,2293,2294],{},"這對 agent 特別痛。工具輸出一段就是幾千 token，多輪之後 context 只增不減。而且你希望它一直在背景待著。",[111,2296,2297],{},"我認為長 context 的真正成本不是 prefill 那一次，是「你必須一直佔著那份記憶體」。手機上沒有這份預算，agent 就只能做短對話。",[157,2299,2301],{"id":2300},"它的做法24-層裡只有-6-層在算全域注意力","它的做法：24 層裡只有 6 層在算全域注意力",[111,2303,2304],{},"LFM3-1.7B 的 24 層不是同一種層。",[197,2306,2307,2326],{},[200,2308,2309],{},[203,2310,2311,2314,2317,2320,2323],{},[206,2312,2313],{},"算子",[206,2315,2316],{},"層數",[206,2318,2319],{},"看得到多遠",[206,2321,2322],{},"要存 KV 嗎",[206,2324,2325],{},"負責什麼",[219,2327,2328,2345,2362],{},[203,2329,2330,2333,2336,2339,2342],{},[224,2331,2332],{},"門控短卷積（kernel 7）",[224,2334,2335],{},"13",[224,2337,2338],{},"7 個 token",[224,2340,2341],{},"不用",[224,2343,2344],{},"局部模式：語法、詞序",[203,2346,2347,2350,2353,2356,2359],{},[224,2348,2349],{},"滑動視窗注意力（視窗 256）",[224,2351,2352],{},"5",[224,2354,2355],{},"最近 256 個",[224,2357,2358],{},"只存 256 個",[224,2360,2361],{},"段落內的關聯",[203,2363,2364,2367,2370,2373,2376],{},[224,2365,2366],{},"全域注意力",[224,2368,2369],{},"6",[224,2371,2372],{},"整個 context",[224,2374,2375],{},"要，而且隨 context 成長",[224,2377,2378],{},"「一萬個 token 之前那句話才是關鍵」的少數情況",[111,2380,2381],{},"表 1：LFM3-1.7B 的 24 層是怎麼組成的（官方部落格）",[111,2383,2384],{},"卷積沒有 key／value 表，它只有固定大小的 filter。所以那 13 層不寫 KV cache。",[111,2386,2387],{},"滑動視窗注意力有 KV，但只留最近 256 個 token，不隨 context 成長。",[111,2389,2390],{},"真正會膨脹的只有那 6 層全域注意力。",[111,2392,2393],{},"如圖 1，把 24 層排開，只有紅色的那幾層會跟著對話變長而變胖。",[2395,2396,2399,2400,2399,2405],"figure",{"className":2397},[2398],"article-figure","\n  ",[422,2401],{"src":2402,"alt":2403,"loading":2404},"\u002Fimages\u002Fblog\u002Flfm3-128k-kv-cache\u002Flayer-stack.svg","24 層堆疊：13 層門控短卷積、5 層滑動視窗注意力、6 層全域注意力，只有紅色的層會寫入隨 context 成長的 KV cache","lazy",[2406,2407,2408],"figcaption",{},"圖 1：24 層裡只有 6 層是全域注意力。KV cache 的成長只發生在紅色的層；黃色的只留 256 個 token，藍色的不存。層序官方沒公布，這張圖是按種類排的。",[111,2410,2411,2412,167],{},"這裡要停下來講清楚一件事：",[137,2413,2414],{},"這不是「取代 Transformer」",[111,2416,2417,2418,2423,2424,2429],{},"24 層裡有 6 層還是全域注意力，佔四分之一。我的讀法是，另外那 13 層卷積加 5 層 SWA，是把「大部分時候用不到全注意力」這件事寫進架構裡。",[118,2419,2422],{"href":2420,"rel":2421},"https:\u002F\u002Farxiv.org\u002Fabs\u002F2403.19887",[122],"Jamba","、",[118,2425,2428],{"href":2426,"rel":2427},"https:\u002F\u002Farxiv.org\u002Fabs\u002F2402.19427",[122],"Griffin"," 這些模型也走過同一條路，混合不是新發明。",[111,2431,2432],{},"不少轉貼把它寫成「非 Transformer 架構超越 Transformer」。把層數數一遍，會發現它只稀釋了注意力，沒有拿掉。",[111,2434,2435,2436,167],{},"還有一個小地方值得看。每一顆注意力頭的輸出都過一個 sigmoid 閘門，讓沒東西可加的頭關掉。官方說這「有助於」壓住激活值的離群點——那個東西正是",[118,2437,2439],{"href":2438},"\u002Fblog\u002Fbroken-on-arrival-quantized-models","量化最怕的",[157,2441,2443],{"id":2442},"換到的是128k-只要-16-gb","換到的是：128K 只要 1.6 GB",[197,2445,2446,2461],{},[200,2447,2448],{},[203,2449,2450,2452,2455,2458],{},[206,2451,301],{},[206,2453,2454],{},"參數",[206,2456,2457],{},"跑滿 128K 的 KV cache",[206,2459,2460],{},"相對 LFM3",[219,2462,2463,2476,2490],{},[203,2464,2465,2468,2471,2474],{},[224,2466,2467],{},"LFM3-1.7B",[224,2469,2470],{},"1.7B",[224,2472,2473],{},"1.6 GB",[224,2475,502],{},[203,2477,2478,2481,2484,2487],{},[224,2479,2480],{},"Qwen3.5-4B",[224,2482,2483],{},"4.7B",[224,2485,2486],{},"4.3 GB",[224,2488,2489],{},"2.7×",[203,2491,2492,2495,2498,2501],{},[224,2493,2494],{},"MiniCPM5-2B",[224,2496,2497],{},"2.5B",[224,2499,2500],{},"5.6 GB",[224,2502,2503],{},"3.5×",[111,2505,2506],{},"表 2：128K context 的 KV cache（官方數字，同一個測法）",[111,2508,2509],{},"換算一下：1.6 GB 是 Qwen3.5-4B 的 37%、MiniCPM5-2B 的 29%。",[111,2511,2512],{},"同樣跑滿 128K，它不是少一點，是差了一個檔次。KV cache 跟 context 大致成正比（近似：那 5 層滑動視窗有固定的 256 個 token，短 context 時佔比會變大），所以你只要知道 128K 這一格，其他長度可以按比例推。",[111,2514,2515],{},"省下來的不是壓縮率，是「需要存的東西本來就比較少」。",[111,2517,2518],{},"這個差別在裝置端很明顯。官方在手機、Raspberry Pi 5 與筆電上量，LFM3-1.7B 的解碼速度是對手裡面最快的，快 1.8 到 2.8 倍，而且記憶體用得最少。",[111,2520,2521],{},"條件要標清楚：那是 llama.cpp、Q4_0 量化、32K context 的數字。不要跟 128K 的 KV 數字混在一起講。",[111,2523,2524,2525,2529],{},"還有規模：它不只是一個文字模型。同一個 LFM3-1.7B-Base 骨幹，長出六個約 2B 的模型——文字、視覺、音訊、omni，再加兩個只負責做判斷的決策模型。這跟",[118,2526,2528],{"href":2527},"\u002Fblog\u002Fshared-trunk-four-modalities","一個骨幹四個模態","是同一個思路，只是做在 2B 的尺寸上。",[111,2531,2532],{},"預訓練用了 22T tokens，詞表 128K、沿用 LFM2.5-8B-A1B，官方說對非拉丁文字的分詞效率比較好。中訓練那 3.5T tokens 把 context window 拉到了 256K。",[111,2534,2535,2536,2539],{},"注意這裡有兩個數字：模型支援 256K，但 1.6 GB 是 ",[137,2537,2538],{},"128K"," 的 KV cache。不要混。",[157,2541,2543],{"id":2542},"但那個平均分是-29-列等權加起來的","但那個平均分，是 29 列等權加起來的",[111,2545,2546],{},"官方那張表有 29 列，平均 49.37 對 47.24。",[111,2548,2549],{},"乍看之下沒什麼好爭的。但我想知道那個平均是怎麼算的，所以把 29 列自己平均了一次。",[111,2551,2552],{},"結果是 49.37 與 47.24，跟官方印的一模一樣。",[111,2554,2555,2556,2559],{},"也就是說它是",[137,2557,2558],{},"等權平均","：IFBench 跟 SWE-bench 各佔 1\u002F29，不管那個任務重不重要。",[111,2561,2562],{},"29 列也不是 29 個測驗。Claw-Eval 佔兩列、Humanity's Last Exam 佔兩列、AA-Omniscience 佔三列，扣掉重複是 25 個。這個數字後面還會用到。",[111,2564,2565],{},"那就有意思了。把 29 列按差距排開，最明顯的十二項長這樣：",[197,2567,2568,2583],{},[200,2569,2570],{},[203,2571,2572,2575,2577,2580],{},[206,2573,2574],{},"項目",[206,2576,2467],{},[206,2578,2579],{},"Qwen3.5-9B",[206,2581,2582],{},"差",[219,2584,2585,2599,2613,2627,2641,2655,2669,2683,2697,2711,2725,2739],{},[203,2586,2587,2590,2593,2596],{},[224,2588,2589],{},"AutomationBench",[224,2591,2592],{},"41.29",[224,2594,2595],{},"15.10",[224,2597,2598],{},"+26.19",[203,2600,2601,2604,2607,2610],{},[224,2602,2603],{},"IFBench",[224,2605,2606],{},"73.03",[224,2608,2609],{},"48.84",[224,2611,2612],{},"+24.19",[203,2614,2615,2618,2621,2624],{},[224,2616,2617],{},"LiveClaw",[224,2619,2620],{},"45.60",[224,2622,2623],{},"35.77",[224,2625,2626],{},"+9.83",[203,2628,2629,2632,2635,2638],{},[224,2630,2631],{},"WebArena-Verified",[224,2633,2634],{},"38.42",[224,2636,2637],{},"28.94",[224,2639,2640],{},"+9.48",[203,2642,2643,2646,2649,2652],{},[224,2644,2645],{},"BFCL V4（工具呼叫）",[224,2647,2648],{},"71.39",[224,2650,2651],{},"62.83",[224,2653,2654],{},"+8.56",[203,2656,2657,2660,2663,2666],{},[224,2658,2659],{},"IFEval",[224,2661,2662],{},"96.66",[224,2664,2665],{},"92.08",[224,2667,2668],{},"+4.58",[203,2670,2671,2674,2677,2680],{},[224,2672,2673],{},"RULER 128K",[224,2675,2676],{},"65.56",[224,2678,2679],{},"87.11",[224,2681,2682],{},"−21.55",[203,2684,2685,2688,2691,2694],{},[224,2686,2687],{},"GPQA Diamond",[224,2689,2690],{},"63.37",[224,2692,2693],{},"80.40",[224,2695,2696],{},"−17.03",[203,2698,2699,2702,2705,2708],{},[224,2700,2701],{},"SWE-bench Multilingual",[224,2703,2704],{},"23.00",[224,2706,2707],{},"35.00",[224,2709,2710],{},"−12.00",[203,2712,2713,2716,2719,2722],{},[224,2714,2715],{},"MCP-Atlas",[224,2717,2718],{},"32.57",[224,2720,2721],{},"42.67",[224,2723,2724],{},"−10.10",[203,2726,2727,2730,2733,2736],{},[224,2728,2729],{},"Humanity's Last Exam",[224,2731,2732],{},"7.17",[224,2734,2735],{},"16.41",[224,2737,2738],{},"−9.24",[203,2740,2741,2744,2747,2750],{},[224,2742,2743],{},"SWE-bench Verified",[224,2745,2746],{},"43.40",[224,2748,2749],{},"51.20",[224,2751,2752],{},"−7.80",[111,2754,2755],{},"表 3：29 列裡差距最明顯的十二項（我挑的；前六項是它贏的，後六項是它輸的）",[111,2757,2758],{},"上面六項是「照格式做」、「把工具呼叫對」、「在網頁上把流程點完」。下面六項是「懂多少」、「記得多久」、「會不會真的改程式」。",[111,2760,2761],{},"不過這張表是我挑的，不是全部。全表最大的兩個差距反而不在上面：AA-Omniscience 的「不亂講」是 +40.3（92.93 對 52.59），原始分數是 +28.5。它們就落在「知識」那一區。",[111,2763,2764],{},"但那兩格測的不是知識存量，是校準。「不會的題目就說不會」是後訓練塑形出來的行為，跟 GPQA 上能不能答對是兩件事。這一格它大贏，講的是紀律，不是學問。",[111,2766,2767],{},"再換幾種切法，看得更清楚：",[197,2769,2770,2784],{},[200,2771,2772],{},[203,2773,2774,2777,2780,2782],{},[206,2775,2776],{},"切法",[206,2778,2779],{},"列數",[206,2781,2467],{},[206,2783,2579],{},[219,2785,2786,2800,2814,2828,2842,2856],{},[203,2787,2788,2791,2794,2797],{},[224,2789,2790],{},"官方 Average",[224,2792,2793],{},"29",[224,2795,2796],{},"49.37",[224,2798,2799],{},"47.24",[203,2801,2802,2805,2808,2811],{},[224,2803,2804],{},"行為類（agent 7 + 工具 4 + 指令遵循 4）",[224,2806,2807],{},"15",[224,2809,2810],{},"61.03",[224,2812,2813],{},"55.25",[203,2815,2816,2819,2822,2825],{},[224,2817,2818],{},"其餘 14 列（coding 6 + 知識 6 + 長 context 2）",[224,2820,2821],{},"14",[224,2823,2824],{},"36.88",[224,2826,2827],{},"38.66",[203,2829,2830,2833,2836,2839],{},[224,2831,2832],{},"　其中 agentic coding",[224,2834,2835],{},"3",[224,2837,2838],{},"26.44",[224,2840,2841],{},"34.73",[203,2843,2844,2847,2850,2853],{},[224,2845,2846],{},"　其中長 context",[224,2848,2849],{},"2",[224,2851,2852],{},"59.20",[224,2854,2855],{},"74.56",[203,2857,2858,2861,2864,2866],{},[224,2859,2860],{},"拿掉 AA-Omniscience 的三列",[224,2862,2863],{},"26",[224,2865,2749],{},[224,2867,2868],{},"51.24",[111,2870,2871],{},"表 4：同一張成績單，幾種切法（除了官方那一列，都是我拿官方數字算的）",[111,2873,2874],{},"行為類佔了 15 列，超過一半的權重。那 15 列裡它贏 11 列。",[111,2876,2877],{},"最後一列是我覺得最值得看的一格。AA-Omniscience 那一份考卷在表裡佔了三列：原始分數（0.50 對 −28.00）、準確率（7.07 對 13.17）、不亂講的比例（92.93 對 52.59）。同一份考卷的三個切面，各拿一票。",[111,2879,2880],{},"三列合起來，替 LFM3 貢獻了 +62.7 的百分點差——整張表的總差距只有 +61.7。全部拿掉，剩下 26 列是 51.20 對 51.24，差距從 +2.13 變成 −0.04。",[111,2882,2883],{},"不過只拿掉一列，結論就反過來：領先還在 +0.8 到 +2.4 分之間。所以「三列扛起全部差距」只在三列一起拿掉時成立，這點要說清楚。",[111,2885,2886],{},"真正該挑的也不是重複計列，是符號。−28.00 是一個可以負分的指數，不是百分比；它跟一票百分比放進同一個平均，光這一列就把 Qwen 的平均往下拖了將近一分。",[111,2888,2889],{},"我沒有要說官方算錯。等權平均就是這樣，隨便換一個 benchmark 進來，結論就會動。而且那三列是官方挑的，還是那家評測自己的報表就長這樣，我從表上分不出來。",[111,2891,2892,2893],{},"我想說的是另一件事：",[137,2894,2895],{},"平均是一個設計選擇，不是一個結論。",[111,2897,2898],{},"而且它不是全面贏。工具呼叫看起來是它的強項，但 MCP-Atlas 輸 10.1 分；agentic coding 三項全輸，SWE-bench Multilingual 輸 12 分。",[111,2900,2901],{},"官方自己寫得很清楚（原文是 \"Larger models still win on agentic coding and knowledge, where size matters most\"）：更大的模型在 agentic coding 與知識上仍然勝出，那是規模最吃重的地方。",[157,2903,2905],{"id":2904},"行為可以教知識不能","行為可以教，知識不能",[111,2907,2908],{},"為什麼成分會長成這樣？看它怎麼訓練的就懂了。",[197,2910,2911,2924],{},[200,2912,2913],{},[203,2914,2915,2918,2921],{},[206,2916,2917],{},"階段",[206,2919,2920],{},"規模",[206,2922,2923],{},"在做什麼",[219,2925,2926,2937,2948,2959,2970],{},[203,2927,2928,2931,2934],{},[224,2929,2930],{},"預訓練",[224,2932,2933],{},"22T tokens",[224,2935,2936],{},"通用知識；最後 3.5T 是中訓練，把 context 拉到 256K",[203,2938,2939,2942,2945],{},[224,2940,2941],{},"SFT",[224,2943,2944],{},"1.75T tokens",[224,2946,2947],{},"對話、推理、工具呼叫、agent 軌跡",[203,2949,2950,2953,2956],{},[224,2951,2952],{},"混合 RL",[224,2954,2955],{},"多領域同時",[224,2957,2958],{},"數學、程式、SQL、結構化輸出，獎勵裡帶長度懲罰",[203,2960,2961,2964,2967],{},[224,2962,2963],{},"MOPD 蒸餾",[224,2965,2966],{},"6 個專科老師",[224,2968,2969],{},"把 code、math、tool、long-context、agentic、enterprise 蒸餾回一個模型",[203,2971,2972,2975,2978],{},[224,2973,2974],{},"Agentic RL",[224,2976,2977],{},"真的 harness",[224,2979,2980],{},"從網頁瀏覽到辦公流程，在真的 agent 環境裡跑",[111,2982,2983],{},"表 5：官方公布的四個後訓練階段（表列五列，第一列是預訓練）",[111,2985,2986],{},"「照 IFBench 的格式回答」是一種行為。行為可以示範、可以給獎勵、可以從老師那裡蒸餾。1.75T tokens 的 SFT 專門在做這件事。",[111,2988,2989],{},"「GPQA 上答對」需要的是知識。我的讀法是，知識只能從預訓練來，而知識密度跟參數量綁在一起。22T tokens 已經非常多了，還是填不滿 1.7B 的容量。",[111,2991,2992],{},"所以那張成績單其實很一致。它在「行為」這一軸超車，在「知識」這一軸停在 2B 該有的位置。",[111,2994,2995],{},"長 context 也是同一件事的兩面。它省的是記憶體，不是理解力。RULER 128K 只有 65.56，Qwen3.5-9B 是 87.11。塞得進去跟用得起來是兩件事。",[111,2997,2998],{},"官方還提了一個有趣的方向：加搜尋之後，Humanity's Last Exam 從 7.17 變 13.90，幾乎翻倍。對 Qwen3.5-9B 的差距從 −9.2 縮到 −3.6。",[111,3000,3001],{},"差距縮小了，但沒有追過。知識的缺口可以用工具補一部分，補不完。",[111,3003,3004,3005],{},"對選型的人來說，這推出一條很實用的問句：",[137,3006,3007],{},"你那個任務是行為題，還是知識題？",[111,3009,3010],{},"要它照固定格式填表、把工具呼叫排對、在網頁上點完五步——這是行為題，1.7B 值得試。",[111,3012,3013],{},"要它回答「這個 API 的第三個參數預設值是什麼」、要它讀完 50 頁合約再挑出矛盾。這是知識題：2B 會讓你在某個下午發現，它講得很順，但錯了。",[157,3015,3017],{"id":3016},"液態是-2020-年的事","「液態」是 2020 年的事",[111,3019,3020],{},"它的名字來自 Liquid Neural Network。這個名字有來歷，但跟現在的架構已經脫鉤。",[111,3022,3023,3024,3029],{},"2020 年 6 月，",[118,3025,3028],{"href":3026,"rel":3027},"https:\u002F\u002Farxiv.org\u002Fabs\u002F2006.04439",[122],"Liquid Time-constant Networks"," 的論文上線，2021 年刊在 AAAI。作者是 Ramin Hasani、Mathias Lechner、Alexander Amini、Daniela Rus、Radu Grosu 五個人。2023 年，其中幾位從 MIT CSAIL 出來成立 Liquid AI。所以「液態」是公司血統，不是行銷話術。",[111,3031,3032,3033,167],{},"但看 LFM3 官方怎麼描述架構。他們說 LFM2 證明了「短卷積加注意力的混合」可以在裝置端跑得快，而那個設計",[137,3034,3035],{},"來自自動化的硬體迴路架構搜尋",[111,3037,3038],{},"LFM3 只是把搜尋的範圍擴大：LFM2 時是「一支手機加一台筆電」當硬體在環，LFM3 擴到 14 種裝置與後端組合——三星 Galaxy S26 Ultra、OnePlus 15、Raspberry Pi 5、Apple M4 Max、AMD Ryzen AI、Arm 與 x86 雲端 CPU，還有 GPU 與 Qualcomm Hexagon NPU。",[111,3040,3041,3042],{},"所以正確的說法是：",[137,3043,3044],{},"名字來自歷史，架構來自搜尋。",[111,3046,3047],{},"不是「掛羊頭賣狗肉」。一家公司保留自己的研究血統當名字，這種事很常見。但如果你是因為「液態神經網路」這五個字點進來，要知道裡面沒有那個機制。",[157,3049,3051],{"id":3050},"所以它適合誰什麼時候不適合","所以它適合誰，什麼時候不適合",[111,3053,3054],{},"三種人，三種結論。",[111,3056,3057,3060],{},[137,3058,3059],{},"如果你在裝置端跑 agent","，它是目前這個尺寸裡最值得試的之一。1.6 GB 的 128K context、BFCL 71.39 的工具呼叫、解碼快 1.8 到 2.8 倍，而且六個模型共用同一個骨幹——文字、視覺、音訊可以只載入你要的那一個。",[111,3062,3063,3066],{},[137,3064,3065],{},"如果你有一個很窄的任務","，它可能是整篇裡最實際的用法。官方的示範是在視覺版的 LFM3-VL-2B 上做的（不是上面那個文字模型），題目是風機葉片瑕疵偵測：",[172,3068,3069,3072,3075],{},[175,3070,3071],{},"約 3,000 張公開照片（WTBs2025），SFT 加 GRPO，一張 A100 跑幾小時",[175,3073,3074],{},"在約 1,400 張沒看過的照片上測：分類準確率 67%，偵測 F1 從 0.003 到 0.11",[175,3076,3077],{},"對照的 GPT-6 Luna 是零樣本（沒有微調），F1 0.01",[111,3079,3080,3081,167],{},"但這裡有一個很容易被略過的數字：",[137,3082,3083],{},"開箱狀態下，兩個模型只在不到一成的照片上答對",[111,3085,3086],{},"所以 0.003 到 0.11 是「從幾乎不能用，到勉強可用」，不是「從好到更好」。這是官方自己做的實驗，不是第三方複現。",[111,3088,3089,3092],{},[137,3090,3091],{},"如果你要的是通用知識助手","，它不適合。HLE 7.17、GPQA 63.37、RULER 65.56，這三項就是天花板。",[111,3094,3095],{},"還有幾件該知道的事：",[172,3097,3098,3104,3110,3116,3122],{},[175,3099,3100,3103],{},[137,3101,3102],{},"對照組是 Liquid AI 自己選的。"," 沒有第三方複現，也沒有獨立重跑",[175,3105,3106,3109],{},[137,3107,3108],{},"那個平均是等權的。"," 你關心的那一項可能只佔 1\u002F29",[175,3111,3112,3115],{},[137,3113,3114],{},"省的是記憶體，不是長 context 的能力。"," RULER 65.56 對 87.11",[175,3117,3118,3121],{},[137,3119,3120],{},"開放權重不等於隨便用。"," 授權是 LFM Open License v1.0，商用前自己讀一遍",[175,3123,3124,3127],{},[137,3125,3126],{},"六個模型都是從同一個 base 分支出去的。"," 想換模態不是換一套架構，是換一組權重",[157,3129,3130],{"id":3130},"明天可以做的三件事",[851,3132,3133,3139,3145],{},[175,3134,3135,3138],{},[137,3136,3137],{},"下次看到 benchmark 平均，先數列數。"," 官方那張表 29 列，平均是等權的；你能重算一次，就知道那 2.13 分是由哪幾列構成的。這個動作花五分鐘，比讀十篇評測有用。",[175,3140,3141,3144],{},[137,3142,3143],{},"算一次你自己的 KV 帳單。"," 式子長這樣：token 數 × 會寫 KV 的層數 × KV head 數 × 每個 head 的維度 × 2（K 跟 V 各一份）× 每個元素的 byte 數。這幾個數都在模型的 config 裡。如果你的情境只需要 8K context，那 1.6 GB 對你就沒有意義——按比例大約是 100 MB。",[175,3146,3147,3150],{},[137,3148,3149],{},"如果你的任務很窄，拿 2B 級模型微調一次。"," 一張 A100、幾小時、幾千張照片，這是現在做得到的規模。效果不會是全能的，但可能剛好夠用。",[111,3152,3153,3154,3157],{},"如果你只是想在自己機器上跑大模型，先看",[118,3155,3156],{"href":899},"125B 怎麼跑在 12GB 顯卡上","。那是另一條路：不改模型，改誰在什麼時候被載入。",[111,3159,3160],{},"規模沒有消失，它換了位置。從「你買得到的 GPU」，搬到「你調得動的任務」。",{"title":923,"searchDepth":924,"depth":924,"links":3162},[3163,3164,3165,3166,3167,3168,3169,3170],{"id":2275,"depth":924,"text":2276},{"id":2300,"depth":924,"text":2301},{"id":2442,"depth":924,"text":2443},{"id":2542,"depth":924,"text":2543},{"id":2904,"depth":924,"text":2905},{"id":3016,"depth":924,"text":3017},{"id":3050,"depth":924,"text":3051},{"id":3130,"depth":924,"text":3130},"\u002Fimages\u002Fblog\u002Flfm3-128k-kv-cache.svg","標題「128K 上下文，1.6 GB 的 KV cache」的技術筆記封面","2026-11-22","LFM3-1.7B 支援 256K 上下文，跑滿 128K 只要 1.6 GB 的 KV cache——是 Qwen3.5-4B 的 37%。做法是 24 層裡只留 6 層全域注意力。但官方那張成績單 29 列的平均，我重算過是等權的；拆開來它贏在指令遵循與工具呼叫，輸在知識、長上下文與 agentic coding。",{},"\u002Fimages\u002Fblog\u002Flfm3-128k-kv-cache.jpg","\u002Fblog\u002Fzh-tw\u002Flfm3-128k-kv-cache",{"title":2235,"description":3174},"lfm3-128k-kv-cache","blog\u002Fzh-TW\u002Flfm3-128k-kv-cache",[949,3182,3183,3184],"kv-cache","model-design","evaluation","hfBq0Y8fXZV3FWUPNsI7QmsNGCCT1p1SKyNmccTxxcs",1795500239463]