[{"data":1,"prerenderedAt":3624},["ShallowReactive",2],{"site-info":3,"post-lfm3-128k-kv-cache":99,"related-zh-TW-lfm3-128k-kv-cache":1936},{"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":1084},{"id":101,"title":102,"author":103,"body":104,"cover":1063,"coverAlt":1064,"date":1065,"description":1066,"draft":1067,"extension":1068,"featured":1067,"lang":1069,"meta":1070,"navigation":1071,"ogImage":1072,"path":1073,"seo":1074,"slug":1075,"stem":1076,"tags":1077,"translationKey":1075,"updated":1082,"__hash__":1083},"blog\u002Fblog\u002Fzh-TW\u002Flfm3-128k-kv-cache.md","128K 上下文，1.6 GB 的 KV cache","Jecision",{"type":105,"value":106,"toc":1051},"minimark",[107,129,132,135,138,141,144,147,152,155,158,161,164,167,170,173,177,180,260,263,266,269,272,275,291,299,314,317,324,328,390,393,396,399,402,405,408,416,419,426,430,433,436,439,446,449,452,639,642,645,648,651,654,755,758,761,764,767,770,773,776,782,785,788,792,795,867,870,873,876,879,882,885,888,894,897,900,904,907,916,922,925,931,934,938,941,947,953,966,972,975,981,984,1016,1019,1040,1048],[108,109,110,114],"blockquote",{},[111,112,113],"p",{},"數字來自 Liquid AI 2026-10-27 的官方部落格與 model card。我們沒有獨立重跑這兩個模型，官方選的對照組也是他們自己挑的。文裡的平均分、百分比、倍數與差值，都是我們拿官方數字自己算的；任何人都能拿同一張表驗算。",[111,115,116,117,124,125],{},"官方原文：",[118,119,123],"a",{"href":120,"rel":121},"https:\u002F\u002Fwww.liquid.ai\u002Fblog\u002Flfm3",[122],"nofollow","Introducing LFM3","｜權重：Hugging Face 的 ",[126,127,128],"code",{},"LiquidAI\u002FLFM3-*",[111,130,131],{},"一個 agent，前面掛著 128K 的 context。整份 repo、一整本操作手冊、一整天的工具輸出。",[111,133,134],{},"它跑在手機上、跑在 Raspberry Pi 5 上、跑在一台沒有獨顯的筆電上。那份 context 的 KV cache 帳單是 1.6 GB，權重另計。",[111,136,137],{},"這篇講三件事：這 1.6 GB 是怎麼換來的、那張成績單怎麼組成一個平均、還有它該被用在哪裡。",[111,139,140],{},"這是 LFM3-1.7B 的數字。同一個模型，官方那張表 29 列的平均是 49.37，贏過 Qwen3.5-9B 的 47.24。",[111,142,143],{},"1.7B 贏 9B，聽起來像架構革命。但把兩件事拆開，畫面會清楚很多。",[111,145,146],{},"它那 24 層裡，還有 6 層是普通的全域注意力。而那個平均分，是 29 列等權加起來的。拆開之後，它贏最多的幾項都在「聽話」這一軸，輸最多的幾項都跟知識與長距離有關。",[148,149,151],"h2",{"id":150},"_128k-的帳單是一份-kv-cache","128K 的帳單，是一份 KV cache",[111,153,154],{},"先講一件大家都同意的事。",[111,156,157],{},"模型每生成一個 token，每個注意力層都要回頭看前面所有 token。重算太貴，所以把算過的中間結果存起來。那份東西叫 KV cache。",[111,159,160],{},"它跟四件事成正比：會寫 KV 的層數、context 長度、KV head 的數量、每個 head 的維度。每一層、每一個 KV head 的每一個 token，都要存 K 和 V 兩個向量。",[111,162,163],{},"所以「支援 128K」在產品頁是一行字，在記憶體裡是 GB 級。",[111,165,166],{},"官方給的對照很直接：同樣跑滿 128K，Qwen3.5-4B 的 KV cache 是 4.3 GB，MiniCPM5-2B 是 5.6 GB。",[111,168,169],{},"這對 agent 特別痛。工具輸出一段就是幾千 token，多輪之後 context 只增不減。而且你希望它一直在背景待著。",[111,171,172],{},"我認為長 context 的真正成本不是 prefill 那一次，是「你必須一直佔著那份記憶體」。手機上沒有這份預算，agent 就只能做短對話。",[148,174,176],{"id":175},"它的做法24-層裡只有-6-層在算全域注意力","它的做法：24 層裡只有 6 層在算全域注意力",[111,178,179],{},"LFM3-1.7B 的 24 層不是同一種層。",[181,182,183,205],"table",{},[184,185,186],"thead",{},[187,188,189,193,196,199,202],"tr",{},[190,191,192],"th",{},"算子",[190,194,195],{},"層數",[190,197,198],{},"看得到多遠",[190,200,201],{},"要存 KV 嗎",[190,203,204],{},"負責什麼",[206,207,208,226,243],"tbody",{},[187,209,210,214,217,220,223],{},[211,212,213],"td",{},"門控短卷積（kernel 7）",[211,215,216],{},"13",[211,218,219],{},"7 個 token",[211,221,222],{},"不用",[211,224,225],{},"局部模式：語法、詞序",[187,227,228,231,234,237,240],{},[211,229,230],{},"滑動視窗注意力（視窗 256）",[211,232,233],{},"5",[211,235,236],{},"最近 256 個",[211,238,239],{},"只存 256 個",[211,241,242],{},"段落內的關聯",[187,244,245,248,251,254,257],{},[211,246,247],{},"全域注意力",[211,249,250],{},"6",[211,252,253],{},"整個 context",[211,255,256],{},"要，而且隨 context 成長",[211,258,259],{},"「一萬個 token 之前那句話才是關鍵」的少數情況",[111,261,262],{},"表 1：LFM3-1.7B 的 24 層是怎麼組成的（官方部落格）",[111,264,265],{},"卷積沒有 key／value 表，它只有固定大小的 filter。所以那 13 層不寫 KV cache。",[111,267,268],{},"滑動視窗注意力有 KV，但只留最近 256 個 token，不隨 context 成長。",[111,270,271],{},"真正會膨脹的只有那 6 層全域注意力。",[111,273,274],{},"如圖 1，把 24 層排開，只有紅色的那幾層會跟著對話變長而變胖。",[276,277,280,281,280,287],"figure",{"className":278},[279],"article-figure","\n  ",[282,283],"img",{"src":284,"alt":285,"loading":286},"\u002Fimages\u002Fblog\u002Flfm3-128k-kv-cache\u002Flayer-stack.svg","24 層堆疊：13 層門控短卷積、5 層滑動視窗注意力、6 層全域注意力，只有紅色的層會寫入隨 context 成長的 KV cache","lazy",[288,289,290],"figcaption",{},"圖 1：24 層裡只有 6 層是全域注意力。KV cache 的成長只發生在紅色的層；黃色的只留 256 個 token，藍色的不存。層序官方沒公布，這張圖是按種類排的。",[111,292,293,294,298],{},"這裡要停下來講清楚一件事：",[295,296,297],"strong",{},"這不是「取代 Transformer」","。",[111,300,301,302,307,308,313],{},"24 層裡有 6 層還是全域注意力，佔四分之一。我的讀法是，另外那 13 層卷積加 5 層 SWA，是把「大部分時候用不到全注意力」這件事寫進架構裡。",[118,303,306],{"href":304,"rel":305},"https:\u002F\u002Farxiv.org\u002Fabs\u002F2403.19887",[122],"Jamba","、",[118,309,312],{"href":310,"rel":311},"https:\u002F\u002Farxiv.org\u002Fabs\u002F2402.19427",[122],"Griffin"," 這些模型也走過同一條路，混合不是新發明。",[111,315,316],{},"不少轉貼把它寫成「非 Transformer 架構超越 Transformer」。把層數數一遍，會發現它只稀釋了注意力，沒有拿掉。",[111,318,319,320,298],{},"還有一個小地方值得看。每一顆注意力頭的輸出都過一個 sigmoid 閘門，讓沒東西可加的頭關掉。官方說這「有助於」壓住激活值的離群點——那個東西正是",[118,321,323],{"href":322},"\u002Fblog\u002Fbroken-on-arrival-quantized-models","量化最怕的",[148,325,327],{"id":326},"換到的是128k-只要-16-gb","換到的是：128K 只要 1.6 GB",[181,329,330,346],{},[184,331,332],{},[187,333,334,337,340,343],{},[190,335,336],{},"模型",[190,338,339],{},"參數",[190,341,342],{},"跑滿 128K 的 KV cache",[190,344,345],{},"相對 LFM3",[206,347,348,362,376],{},[187,349,350,353,356,359],{},[211,351,352],{},"LFM3-1.7B",[211,354,355],{},"1.7B",[211,357,358],{},"1.6 GB",[211,360,361],{},"1×",[187,363,364,367,370,373],{},[211,365,366],{},"Qwen3.5-4B",[211,368,369],{},"4.7B",[211,371,372],{},"4.3 GB",[211,374,375],{},"2.7×",[187,377,378,381,384,387],{},[211,379,380],{},"MiniCPM5-2B",[211,382,383],{},"2.5B",[211,385,386],{},"5.6 GB",[211,388,389],{},"3.5×",[111,391,392],{},"表 2：128K context 的 KV cache（官方數字，同一個測法）",[111,394,395],{},"換算一下：1.6 GB 是 Qwen3.5-4B 的 37%、MiniCPM5-2B 的 29%。",[111,397,398],{},"同樣跑滿 128K，它不是少一點，是差了一個檔次。KV cache 跟 context 大致成正比（近似：那 5 層滑動視窗有固定的 256 個 token，短 context 時佔比會變大），所以你只要知道 128K 這一格，其他長度可以按比例推。",[111,400,401],{},"省下來的不是壓縮率，是「需要存的東西本來就比較少」。",[111,403,404],{},"這個差別在裝置端很明顯。官方在手機、Raspberry Pi 5 與筆電上量，LFM3-1.7B 的解碼速度是對手裡面最快的，快 1.8 到 2.8 倍，而且記憶體用得最少。",[111,406,407],{},"條件要標清楚：那是 llama.cpp、Q4_0 量化、32K context 的數字。不要跟 128K 的 KV 數字混在一起講。",[111,409,410,411,415],{},"還有規模：它不只是一個文字模型。同一個 LFM3-1.7B-Base 骨幹，長出六個約 2B 的模型——文字、視覺、音訊、omni，再加兩個只負責做判斷的決策模型。這跟",[118,412,414],{"href":413},"\u002Fblog\u002Fshared-trunk-four-modalities","一個骨幹四個模態","是同一個思路，只是做在 2B 的尺寸上。",[111,417,418],{},"預訓練用了 22T tokens，詞表 128K、沿用 LFM2.5-8B-A1B，官方說對非拉丁文字的分詞效率比較好。中訓練那 3.5T tokens 把 context window 拉到了 256K。",[111,420,421,422,425],{},"注意這裡有兩個數字：模型支援 256K，但 1.6 GB 是 ",[295,423,424],{},"128K"," 的 KV cache。不要混。",[148,427,429],{"id":428},"但那個平均分是-29-列等權加起來的","但那個平均分，是 29 列等權加起來的",[111,431,432],{},"官方那張表有 29 列，平均 49.37 對 47.24。",[111,434,435],{},"乍看之下沒什麼好爭的。但我想知道那個平均是怎麼算的，所以把 29 列自己平均了一次。",[111,437,438],{},"結果是 49.37 與 47.24，跟官方印的一模一樣。",[111,440,441,442,445],{},"也就是說它是",[295,443,444],{},"等權平均","：IFBench 跟 SWE-bench 各佔 1\u002F29，不管那個任務重不重要。",[111,447,448],{},"29 列也不是 29 個測驗。Claw-Eval 佔兩列、Humanity's Last Exam 佔兩列、AA-Omniscience 佔三列，扣掉重複是 25 個。這個數字後面還會用到。",[111,450,451],{},"那就有意思了。把 29 列按差距排開，最明顯的十二項長這樣：",[181,453,454,469],{},[184,455,456],{},[187,457,458,461,463,466],{},[190,459,460],{},"項目",[190,462,352],{},[190,464,465],{},"Qwen3.5-9B",[190,467,468],{},"差",[206,470,471,485,499,513,527,541,555,569,583,597,611,625],{},[187,472,473,476,479,482],{},[211,474,475],{},"AutomationBench",[211,477,478],{},"41.29",[211,480,481],{},"15.10",[211,483,484],{},"+26.19",[187,486,487,490,493,496],{},[211,488,489],{},"IFBench",[211,491,492],{},"73.03",[211,494,495],{},"48.84",[211,497,498],{},"+24.19",[187,500,501,504,507,510],{},[211,502,503],{},"LiveClaw",[211,505,506],{},"45.60",[211,508,509],{},"35.77",[211,511,512],{},"+9.83",[187,514,515,518,521,524],{},[211,516,517],{},"WebArena-Verified",[211,519,520],{},"38.42",[211,522,523],{},"28.94",[211,525,526],{},"+9.48",[187,528,529,532,535,538],{},[211,530,531],{},"BFCL V4（工具呼叫）",[211,533,534],{},"71.39",[211,536,537],{},"62.83",[211,539,540],{},"+8.56",[187,542,543,546,549,552],{},[211,544,545],{},"IFEval",[211,547,548],{},"96.66",[211,550,551],{},"92.08",[211,553,554],{},"+4.58",[187,556,557,560,563,566],{},[211,558,559],{},"RULER 128K",[211,561,562],{},"65.56",[211,564,565],{},"87.11",[211,567,568],{},"−21.55",[187,570,571,574,577,580],{},[211,572,573],{},"GPQA Diamond",[211,575,576],{},"63.37",[211,578,579],{},"80.40",[211,581,582],{},"−17.03",[187,584,585,588,591,594],{},[211,586,587],{},"SWE-bench Multilingual",[211,589,590],{},"23.00",[211,592,593],{},"35.00",[211,595,596],{},"−12.00",[187,598,599,602,605,608],{},[211,600,601],{},"MCP-Atlas",[211,603,604],{},"32.57",[211,606,607],{},"42.67",[211,609,610],{},"−10.10",[187,612,613,616,619,622],{},[211,614,615],{},"Humanity's Last Exam",[211,617,618],{},"7.17",[211,620,621],{},"16.41",[211,623,624],{},"−9.24",[187,626,627,630,633,636],{},[211,628,629],{},"SWE-bench Verified",[211,631,632],{},"43.40",[211,634,635],{},"51.20",[211,637,638],{},"−7.80",[111,640,641],{},"表 3：29 列裡差距最明顯的十二項（我挑的；前六項是它贏的，後六項是它輸的）",[111,643,644],{},"上面六項是「照格式做」、「把工具呼叫對」、「在網頁上把流程點完」。下面六項是「懂多少」、「記得多久」、「會不會真的改程式」。",[111,646,647],{},"不過這張表是我挑的，不是全部。全表最大的兩個差距反而不在上面：AA-Omniscience 的「不亂講」是 +40.3（92.93 對 52.59），原始分數是 +28.5。它們就落在「知識」那一區。",[111,649,650],{},"但那兩格測的不是知識存量，是校準。「不會的題目就說不會」是後訓練塑形出來的行為，跟 GPQA 上能不能答對是兩件事。這一格它大贏，講的是紀律，不是學問。",[111,652,653],{},"再換幾種切法，看得更清楚：",[181,655,656,670],{},[184,657,658],{},[187,659,660,663,666,668],{},[190,661,662],{},"切法",[190,664,665],{},"列數",[190,667,352],{},[190,669,465],{},[206,671,672,686,700,714,728,742],{},[187,673,674,677,680,683],{},[211,675,676],{},"官方 Average",[211,678,679],{},"29",[211,681,682],{},"49.37",[211,684,685],{},"47.24",[187,687,688,691,694,697],{},[211,689,690],{},"行為類（agent 7 + 工具 4 + 指令遵循 4）",[211,692,693],{},"15",[211,695,696],{},"61.03",[211,698,699],{},"55.25",[187,701,702,705,708,711],{},[211,703,704],{},"其餘 14 列（coding 6 + 知識 6 + 長 context 2）",[211,706,707],{},"14",[211,709,710],{},"36.88",[211,712,713],{},"38.66",[187,715,716,719,722,725],{},[211,717,718],{},"　其中 agentic coding",[211,720,721],{},"3",[211,723,724],{},"26.44",[211,726,727],{},"34.73",[187,729,730,733,736,739],{},[211,731,732],{},"　其中長 context",[211,734,735],{},"2",[211,737,738],{},"59.20",[211,740,741],{},"74.56",[187,743,744,747,750,752],{},[211,745,746],{},"拿掉 AA-Omniscience 的三列",[211,748,749],{},"26",[211,751,635],{},[211,753,754],{},"51.24",[111,756,757],{},"表 4：同一張成績單，幾種切法（除了官方那一列，都是我拿官方數字算的）",[111,759,760],{},"行為類佔了 15 列，超過一半的權重。那 15 列裡它贏 11 列。",[111,762,763],{},"最後一列是我覺得最值得看的一格。AA-Omniscience 那一份考卷在表裡佔了三列：原始分數（0.50 對 −28.00）、準確率（7.07 對 13.17）、不亂講的比例（92.93 對 52.59）。同一份考卷的三個切面，各拿一票。",[111,765,766],{},"三列合起來，替 LFM3 貢獻了 +62.7 的百分點差——整張表的總差距只有 +61.7。全部拿掉，剩下 26 列是 51.20 對 51.24，差距從 +2.13 變成 −0.04。",[111,768,769],{},"不過只拿掉一列，結論就反過來：領先還在 +0.8 到 +2.4 分之間。所以「三列扛起全部差距」只在三列一起拿掉時成立，這點要說清楚。",[111,771,772],{},"真正該挑的也不是重複計列，是符號。−28.00 是一個可以負分的指數，不是百分比；它跟一票百分比放進同一個平均，光這一列就把 Qwen 的平均往下拖了將近一分。",[111,774,775],{},"我沒有要說官方算錯。等權平均就是這樣，隨便換一個 benchmark 進來，結論就會動。而且那三列是官方挑的，還是那家評測自己的報表就長這樣，我從表上分不出來。",[111,777,778,779],{},"我想說的是另一件事：",[295,780,781],{},"平均是一個設計選擇，不是一個結論。",[111,783,784],{},"而且它不是全面贏。工具呼叫看起來是它的強項，但 MCP-Atlas 輸 10.1 分；agentic coding 三項全輸，SWE-bench Multilingual 輸 12 分。",[111,786,787],{},"官方自己寫得很清楚（原文是 \"Larger models still win on agentic coding and knowledge, where size matters most\"）：更大的模型在 agentic coding 與知識上仍然勝出，那是規模最吃重的地方。",[148,789,791],{"id":790},"行為可以教知識不能","行為可以教，知識不能",[111,793,794],{},"為什麼成分會長成這樣？看它怎麼訓練的就懂了。",[181,796,797,810],{},[184,798,799],{},[187,800,801,804,807],{},[190,802,803],{},"階段",[190,805,806],{},"規模",[190,808,809],{},"在做什麼",[206,811,812,823,834,845,856],{},[187,813,814,817,820],{},[211,815,816],{},"預訓練",[211,818,819],{},"22T tokens",[211,821,822],{},"通用知識；最後 3.5T 是中訓練，把 context 拉到 256K",[187,824,825,828,831],{},[211,826,827],{},"SFT",[211,829,830],{},"1.75T tokens",[211,832,833],{},"對話、推理、工具呼叫、agent 軌跡",[187,835,836,839,842],{},[211,837,838],{},"混合 RL",[211,840,841],{},"多領域同時",[211,843,844],{},"數學、程式、SQL、結構化輸出，獎勵裡帶長度懲罰",[187,846,847,850,853],{},[211,848,849],{},"MOPD 蒸餾",[211,851,852],{},"6 個專科老師",[211,854,855],{},"把 code、math、tool、long-context、agentic、enterprise 蒸餾回一個模型",[187,857,858,861,864],{},[211,859,860],{},"Agentic RL",[211,862,863],{},"真的 harness",[211,865,866],{},"從網頁瀏覽到辦公流程，在真的 agent 環境裡跑",[111,868,869],{},"表 5：官方公布的四個後訓練階段（表列五列，第一列是預訓練）",[111,871,872],{},"「照 IFBench 的格式回答」是一種行為。行為可以示範、可以給獎勵、可以從老師那裡蒸餾。1.75T tokens 的 SFT 專門在做這件事。",[111,874,875],{},"「GPQA 上答對」需要的是知識。我的讀法是，知識只能從預訓練來，而知識密度跟參數量綁在一起。22T tokens 已經非常多了，還是填不滿 1.7B 的容量。",[111,877,878],{},"所以那張成績單其實很一致。它在「行為」這一軸超車，在「知識」這一軸停在 2B 該有的位置。",[111,880,881],{},"長 context 也是同一件事的兩面。它省的是記憶體，不是理解力。RULER 128K 只有 65.56，Qwen3.5-9B 是 87.11。塞得進去跟用得起來是兩件事。",[111,883,884],{},"官方還提了一個有趣的方向：加搜尋之後，Humanity's Last Exam 從 7.17 變 13.90，幾乎翻倍。對 Qwen3.5-9B 的差距從 −9.2 縮到 −3.6。",[111,886,887],{},"差距縮小了，但沒有追過。知識的缺口可以用工具補一部分，補不完。",[111,889,890,891],{},"對選型的人來說，這推出一條很實用的問句：",[295,892,893],{},"你那個任務是行為題，還是知識題？",[111,895,896],{},"要它照固定格式填表、把工具呼叫排對、在網頁上點完五步——這是行為題，1.7B 值得試。",[111,898,899],{},"要它回答「這個 API 的第三個參數預設值是什麼」、要它讀完 50 頁合約再挑出矛盾。這是知識題：2B 會讓你在某個下午發現，它講得很順，但錯了。",[148,901,903],{"id":902},"液態是-2020-年的事","「液態」是 2020 年的事",[111,905,906],{},"它的名字來自 Liquid Neural Network。這個名字有來歷，但跟現在的架構已經脫鉤。",[111,908,909,910,915],{},"2020 年 6 月，",[118,911,914],{"href":912,"rel":913},"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,917,918,919,298],{},"但看 LFM3 官方怎麼描述架構。他們說 LFM2 證明了「短卷積加注意力的混合」可以在裝置端跑得快，而那個設計",[295,920,921],{},"來自自動化的硬體迴路架構搜尋",[111,923,924],{},"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,926,927,928],{},"所以正確的說法是：",[295,929,930],{},"名字來自歷史，架構來自搜尋。",[111,932,933],{},"不是「掛羊頭賣狗肉」。一家公司保留自己的研究血統當名字，這種事很常見。但如果你是因為「液態神經網路」這五個字點進來，要知道裡面沒有那個機制。",[148,935,937],{"id":936},"所以它適合誰什麼時候不適合","所以它適合誰，什麼時候不適合",[111,939,940],{},"三種人，三種結論。",[111,942,943,946],{},[295,944,945],{},"如果你在裝置端跑 agent","，它是目前這個尺寸裡最值得試的之一。1.6 GB 的 128K context、BFCL 71.39 的工具呼叫、解碼快 1.8 到 2.8 倍，而且六個模型共用同一個骨幹——文字、視覺、音訊可以只載入你要的那一個。",[111,948,949,952],{},[295,950,951],{},"如果你有一個很窄的任務","，它可能是整篇裡最實際的用法。官方的示範是在視覺版的 LFM3-VL-2B 上做的（不是上面那個文字模型），題目是風機葉片瑕疵偵測：",[954,955,956,960,963],"ul",{},[957,958,959],"li",{},"約 3,000 張公開照片（WTBs2025），SFT 加 GRPO，一張 A100 跑幾小時",[957,961,962],{},"在約 1,400 張沒看過的照片上測：分類準確率 67%，偵測 F1 從 0.003 到 0.11",[957,964,965],{},"對照的 GPT-6 Luna 是零樣本（沒有微調），F1 0.01",[111,967,968,969,298],{},"但這裡有一個很容易被略過的數字：",[295,970,971],{},"開箱狀態下，兩個模型只在不到一成的照片上答對",[111,973,974],{},"所以 0.003 到 0.11 是「從幾乎不能用，到勉強可用」，不是「從好到更好」。這是官方自己做的實驗，不是第三方複現。",[111,976,977,980],{},[295,978,979],{},"如果你要的是通用知識助手","，它不適合。HLE 7.17、GPQA 63.37、RULER 65.56，這三項就是天花板。",[111,982,983],{},"還有幾件該知道的事：",[954,985,986,992,998,1004,1010],{},[957,987,988,991],{},[295,989,990],{},"對照組是 Liquid AI 自己選的。"," 沒有第三方複現，也沒有獨立重跑",[957,993,994,997],{},[295,995,996],{},"那個平均是等權的。"," 你關心的那一項可能只佔 1\u002F29",[957,999,1000,1003],{},[295,1001,1002],{},"省的是記憶體，不是長 context 的能力。"," RULER 65.56 對 87.11",[957,1005,1006,1009],{},[295,1007,1008],{},"開放權重不等於隨便用。"," 授權是 LFM Open License v1.0，商用前自己讀一遍",[957,1011,1012,1015],{},[295,1013,1014],{},"六個模型都是從同一個 base 分支出去的。"," 想換模態不是換一套架構，是換一組權重",[148,1017,1018],{"id":1018},"明天可以做的三件事",[1020,1021,1022,1028,1034],"ol",{},[957,1023,1024,1027],{},[295,1025,1026],{},"下次看到 benchmark 平均，先數列數。"," 官方那張表 29 列，平均是等權的；你能重算一次，就知道那 2.13 分是由哪幾列構成的。這個動作花五分鐘，比讀十篇評測有用。",[957,1029,1030,1033],{},[295,1031,1032],{},"算一次你自己的 KV 帳單。"," 式子長這樣：token 數 × 會寫 KV 的層數 × KV head 數 × 每個 head 的維度 × 2（K 跟 V 各一份）× 每個元素的 byte 數。這幾個數都在模型的 config 裡。如果你的情境只需要 8K context，那 1.6 GB 對你就沒有意義——按比例大約是 100 MB。",[957,1035,1036,1039],{},[295,1037,1038],{},"如果你的任務很窄，拿 2B 級模型微調一次。"," 一張 A100、幾小時、幾千張照片，這是現在做得到的規模。效果不會是全能的，但可能剛好夠用。",[111,1041,1042,1043,1047],{},"如果你只是想在自己機器上跑大模型，先看",[118,1044,1046],{"href":1045},"\u002Fblog\u002Fstrata-125b-on-12gb","125B 怎麼跑在 12GB 顯卡上","。那是另一條路：不改模型，改誰在什麼時候被載入。",[111,1049,1050],{},"規模沒有消失，它換了位置。從「你買得到的 GPU」，搬到「你調得動的任務」。",{"title":1052,"searchDepth":1053,"depth":1053,"links":1054},"",2,[1055,1056,1057,1058,1059,1060,1061,1062],{"id":150,"depth":1053,"text":151},{"id":175,"depth":1053,"text":176},{"id":326,"depth":1053,"text":327},{"id":428,"depth":1053,"text":429},{"id":790,"depth":1053,"text":791},{"id":902,"depth":1053,"text":903},{"id":936,"depth":1053,"text":937},{"id":1018,"depth":1053,"text":1018},"\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。",false,"md","zh-TW",{},true,"\u002Fimages\u002Fblog\u002Flfm3-128k-kv-cache.jpg","\u002Fblog\u002Fzh-tw\u002Flfm3-128k-kv-cache",{"title":102,"description":1066},"lfm3-128k-kv-cache","blog\u002Fzh-TW\u002Flfm3-128k-kv-cache",[1078,1079,1080,1081],"local-llm","kv-cache","model-design","evaluation",null,"hfBq0Y8fXZV3FWUPNsI7QmsNGCCT1p1SKyNmccTxxcs",{"id":1085,"title":1086,"author":103,"body":1087,"cover":1925,"coverAlt":1926,"date":1065,"description":1927,"draft":1067,"extension":1068,"featured":1067,"lang":1928,"meta":1929,"navigation":1071,"ogImage":1930,"path":1931,"seo":1932,"slug":1075,"stem":1933,"tags":1934,"translationKey":1075,"updated":1082,"__hash__":1935},"blog\u002Fblog\u002Fen\u002Flfm3-128k-kv-cache.md","128K of Context, 1.6 GB of KV Cache",{"type":105,"value":1088,"toc":1915},[1089,1105,1108,1111,1114,1117,1120,1123,1127,1130,1133,1136,1139,1142,1145,1148,1152,1155,1226,1229,1232,1235,1238,1241,1251,1257,1268,1271,1278,1282,1332,1335,1338,1341,1344,1347,1354,1357,1363,1367,1370,1373,1376,1383,1386,1389,1528,1531,1534,1537,1540,1543,1627,1630,1633,1636,1639,1642,1645,1648,1654,1657,1660,1664,1667,1735,1738,1741,1744,1747,1750,1753,1756,1762,1765,1768,1772,1775,1782,1788,1791,1797,1800,1804,1807,1813,1819,1830,1836,1839,1845,1848,1880,1884,1904,1912],[108,1090,1091,1099],{},[111,1092,1093,1094,1098],{},"Numbers come from Liquid AI's ",[118,1095,1097],{"href":120,"rel":1096},[122],"launch post"," (Oct 27, 2026) and the model cards. Percentages, ratios and gaps are our arithmetic on the published numbers. We did not rerun either model, and the comparison set is the one Liquid AI picked. One section is ours: how that average is built. Anyone can check it against the same table.",[111,1100,1101,1102,1104],{},"Weights: ",[126,1103,128],{}," on Hugging Face.",[111,1106,1107],{},"An agent holding 128K of context. A whole repository, a whole manual, a full day of tool output.",[111,1109,1110],{},"It runs on a phone, on a Raspberry Pi 5, on a laptop without a discrete GPU. The KV cache bill for that context is 1.6 GB, weights not included.",[111,1112,1113],{},"Three things worth separating: where that 1.6 GB comes from, how the report card becomes an average, and what the model is actually for.",[111,1115,1116],{},"That is LFM3-1.7B. The same model scores 49.37 across the 29 rows Liquid AI published, against 47.24 for Qwen3.5-9B.",[111,1118,1119],{},"A 1.7B model beating a 9B one sounds like an architecture revolution. Split the claim in two and the picture gets much clearer.",[111,1121,1122],{},"Six of its 24 layers are still global attention. And that average is 29 equal-weight rows. Taken apart, the biggest wins sit on one axis and the biggest losses are about knowledge or distance.",[148,1124,1126],{"id":1125},"what-128k-actually-costs","What 128K actually costs",[111,1128,1129],{},"Start with something nobody disputes.",[111,1131,1132],{},"Every time a model emits a token, every attention layer looks back over all the tokens before it. Recomputing that is too expensive, so the intermediate results get stored. That store is the KV cache.",[111,1134,1135],{},"It scales with the number of layers that keep KV, the context length, the number of KV heads, and the head dimension. Every layer, every KV head, every token keeps a K and a V vector.",[111,1137,1138],{},"So \"supports 128K\" is one line on a product page and a few gigabytes in memory.",[111,1140,1141],{},"Liquid AI's own comparison is blunt: at a full 128K, Qwen3.5-4B needs 4.3 GB of KV cache and MiniCPM5-2B needs 5.6 GB.",[111,1143,1144],{},"This hurts agents specifically. One tool output is thousands of tokens, context only grows across turns, and you want the thing sitting in the background all day.",[111,1146,1147],{},"I think the real cost of long context is not the prefill pass. It is that you have to keep holding that memory. A phone does not have the budget, so the agent stays short.",[148,1149,1151],{"id":1150},"its-answer-24-layers-only-6-of-them-full-attention","Its answer: 24 layers, only 6 of them full attention",[111,1153,1154],{},"The 24 layers of LFM3-1.7B are not the same kind of layer.",[181,1156,1157,1176],{},[184,1158,1159],{},[187,1160,1161,1164,1167,1170,1173],{},[190,1162,1163],{},"Operator",[190,1165,1166],{},"Layers",[190,1168,1169],{},"Sees",[190,1171,1172],{},"Stores KV?",[190,1174,1175],{},"Job",[206,1177,1178,1194,1210],{},[187,1179,1180,1183,1185,1188,1191],{},[211,1181,1182],{},"Gated short convolution (kernel 7)",[211,1184,216],{},[211,1186,1187],{},"7 tokens",[211,1189,1190],{},"No",[211,1192,1193],{},"Local patterns: syntax, word order",[187,1195,1196,1199,1201,1204,1207],{},[211,1197,1198],{},"Sliding-window attention (window 256)",[211,1200,233],{},[211,1202,1203],{},"The last 256",[211,1205,1206],{},"Only 256 tokens",[211,1208,1209],{},"Paragraph-level links",[187,1211,1212,1215,1217,1220,1223],{},[211,1213,1214],{},"Global attention",[211,1216,250],{},[211,1218,1219],{},"The whole context",[211,1221,1222],{},"Yes, growing with context",[211,1224,1225],{},"The rare case where a sentence 10,000 tokens back is the key",[111,1227,1228],{},"Table 1: how the 24 layers are built (Liquid AI launch post)",[111,1230,1231],{},"A convolution has no key\u002Fvalue table, only a fixed-size filter. So those 13 layers write no KV cache at all.",[111,1233,1234],{},"Sliding-window attention does keep KV, but only for the last 256 tokens. It does not grow.",[111,1236,1237],{},"Only those 6 global layers inflate.",[111,1239,1240],{},"As Figure 1 shows, spread the 24 layers out and only the red ones get fatter as the conversation grows.",[276,1242,280,1244,280,1248],{"className":1243},[279],[282,1245],{"src":1246,"alt":1247,"loading":286},"\u002Fimages\u002Fblog\u002Fen\u002Flfm3-128k-kv-cache\u002Flayer-stack.svg","Twenty-four stacked layers: 13 gated short convolutions, 5 sliding-window attention layers, 6 global attention layers; only the global ones write a KV cache that grows with context",[288,1249,1250],{},"Figure 1: only 6 of the 24 layers are global attention. KV cache grows only in the red layers; the yellow ones keep 256 tokens; the blue ones keep nothing. Layer order is not public; the layers are grouped by type.",[111,1252,1253,1254],{},"Now the part that gets lost: ",[295,1255,1256],{},"this is not a Transformer replacement.",[111,1258,1259,1260,1263,1264,1267],{},"Six of 24 layers are still global attention, a quarter of the stack. The other 13 convolutions plus 5 sliding-window layers just encode the fact that most of the time you do not need full attention. ",[118,1261,306],{"href":304,"rel":1262},[122]," and ",[118,1265,312],{"href":310,"rel":1266},[122]," walked the same road. Hybrids are not new.",[111,1269,1270],{},"Some launch coverage called it a non-Transformer architecture that beat Transformers. Count the layers and you find diluted attention rather than removed.",[111,1272,1273,1274,1277],{},"One small detail is worth a look. Every attention head's output passes through a sigmoid gate, so a head with nothing to add can switch off. Liquid AI says this can help suppress activation outliers, which is exactly what ",[118,1275,1276],{"href":322},"quantization hates",".",[148,1279,1281],{"id":1280},"what-you-get-128k-in-16-gb","What you get: 128K in 1.6 GB",[181,1283,1284,1300],{},[184,1285,1286],{},[187,1287,1288,1291,1294,1297],{},[190,1289,1290],{},"Model",[190,1292,1293],{},"Params",[190,1295,1296],{},"KV cache at a full 128K",[190,1298,1299],{},"vs LFM3",[206,1301,1302,1312,1322],{},[187,1303,1304,1306,1308,1310],{},[211,1305,352],{},[211,1307,355],{},[211,1309,358],{},[211,1311,361],{},[187,1313,1314,1316,1318,1320],{},[211,1315,366],{},[211,1317,369],{},[211,1319,372],{},[211,1321,375],{},[187,1323,1324,1326,1328,1330],{},[211,1325,380],{},[211,1327,383],{},[211,1329,386],{},[211,1331,389],{},[111,1333,1334],{},"Table 2: KV cache at 128K context (official numbers, same measurement)",[111,1336,1337],{},"In relative terms, 1.6 GB is 37% of Qwen3.5-4B and 29% of MiniCPM5-2B.",[111,1339,1340],{},"That is not a small saving. KV cache scales with context, so one measured point at 128K tells you every other length — approximately: the five sliding-window layers keep a fixed 256-token block, which matters more when the context is short.\nWhat it saves is not compression. It is that far less needs storing in the first place.",[111,1342,1343],{},"That shows up on devices. Across phones, a Raspberry Pi 5 and laptops, LFM3-1.7B decodes fastest of the comparison set, 1.8 to 2.8 times faster, with the smallest memory footprint.",[111,1345,1346],{},"Conditions matter: that is llama.cpp, Q4_0, 32K context. Do not mix it with the 128K KV numbers.",[111,1348,1349,1350,1353],{},"Scale matters too. This is not only a text model. One LFM3-1.7B-Base backbone branches into six models around 2B: text, vision, audio, omni, and two decision models that only answer questions. It is the same idea as ",[118,1351,1352],{"href":413},"one trunk, four modalities",", at 2B scale.",[111,1355,1356],{},"Pretraining used 22T tokens, with a 128K vocabulary carried over from LFM2.5-8B-A1B, which Liquid AI says tokenizes non-Latin scripts more efficiently. The final 3.5T tokens were mid-training that pushed the window to 256K.",[111,1358,1359,1360,1362],{},"Note the two numbers: the model supports 256K, but 1.6 GB is the ",[295,1361,424],{}," KV cache.",[148,1364,1366],{"id":1365},"that-average-is-29-equally-weighted-rows","That average is 29 equally weighted rows",[111,1368,1369],{},"The official table has 29 rows. Average: 49.37 against 47.24.",[111,1371,1372],{},"On its face there is nothing to dispute. But I wanted to know how that average was computed, so I averaged the 29 rows myself.",[111,1374,1375],{},"I got 49.37 and 47.24, exactly as printed.",[111,1377,1378,1379,1382],{},"So it is an ",[295,1380,1381],{},"equal-weight average",": IFBench counts 1\u002F29 and so does SWE-bench, whether or not the task matters to you.",[111,1384,1385],{},"The 29 rows are not 29 distinct tests either: Claw-Eval appears twice, Humanity's Last Exam twice, AA-Omniscience three times. Deduplicated it is 25. That number comes back below.",[111,1387,1388],{},"That is where it gets interesting. Sorted by gap, the widest twelve look like this:",[181,1390,1391,1405],{},[184,1392,1393],{},[187,1394,1395,1398,1400,1402],{},[190,1396,1397],{},"Benchmark",[190,1399,352],{},[190,1401,465],{},[190,1403,1404],{},"Gap",[206,1406,1407,1417,1427,1437,1447,1458,1468,1478,1488,1498,1508,1518],{},[187,1408,1409,1411,1413,1415],{},[211,1410,475],{},[211,1412,478],{},[211,1414,481],{},[211,1416,484],{},[187,1418,1419,1421,1423,1425],{},[211,1420,489],{},[211,1422,492],{},[211,1424,495],{},[211,1426,498],{},[187,1428,1429,1431,1433,1435],{},[211,1430,503],{},[211,1432,506],{},[211,1434,509],{},[211,1436,512],{},[187,1438,1439,1441,1443,1445],{},[211,1440,517],{},[211,1442,520],{},[211,1444,523],{},[211,1446,526],{},[187,1448,1449,1452,1454,1456],{},[211,1450,1451],{},"BFCL V4 (tool calling)",[211,1453,534],{},[211,1455,537],{},[211,1457,540],{},[187,1459,1460,1462,1464,1466],{},[211,1461,545],{},[211,1463,548],{},[211,1465,551],{},[211,1467,554],{},[187,1469,1470,1472,1474,1476],{},[211,1471,559],{},[211,1473,562],{},[211,1475,565],{},[211,1477,568],{},[187,1479,1480,1482,1484,1486],{},[211,1481,573],{},[211,1483,576],{},[211,1485,579],{},[211,1487,582],{},[187,1489,1490,1492,1494,1496],{},[211,1491,587],{},[211,1493,590],{},[211,1495,593],{},[211,1497,596],{},[187,1499,1500,1502,1504,1506],{},[211,1501,601],{},[211,1503,604],{},[211,1505,607],{},[211,1507,610],{},[187,1509,1510,1512,1514,1516],{},[211,1511,615],{},[211,1513,618],{},[211,1515,621],{},[211,1517,624],{},[187,1519,1520,1522,1524,1526],{},[211,1521,629],{},[211,1523,632],{},[211,1525,635],{},[211,1527,638],{},[111,1529,1530],{},"Table 3: twelve wide gaps out of the 29 rows (six wins, six losses). This is my pick, not the top twelve by size — see the note below.",[111,1532,1533],{},"The top six are \"follow the format\", \"call the tool correctly\", \"click through the page\". The bottom six are \"how much do you know\", \"how long do you remember\", \"can you actually change the code\".",[111,1535,1536],{},"This table is my pick, not the whole story. The two widest gaps are not on it: AA-Omniscience non-hallucination at +40.3 (92.93 against 52.59) and its raw score at +28.5. Both sit in the knowledge block.",[111,1538,1539],{},"Neither measures stored knowledge. They measure calibration. \"Say you do not know when you do not know\" is behavior shaped by post-training; answering GPQA is not. That row is a big win, and what it measures is discipline, not erudition.",[111,1541,1542],{},"Slice it a few other ways and it gets clearer still:",[181,1544,1545,1559],{},[184,1546,1547],{},[187,1548,1549,1552,1555,1557],{},[190,1550,1551],{},"Slice",[190,1553,1554],{},"Rows",[190,1556,352],{},[190,1558,465],{},[206,1560,1561,1572,1583,1594,1605,1616],{},[187,1562,1563,1566,1568,1570],{},[211,1564,1565],{},"Official average",[211,1567,679],{},[211,1569,682],{},[211,1571,685],{},[187,1573,1574,1577,1579,1581],{},[211,1575,1576],{},"Behavior (agents 7 + tools 4 + instruction 4)",[211,1578,693],{},[211,1580,696],{},[211,1582,699],{},[187,1584,1585,1588,1590,1592],{},[211,1586,1587],{},"Everything else, 14 rows (coding 6 + knowledge 6 + long context 2)",[211,1589,707],{},[211,1591,710],{},[211,1593,713],{},[187,1595,1596,1599,1601,1603],{},[211,1597,1598],{},"of which agentic coding",[211,1600,721],{},[211,1602,724],{},[211,1604,727],{},[187,1606,1607,1610,1612,1614],{},[211,1608,1609],{},"of which long context",[211,1611,735],{},[211,1613,738],{},[211,1615,741],{},[187,1617,1618,1621,1623,1625],{},[211,1619,1620],{},"Without the three AA-Omniscience rows",[211,1622,749],{},[211,1624,635],{},[211,1626,754],{},[111,1628,1629],{},"Table 4: the same report card, several ways (row one is the printed official average; the rest is my arithmetic on the official numbers)",[111,1631,1632],{},"Behavior is 15 rows, more than half the weight. LFM3 wins 11 of them.",[111,1634,1635],{},"The last row is the one I would look at. AA-Omniscience appears three times in that table: raw score (0.50 against −28.00), accuracy (7.07 against 13.17) and non-hallucination rate (92.93 against 52.59). One exam, three facets, three votes.",[111,1637,1638],{},"Together those three rows contribute +62.7 points of gap; the whole margin is +61.7. Drop all three and the remaining 26 rows come out 51.20 to 51.24, the gap going from +2.13 to −0.04.",[111,1640,1641],{},"Drop only one of them and the story flips back: the lead stays somewhere between +0.8 and +2.4. So \"three rows carry the entire margin\" is only true when all three leave together, and that should be said out loud.",[111,1643,1644],{},"The sharper objection is not triple counting but sign. −28.00 is an index that can go negative, not a percentage. Averaged with percentages, that single row moves Qwen's mean by nearly a full point on its own.",[111,1646,1647],{},"I am not saying the math is wrong. That is what an equal-weight average does: swap one benchmark in or out and the conclusion moves. And whether those three rows were chosen by Liquid AI or reported that way by the benchmark house, I cannot tell from the table.",[111,1649,1650,1651],{},"The point is smaller and more useful: ",[295,1652,1653],{},"an average is a design decision, not a conclusion.",[111,1655,1656],{},"And it is not a clean sweep. Tool calling looks like the strength, yet MCP-Atlas loses by 10.1. Agentic coding loses all three rows, SWE-bench Multilingual by 12.",[111,1658,1659],{},"Liquid AI says it plainly themselves: \"Larger models still win on agentic coding and knowledge, where size matters most.\"",[148,1661,1663],{"id":1662},"behavior-can-be-taught-knowledge-cannot","Behavior can be taught. Knowledge cannot.",[111,1665,1666],{},"Why does the report card look like that? The training explains it.",[181,1668,1669,1682],{},[184,1670,1671],{},[187,1672,1673,1676,1679],{},[190,1674,1675],{},"Stage",[190,1677,1678],{},"Scale",[190,1680,1681],{},"What it does",[206,1683,1684,1694,1703,1714,1725],{},[187,1685,1686,1689,1691],{},[211,1687,1688],{},"Pretraining",[211,1690,819],{},[211,1692,1693],{},"General knowledge; the final 3.5T is mid-training that extends context to 256K",[187,1695,1696,1698,1700],{},[211,1697,827],{},[211,1699,830],{},[211,1701,1702],{},"Chat, reasoning, tool calls, agent traces",[187,1704,1705,1708,1711],{},[211,1706,1707],{},"Mixed RL",[211,1709,1710],{},"Many domains at once",[211,1712,1713],{},"Math, code, SQL, structured output, with a length penalty in the reward",[187,1715,1716,1719,1722],{},[211,1717,1718],{},"MOPD distillation",[211,1720,1721],{},"6 specialist teachers",[211,1723,1724],{},"Code, math, tool use, long context, agentic work, enterprise workflows, distilled back into one model",[187,1726,1727,1729,1732],{},[211,1728,860],{},[211,1730,1731],{},"Real harnesses",[211,1733,1734],{},"Web browsing through office work, run inside real agent environments",[111,1736,1737],{},"Table 5: the post-training stages Liquid AI published (first row is pretraining)",[111,1739,1740],{},"\"Answer in IFBench's format\" is behavior. Behavior can be demonstrated, rewarded, distilled from a teacher. That is what 1.75T tokens of SFT buys.",[111,1742,1743],{},"\"Answer GPQA correctly\" needs knowledge. The way I read it, knowledge comes from pretraining, and knowledge density is tied to parameter count. 22T tokens is a lot; it still cannot fill a 1.7B model.",[111,1745,1746],{},"The report card is coherent. It overtakes on the behavior axis and stops where a 2B model stops on the knowledge axis.",[111,1748,1749],{},"Long context is the same knot in another place. What it saves is memory, not comprehension. RULER 128K is 65.56 against 87.11. Fitting something into the window and using it are two different things.",[111,1751,1752],{},"Liquid AI offers an interesting direction: with search, Humanity's Last Exam goes from 7.17 to 13.90, nearly double. The gap to Qwen3.5-9B narrows from −9.2 to −3.6.",[111,1754,1755],{},"Narrower, not closed. Tools cover part of a knowledge gap; they do not cover all of it.",[111,1757,1758,1759],{},"For anyone choosing a model, this raises a practical question: ",[295,1760,1761],{},"is your task a behavior task or a knowledge task?",[111,1763,1764],{},"Fill a fixed form, order the tool calls correctly, click through five steps: behavior. A 1.7B model is worth trying.",[111,1766,1767],{},"Answer what the third parameter of an API defaults to, read 50 pages of contract and find the contradiction: knowledge. A 2B model will answer smoothly and be wrong, and you will find out one afternoon too late.",[148,1769,1771],{"id":1770},"liquid-is-a-2020-story","\"Liquid\" is a 2020 story",[111,1773,1774],{},"The name comes from Liquid Neural Networks. It has a real origin, and it has come loose from the architecture.",[111,1776,1777,1778,1781],{},"In June 2020, a paper called ",[118,1779,914],{"href":912,"rel":1780},[122]," appeared; AAAI published it in 2021. The authors are Ramin Hasani, Mathias Lechner, Alexander Amini, Daniela Rus and Radu Grosu — five of them. In 2023 several of that group spun out of MIT CSAIL to found Liquid AI. The name is lineage, not marketing.",[111,1783,1784,1785,1277],{},"Now look at how Liquid AI describes the architecture. LFM2, they write, showed that a hybrid of short convolutions and attention could run fast on-device, and that design came from ",[295,1786,1787],{},"automated hardware-in-the-loop architecture search",[111,1789,1790],{},"LFM3 just widened the search. LFM2 searched over one phone and one laptop; LFM3 searches over 14 device and backend combinations, from a Galaxy S26 Ultra and a OnePlus 15 through a Raspberry Pi 5, Apple M4 Max, AMD Ryzen AI, Arm and x86 cloud CPUs, GPUs, and the Qualcomm Hexagon NPU.",[111,1792,1793,1794],{},"The accurate sentence is: ",[295,1795,1796],{},"the name comes from history, the architecture comes from search.",[111,1798,1799],{},"This is not bait and switch. Companies keep their research lineage in the name all the time. But if you clicked because of \"liquid neural network\", know that the mechanism is not in there.",[148,1801,1803],{"id":1802},"so-who-is-it-for","So who is it for",[111,1805,1806],{},"Three kinds of people, three answers.",[111,1808,1809,1812],{},[295,1810,1811],{},"If you run an agent on a device",", this is one of the most interesting options at this size. A 128K context in 1.6 GB, BFCL 71.39 for tool calling, 1.8 to 2.8 times faster decoding, and six models sharing one backbone so you load only the modality you need.",[111,1814,1815,1818],{},[295,1816,1817],{},"If you have one narrow task",", this may be the most practical idea in the post. Liquid AI's demo used the vision model — LFM3-VL-2B, not the text model above — finding and classifying defects in drone photos of wind turbine blades:",[954,1820,1821,1824,1827],{},[957,1822,1823],{},"About 3,000 public photos (WTBs2025), SFT plus GRPO, a few hours on one A100",[957,1825,1826],{},"Measured on about 1,400 held-out photos: 67% classification accuracy, detection F1 from 0.003 to 0.11",[957,1828,1829],{},"Against a zero-shot GPT-6 Luna at 0.01",[111,1831,1832,1833],{},"With one number that is easy to skip: ",[295,1834,1835],{},"out of the box, both models identified fewer than 10% of those images.",[111,1837,1838],{},"So 0.003 to 0.11 is \"from nearly unusable to marginally usable\", not \"from good to better\". And it is Liquid AI's own experiment, not an independent replication.",[111,1840,1841,1844],{},[295,1842,1843],{},"If you want a general knowledge assistant",", it is not the tool. HLE 7.17, GPQA 63.37, RULER 65.56. Those are the ceiling.",[111,1846,1847],{},"A few things to keep in mind:",[954,1849,1850,1856,1862,1868,1874],{},[957,1851,1852,1855],{},[295,1853,1854],{},"The comparison set is Liquid AI's own pick."," No third-party replication, no independent rerun",[957,1857,1858,1861],{},[295,1859,1860],{},"The average is equal-weight."," The benchmark you care about may be 1\u002F29 of it",[957,1863,1864,1867],{},[295,1865,1866],{},"It saves memory, not long-context ability."," RULER 65.56 against 87.11",[957,1869,1870,1873],{},[295,1871,1872],{},"Open weights are not a free license."," It is the LFM Open License v1.0; read it before commercial use",[957,1875,1876,1879],{},[295,1877,1878],{},"All six models branch from one base."," Switching modality is switching weights, not architectures",[148,1881,1883],{"id":1882},"three-things-you-can-do-tomorrow","Three things you can do tomorrow",[1020,1885,1886,1892,1898],{},[957,1887,1888,1891],{},[295,1889,1890],{},"Next time you see a benchmark average, count the rows."," The official table has 29, and the average is equal-weight. Recomputing it takes five minutes and tells you which rows carry it. That is worth more than reading ten reviews.",[957,1893,1894,1897],{},[295,1895,1896],{},"Compute your own KV bill."," Multiply six things: tokens × layers that keep KV × KV heads × head dimension × 2 (K and V) × bytes per element. All six are in the model config. If you only need 8K of context, 1.6 GB is not your number; scaled down it is about 100 MB.",[957,1899,1900,1903],{},[295,1901,1902],{},"If your task is narrow, fine-tune a 2B model once."," One A100, a few hours, a few thousand photos. That is the scale that is available now. It will not be general, but it might be enough.",[111,1905,1906,1907,1911],{},"If what you actually want is a large model on your own machine, we have written about the other lever: ",[118,1908,1910],{"href":1909},"\u002Fblog\u002Fmacaq-one-layer-at-a-time","quantizing a 122B model one layer at a time",". There you shrink the model instead of the window.",[111,1913,1914],{},"Scale did not disappear. It moved, from the GPU you can buy to the task you can shape.",{"title":1052,"searchDepth":1053,"depth":1053,"links":1916},[1917,1918,1919,1920,1921,1922,1923,1924],{"id":1125,"depth":1053,"text":1126},{"id":1150,"depth":1053,"text":1151},{"id":1280,"depth":1053,"text":1281},{"id":1365,"depth":1053,"text":1366},{"id":1662,"depth":1053,"text":1663},{"id":1770,"depth":1053,"text":1771},{"id":1802,"depth":1053,"text":1803},{"id":1882,"depth":1053,"text":1883},"\u002Fimages\u002Fblog\u002Fen\u002Flfm3-128k-kv-cache.svg","Cover for the English essay, 128K of Context, 1.6 GB of KV Cache","LFM3-1.7B keeps a 128K context in 1.6 GB of KV cache, 37% of Qwen3.5-4B: only 6 of 24 layers are global attention. It averages 49.37 against a 9B model, but wins on behavior, not agentic coding.","en",{},"\u002Fimages\u002Fblog\u002Fen\u002Flfm3-128k-kv-cache.jpg","\u002Fblog\u002Fen\u002Flfm3-128k-kv-cache",{"title":1086,"description":1927},"blog\u002Fen\u002Flfm3-128k-kv-cache",[1078,1079,1080,1081],"6CtDPXOGZkUfPMZECZOhUeZYaJwSo9AJwFDQVTLuDkA",[1937,2754],{"id":1938,"title":1939,"author":103,"body":1940,"cover":2740,"coverAlt":2741,"date":2742,"description":2743,"draft":1067,"extension":1068,"featured":1067,"lang":1069,"meta":2744,"navigation":1071,"ogImage":2745,"path":2746,"seo":2747,"slug":2748,"stem":2749,"tags":2750,"translationKey":2748,"updated":1082,"__hash__":2753},"blog\u002Fblog\u002Fzh-TW\u002Fweight-edit-loop-repair.md","它沒有變聰明，只是不再打轉",{"type":105,"value":1941,"toc":2729},[1942,1947,1950,1953,1959,1968,1971,1986,1989,1992,2082,2085,2088,2091,2094,2097,2103,2106,2110,2113,2116,2119,2129,2132,2149,2152,2155,2163,2166,2173,2185,2189,2192,2195,2242,2253,2259,2262,2265,2268,2271,2275,2278,2281,2284,2287,2290,2295,2301,2304,2312,2315,2319,2322,2331,2334,2337,2477,2480,2483,2486,2489,2492,2497,2503,2506,2509,2512,2515,2518,2521,2530,2533,2536,2574,2580,2583,2594,2597,2601,2604,2615,2618,2621,2628,2634,2641,2647,2650,2658,2661],[108,1943,1944],{},[111,1945,1946],{},"這篇的數字來自原文（部落格貼文，不是同儕審查論文）與公開 logs、Qwen 的 model card、Hugging Face 上的重建版重跑，以及硅星人Pro 按 logs 做的逐題重算。逐題配對那一段是二手重算，我會標出來。我們沒有在自己的機器上重跑那 50 次前向。",[148,1948,1949],{"id":1949},"先講一個畫面",[111,1951,1952],{},"你在筆電上跑一顆 0.8B 的小模型，給它一題國中數學。它想了三分鐘，輸出到上限被切斷；回頭看，整段在重複同兩句話。",[111,1954,1955,1956],{},"你的結論大概是：模型太小。這篇要給你的是一個更準的分界——",[295,1957,1958],{},"分數變好，是模型變聰明，還是它終於講得完？",[111,1960,1961,1962,1967],{},"十一月二日，四位 MIT CSAIL 的研究者公開",[118,1963,1966],{"href":1964,"rel":1965},"https:\u002F\u002Frikiyat.github.io\u002Fblog\u002Fweight-space-programming\u002F",[122],"一組實驗","。他們讓 GPT-6 Astra 直接修改 Qwen3.5-0.8B 的權重，只動了 0.016%。",[111,1969,1970],{},"同一顆模型，MATH-500 從 7.9% 變成 48.1%。",[111,1972,1973,1974,1979,1980,1985],{},"那則貼文在 ",[118,1975,1978],{"href":1976,"rel":1977},"https:\u002F\u002Fnews.ycombinator.com\u002Fitem?id=50341174",[122],"Hacker News"," 拿到將近 3,000 分、900 則留言。中文媒體的標題則是「爆改 Qwen 大腦」這一路（",[118,1981,1984],{"href":1982,"rel":1983},"https:\u002F\u002F36kr.com\u002Fp\u002F4056494372181124",[122],"例","）。",[111,1987,1988],{},"拆開來看，那個六倍買到的不是數學能力，是「把話講完」。而這兩件事在 benchmark 表上長得一樣，除非你多記一欄。",[148,1990,1991],{"id":1991},"先讀最後一欄",[181,1993,1994,2012],{},[184,1995,1996],{},[187,1997,1998,2001,2004,2007,2009],{},[190,1999,2000],{},"Qwen3.5-0.8B",[190,2002,2003],{},"MATH-500",[190,2005,2006],{},"GSM8K",[190,2008,545],{},[190,2010,2011],{},"撞 32,768 token 上限",[206,2013,2014,2031,2048,2065],{},[187,2015,2016,2019,2022,2025,2028],{},[211,2017,2018],{},"原始",[211,2020,2021],{},"7.9%",[211,2023,2024],{},"13.8%",[211,2026,2027],{},"21.0%",[211,2029,2030],{},"93.0%",[187,2032,2033,2036,2039,2042,2045],{},[211,2034,2035],{},"改，10 次前向",[211,2037,2038],{},"12.3%",[211,2040,2041],{},"25.7%",[211,2043,2044],{},"49.0%",[211,2046,2047],{},"87.2%",[187,2049,2050,2053,2056,2059,2062],{},[211,2051,2052],{},"改，25 次前向",[211,2054,2055],{},"14.1%",[211,2057,2058],{},"25.1%",[211,2060,2061],{},"39.9%",[211,2063,2064],{},"86.4%",[187,2066,2067,2070,2073,2076,2079],{},[211,2068,2069],{},"改，50 次前向",[211,2071,2072],{},"48.1%",[211,2074,2075],{},"67.1%",[211,2077,2078],{},"62.3%",[211,2080,2081],{},"33.1%",[111,2083,2084],{},"前向（forward pass）就是讓模型真的回答一批題目，看它輸出什麼。不是訓練，也不給梯度。",[111,2086,2087],{},"四列用的是同一個方法，但三次交出的是三份不同的補丁，不是同一招多給預算。差別在於 Astra 被允許跑幾次前向。",[111,2089,2090],{},"10 次：12.3。25 次：14.1。50 次：48.1。",[111,2092,2093],{},"看前三列，你會說「預算不夠」。但最後一欄講的是另一件事。",[111,2095,2096],{},"10 次和 25 次時，撞上上限的數學題還有 87% 和 86%。到 50 次，掉到 33.1%。",[111,2098,2099,2102],{},[295,2100,2101],{},"分數是跟著截斷率走的。"," 前兩次沒有把迴圈修掉，分數就留在原地；把撞上限的比例壓下來，分數才動。",[111,2104,2105],{},"有一條線不聽這個解釋：IFEval 在 10 次前向就從 21.0 跳到 49.0，那時截斷率還有 87.2%。IFEval 的答案短，截斷對它的影響小。單次執行的結果，我不會拿它下結論。",[148,2107,2109],{"id":2108},"它改的是什麼兩層一個方向十三萬個權重","它改的是什麼：兩層、一個方向、十三萬個權重",[111,2111,2112],{},"Astra 做的事可以拆成三步。",[111,2114,2115],{},"第一步，看 96 道練習題的回答。其中 85 道撞到 32,768 上限，撞上去的內容幾乎都在重複。",[111,2117,2118],{},"第二步，把這個重複追到第 15 層與第 19 層的 MLP。MLP 是每個 transformer 區塊裡的前饋層，這兩層的輸出一直在同一個方向上推。",[111,2120,2121,2122,2125,2126,2128],{},"第三步，從這兩層的 ",[126,2123,2124],{},"down_proj"," 各挑 64 個輸出欄位，把那個方向減掉。",[126,2127,2124],{}," 是前饋層最後把結果投影回模型寬度的那個矩陣。",[111,2130,2131],{},"2 × 64 × 1,024 = 131,072 個權重，約占 8 億的 0.016%。",[111,2133,2134,2135,2140,2141,2144,2145,2148],{},"Hugging Face 上有人照公開的 diff ",[118,2136,2139],{"href":2137,"rel":2138},"https:\u002F\u002Fhuggingface.co\u002FRikiyaT\u002FQwen3.5-0.8B-weight-space-programming",[122],"重建了檢查點","。公開 logs 裡的腳本逐個 tensor 對 sha256：只有 ",[126,2142,2143],{},"layers.15.mlp.down_proj"," 與 ",[126,2146,2147],{},"layers.19.mlp.down_proj"," 兩個張量不同。",[111,2150,2151],{},"我認為這是最乾淨的一種驗證。不是「他們說改了兩個張量」，是「重建出來的檔案只有兩個張量不同」。",[111,2153,2154],{},"比喻的話：模型不是不會算，它是在某個地方一直被推回原點，繞著同樣兩三句話轉。那個「推回去的力」，在權重裡是一個方向。減掉它，模型就能把已經想到的答案寫完（圖 1）。",[111,2156,2157,2158,2162],{},"Astra 還自己做了一個對照。取一個與目標方向正交、改動量相同的隨機方向減掉，成績只動 1.5 個百分點（",[118,2159,2161],{"href":1982,"rel":2160},[122],"覆盤","）。所以動的是方向，不是「隨便改一點權重都會變好」。",[111,2164,2165],{},"這不是全新的技術路線。把「拒絕回答」定位到單一方向的研究、ROME 與 MEMIT 那種「找到一組權重、改掉一件事」的做法，都在同一個家族裡。",[111,2167,2168,2169,2172],{},"新的部分是",[295,2170,2171],{},"誰來找那個方向。"," 這次是一個通用模型自己找，而且會把理由寫出來。",[276,2174,280,2176,280,2182],{"className":2175},[279],[2177,2178],"video",{"src":2179,"poster":2180,"autoPlay":1071,"loop":1071,"muted":1071,"playsInline":1071,"ariaLabel":2181},"\u002Fimages\u002Fblog\u002Fweight-edit-loop-repair\u002Floop-repair.mp4","\u002Fimages\u002Fblog\u002Fweight-edit-loop-repair\u002Floop-repair-poster.jpg","左邊是原始模型反覆輸出、撞上 32,768 上限；右邊是減掉一個方向之後，答案在預算內寫完",[288,2183,2184],{},"圖 1：同一顆模型。左邊一直被推回原點，93% 的數學題撞上上限；右邊減掉兩層 MLP 裡的方向，撞上限的比例掉到 33%。",[148,2186,2188],{"id":2187},"_579-題裡576-題原本只是講不完","579 題裡，576 題原本只是講不完",[111,2190,2191],{},"這是最關鍵、也最容易被誤讀的一段。",[111,2193,2194],{},"硅星人Pro 把公開 logs 的逐題紀錄重算一次。他們挑的 1,152 道題，是練習題裡保留起來、沒有拿去挑補丁的那批。",[181,2196,2197,2213],{},[184,2198,2199],{},[187,2200,2201,2204,2207,2210],{},[190,2202,2203],{},"原本的狀態",[190,2205,2206],{},"題數",[190,2208,2209],{},"改之前答對",[190,2211,2212],{},"改之後答對",[206,2214,2215,2228],{},[187,2216,2217,2220,2223,2226],{},[211,2218,2219],{},"有正常結束",[211,2221,2222],{},"114",[211,2224,2225],{},"93.9%",[211,2227,2225],{},[187,2229,2230,2233,2236,2239],{},[211,2231,2232],{},"被上限截斷",[211,2234,2235],{},"1,038",[211,2237,2238],{},"1.4%",[211,2240,2241],{},"56.7%",[954,2243,2244,2247,2250],{},[957,2245,2246],{},"從錯變對 579 題，其中 576 題原本是被截斷的",[957,2248,2249],{},"從對變錯 5 題",[957,2251,2252],{},"平均回答長度從 30,868 token 降到 22,037",[111,2254,2255,2258],{},[295,2256,2257],{},"已經答完的 114 題，正確率一位小數都沒動。"," 114 題裡 3 題從錯變對、3 題從對變錯，剛好打平。",[111,2260,2261],{},"579 個救援裡，576 個來自那 1,038 道本來沒講完的。真正的進步在那裡。",[111,2263,2264],{},"這件事不是誰抓到破綻。原文的表格最後一欄就是 93% 到 33.1%，Astra 自己的最終報告也寫了 576／579。",[111,2266,2267],{},"作者沒有隱瞞：logs、檢查點、失敗的實驗都公開了。他們只是沒有把「已經答完的題目有沒有變」算成一行。",[111,2269,2270],{},"補一句：這張表是依 logs 重算出來的，不是原文的表格。我們沒有自己重算。",[148,2272,2274],{"id":2273},"不會打轉的模型它修不動","不會打轉的模型，它修不動",[111,2276,2277],{},"同樣的方法，換到 Gemma 3 270M 就失效了。",[111,2279,2280],{},"這顆模型很少打轉：只有 8.5% 的回答撞到上限。Qwen 那顆是 93%。",[111,2282,2283],{},"Astra 讀它的失敗，找到的是普通的算錯與代數步驟錯。沒有一個可以關掉的零件。",[111,2285,2286],{},"改完之後，MATH-500 落在 7.0% 到 7.7% 之間，改之前是 6.8%。Astra 自己的報告把這個幅度標成「未達確立」。",[111,2288,2289],{},"原文那句話，是整篇最重要的：",[108,2291,2292],{},[111,2293,2294],{},"Editing weights could remove an obstacle that hid an ability, but it could not add an ability the model lacked.",[111,2296,2297,2298],{},"翻成白話：",[295,2299,2300],{},"改權重可以移除擋住能力的障礙，但不能加進模型本來沒有的能力。",[111,2302,2303],{},"這句話對你有直接用途。你的模型表現差，先問是哪一種差。",[954,2305,2306,2309],{},[957,2307,2308],{},"它會算，但講不完（一直重複、撞上限）→ 移除障礙有效",[957,2310,2311],{},"它算錯 → 移除障礙無效，換模型或換任務",[111,2313,2314],{},"第一種，可以先從設定下手，不必換模型。第二種，別在權重上花時間。",[148,2316,2318],{"id":2317},"被批的不是結果是包裝","被批的不是結果，是包裝",[111,2320,2321],{},"這篇被罵得很兇。但先把話講清楚：被批的是包裝，不是結果。",[111,2323,2324,2325,2330],{},"spaCy 的作者 Matthew Honnibal 寫了一篇",[118,2326,2329],{"href":2327,"rel":2328},"https:\u002F\u002Fhonnibal.dev\u002Fblog\u002Fastra-read-write-misleading",[122],"質疑","，用魔術師比喻。",[111,2332,2333],{},"同一場戲，第一次用特殊道具，第二次改用藏東西，第三次用強迫選擇。觀眾以為只有一種手法，於是每看一次都像推翻了上一個假設。",[111,2335,2336],{},"他的證據是一張表，把八個實驗按「Astra 實際拿到什麼」排開：",[181,2338,2339,2358],{},[184,2340,2341],{},[187,2342,2343,2346,2349,2352,2355],{},[190,2344,2345],{},"實驗",[190,2347,2348],{},"對象",[190,2350,2351],{},"只看原始權重",[190,2353,2354],{},"用 Python",[190,2356,2357],{},"跑過模型",[206,2359,2360,2376,2390,2404,2418,2432,2447,2462],{},[187,2361,2362,2365,2368,2371,2374],{},[211,2363,2364],{},"1 猜遊戲",[211,2366,2367],{},"1.7 萬",[211,2369,2370],{},"✓",[211,2372,2373],{},"—",[211,2375,2373],{},[187,2377,2378,2381,2384,2386,2388],{},[211,2379,2380],{},"2 猜形狀",[211,2382,2383],{},"2.4 萬",[211,2385,2370],{},[211,2387,2373],{},[211,2389,2373],{},[187,2391,2392,2395,2398,2400,2402],{},[211,2393,2394],{},"3 猜語言與複製頭",[211,2396,2397],{},"716 萬",[211,2399,2373],{},[211,2401,2370],{},[211,2403,2373],{},[187,2405,2406,2409,2412,2414,2416],{},[211,2407,2408],{},"4 修卡住的車",[211,2410,2411],{},"17 萬",[211,2413,2370],{},[211,2415,2373],{},[211,2417,2373],{},[187,2419,2420,2423,2426,2428,2430],{},[211,2421,2422],{},"5 從零寫 MinAtar",[211,2424,2425],{},"2 萬",[211,2427,2373],{},[211,2429,2373],{},[211,2431,2373],{},[187,2433,2434,2437,2440,2442,2444],{},[211,2435,2436],{},"6 從零寫圍棋",[211,2438,2439],{},"148 萬",[211,2441,2373],{},[211,2443,2370],{},[211,2445,2446],{},"✓（0–50 次）",[187,2448,2449,2452,2455,2457,2459],{},[211,2450,2451],{},"7 找出阿諛模型",[211,2453,2454],{},"2.7 億",[211,2456,2373],{},[211,2458,2370],{},[211,2460,2461],{},"✓（只看 attention）",[187,2463,2464,2467,2470,2472,2474],{},[211,2465,2466],{},"8 修 Qwen 數學",[211,2468,2469],{},"約 8 億",[211,2471,2373],{},[211,2473,2370],{},[211,2475,2476],{},"✓（50 次前向）",[111,2478,2479],{},"（表依 Honnibal 的整理改寫，數字用他的級距。實驗 4 另外拿到一段失敗錄影。實驗 5 的權重從 0 開始，沒有東西可讀。實驗 7 只看權重時四次全錯，加上 attention 工具才三對三。）",[111,2481,2482],{},"真正「只看原始權重、不給工具、不跑模型」的，只有實驗 1、2、4。對象是 1.7 萬到 17 萬個權重的小網路。",[111,2484,2485],{},"所有碰到真語言模型的實驗都用 Python。Qwen 那組還被允許跑 50 次前向。",[111,2487,2488],{},"摘要卻把三種能力寫成一句話：「只看原始權重，就能理解並修改另一個模型。」讀者自然會以為是同一招。",[111,2490,2491],{},"還有一件事更硬。那次數學實驗的提示詞裡，作者直接寫了：",[108,2493,2494],{},[111,2495,2496],{},"if the model often fails because it repeats itself and never finishes, finding and fixing what drives that repetition counts",[111,2498,2499,2500],{},"也就是說，",[295,2501,2502],{},"「重複」被當成有效修改的例子，寫在任務說明裡。",[111,2504,2505],{},"他們也做了一個拿掉這個提示的版本（v4）。10 次前向時不再交出修改，25 次只到 14.1%，而且沒有跑 50 次的版本。",[111,2507,2508],{},"所以「沒有提示時能不能到 48.1」，公開資料回答不了。",[111,2510,2511],{},"（v4 除了拿掉失敗範例，還改了練習題與驗證題的分法和流程。這個對照不乾淨，但方向值得記住。）",[111,2513,2514],{},"也該給作者記一筆。貼文公開後不久，他們改了摘要：把「遠超過人類或傳統演算法」拿掉，換成比較保留的說法。",[111,2516,2517],{},"負面實驗照登，logs 全部公開，檢查點也放出來。",[111,2519,2520],{},"我的判斷：能力是真的。代價與包裝被放大，但證據鏈沒有斷。",[111,2522,2523,2524,2529],{},"Hugging Face 上的",[118,2525,2528],{"href":2526,"rel":2527},"https:\u002F\u002Fhuggingface.co\u002FprithivMLmods\u002FQwen3.5-0.8B-weight-space-programming-GGUF",[122],"重建版","重跑 500 題，編輯後拿到 51.0%，撞上限 31.6%。換一個人、換一張卡，結論沒變。",[148,2531,2532],{"id":2532},"你明天可以做的四件事",[111,2534,2535],{},"不用等下一篇論文。任何一次「改完之後分數變好」，都可以用這四步驗。",[1020,2537,2538,2551,2557,2568],{},[957,2539,2540,2546,2547,2550],{},[295,2541,2542,2543,298],{},"加一欄 ",[126,2544,2545],{},"finish_reason"," 那是 API 回傳的結束原因，等於 ",[126,2548,2549],{},"length"," 就是被上限截斷。這個比例超過 10%，就不要直接比總分。",[957,2552,2553,2556],{},[295,2554,2555],{},"看截斷回應的尾巴。"," 8-gram 重複率，就是連續八個 token 一模一樣的比例。太高，表示它在繞圈，不是題目太難。",[957,2558,2559,2562,2563,2567],{},[295,2560,2561],{},"核設定。"," 思考模式開關、temperature、token 上限，跟 model card 對一次。這篇的基準是強制開思考、temperature 0.6、presence penalty 1.5、上限 32,768；",[118,2564,2000],{"href":2565,"rel":2566},"https:\u002F\u002Fhuggingface.co\u002FQwen\u002FQwen3.5-0.8B",[122]," 的預設是非思考模式。",[957,2569,2570,2573],{},[295,2571,2572],{},"加一個不會打轉的對照模型。"," 它沒進步，你看到的就不是能力提升。",[111,2575,2576,2577,298],{},"四個步驟都不需要幾十小時的模型對話，只需要一個 ",[126,2578,2579],{},"if",[111,2581,2582],{},"那什麼時候真的值得改權重？三種情況。",[954,2584,2585,2588,2591],{},[957,2586,2587],{},"病理已經被寫進 model card，像這顆模型的迴圈，Qwen 自己警告過",[957,2589,2590],{},"你沒有資料或算力做微調",[957,2592,2593],{},"你接受它現在是研究階段：一次成功的編輯花了 80 次程式執行、158 輪對話，接近一整天",[111,2595,2596],{},"作者自己也說，還沒證明比微調便宜。",[148,2598,2600],{"id":2599},"三個問題加上一句提醒","三個問題，加上一句提醒",[111,2602,2603],{},"下次看到「某個方法讓模型變強六倍」，先問三題。",[954,2605,2606,2609,2612],{},[957,2607,2608],{},"分母是什麼？（基準是在哪個設定下量的）",[957,2610,2611],{},"上限是多少？（有多少題根本沒講完）",[957,2613,2614],{},"有沒有對照組？（換一顆不會打轉的模型，還成立嗎）",[111,2616,2617],{},"這三題擋不掉所有誤讀，但能擋掉大部分新聞。",[111,2619,2620],{},"如果你正在選地端模型，或評估一個「調完之後變很好」的內部結果，我們做過類似的事。",[111,2622,2623,2624,1985],{},"把能跑、能回答、能通過驗收拆成四層（",[118,2625,2627],{"href":2626},"\u002Fblog\u002Frunning-is-not-done","「跑得起來」跟「真的幹完活」是四件事",[111,2629,2630,2631,1985],{},"同一個道理換到量化模型，是「檔案本身可能是壞的」（",[118,2632,2633],{"href":322},"你下載的量化模型可能是壞的",[111,2635,2636,2637,1985],{},"而「把移除障礙寫成能力進化」這個模式，我們也寫過一次（",[118,2638,2640],{"href":2639},"\u002Fblog\u002Feth-refuted-not-p-np","「推翻 ETH」不是「攻破 P=NP」",[111,2642,2643,2644],{},"這三篇講的是同一件事：",[295,2645,2646],{},"分數變好，跟模型變強，是兩個不同的句子。",[111,2648,2649],{},"要把它們分開，只需要一欄資料。而那一欄，你今天的 pipeline 其實就有了。",[111,2651,2652,2653,2657],{},"想把這件事變成團隊的例行檢查？我們做",[118,2654,2656],{"href":2655},"\u002Fservices","地端 AI 導入","時，第一件事就是這個：先量，再決定要不要換模型。",[148,2659,2660],{"id":2660},"資料來源",[954,2662,2663,2671,2680,2692,2700,2709,2722],{},[957,2664,2665,2666,2670],{},"原始貼文：",[118,2667,2669],{"href":1964,"rel":2668},[122],"Sparks of Weight-Space Programming","（Rikiya Takehi、Jayden Teoh、Alex Zhang、Omar Khattab，2026-11-02；未同儕審查）",[957,2672,2673,2674,2679],{},"完整 logs：",[118,2675,2678],{"href":2676,"rel":2677},"https:\u002F\u002Fgithub.com\u002FRikiyaT\u002Flm_understand-logs",[122],"RikiyaT\u002Flm_understand-logs","，1,125 次模型調用",[957,2681,2682,2683,2687,2688],{},"檢查點：",[118,2684,2686],{"href":2137,"rel":2685},[122],"RikiyaT\u002FQwen3.5-0.8B-weight-space-programming","；重建版重跑數據見 ",[118,2689,2691],{"href":2526,"rel":2690},[122],"GGUF 卡",[957,2693,2694,2695,2699],{},"逐題重算（1,152 題配對、579／576、隨機方向對照）：硅星人Pro〈",[118,2696,2698],{"href":1982,"rel":2697},[122],"刷屏的「Astra 改造 Qwen 大腦」跟我們想要的 RSI 沒多大關係","〉，2026-11-05",[957,2701,2702,2703,2708],{},"另一份獨立整理：",[118,2704,2707],{"href":2705,"rel":2706},"https:\u002F\u002Ftraictory.com\u002Fnews\u002F2026-11-04-mit-weight-space-programming",[122],"traictory","，2026-11-04",[957,2710,2711,2712,2716,2717],{},"批評：",[118,2713,2715],{"href":2327,"rel":2714},[122],"Honnibal","，2026-11-03；",[118,2718,2721],{"href":2719,"rel":2720},"https:\u002F\u002Fsimonwillison.net\u002F2026\u002FNov\u002F3\u002Fqwen-can-interpret-model-weights\u002F",[122],"Simon Willison 的整理",[957,2723,2724,2725],{},"採樣設定與預設模式：",[118,2726,2728],{"href":2565,"rel":2727},[122],"Qwen3.5-0.8B model card",{"title":1052,"searchDepth":1053,"depth":1053,"links":2730},[2731,2732,2733,2734,2735,2736,2737,2738,2739],{"id":1949,"depth":1053,"text":1949},{"id":1991,"depth":1053,"text":1991},{"id":2108,"depth":1053,"text":2109},{"id":2187,"depth":1053,"text":2188},{"id":2273,"depth":1053,"text":2274},{"id":2317,"depth":1053,"text":2318},{"id":2532,"depth":1053,"text":2532},{"id":2599,"depth":1053,"text":2600},{"id":2660,"depth":1053,"text":2660},"\u002Fimages\u002Fblog\u002Fweight-edit-loop-repair.svg","標題「它沒有變聰明，只是不再打轉」的技術筆記封面","2026-11-08","一個 0.8B 小模型改掉 0.016% 的權重，MATH-500 從 7.9% 跳到 48.1%。但逐題比對後，救回來的 579 題裡有 576 題原本是被 32,768 token 上限截斷的；已經答完的 114 題，正確率完全沒變。這篇把六倍拆開，給你四步檢查——下次看到分數暴漲時，先看截斷率，再看對照組。",{},"\u002Fimages\u002Fblog\u002Fweight-edit-loop-repair.jpg","\u002Fblog\u002Fzh-tw\u002Fweight-edit-loop-repair",{"title":1939,"description":2743},"weight-edit-loop-repair","blog\u002Fzh-TW\u002Fweight-edit-loop-repair",[1078,2751,1081,2752],"reasoning-models","interpretability","WA7IcJhsMEwChZwPlmimkW-vQze8P_jzZWU7jGg1Yxw",{"id":2755,"title":2756,"author":103,"body":2757,"cover":3610,"coverAlt":3611,"date":3612,"description":3613,"draft":1067,"extension":1068,"featured":1067,"lang":1069,"meta":3614,"navigation":1071,"ogImage":3615,"path":3616,"seo":3617,"slug":3618,"stem":3619,"tags":3620,"translationKey":3618,"updated":1082,"__hash__":3623},"blog\u002Fblog\u002Fzh-TW\u002Fmacaq-one-layer-at-a-time.md","量化 122B，一次只裝一層",{"type":105,"value":2758,"toc":3600},[2759,2778,2780,2783,2786,2792,2795,2798,2801,2804,2808,2811,2814,2817,2820,2823,2826,2829,2832,2835,2838,2921,2924,2927,2930,2933,2936,2939,2942,2945,2948,2951,2957,3026,3029,3040,3047,3050,3053,3056,3060,3063,3066,3069,3072,3075,3082,3129,3132,3135,3139,3142,3145,3148,3151,3154,3157,3160,3262,3265,3268,3271,3274,3284,3287,3291,3294,3297,3300,3307,3345,3348,3351,3427,3430,3449,3456,3459,3481,3488,3495,3498,3505,3508,3511,3559,3562,3564,3586,3593,3596],[108,2760,2761,2764],{},[111,2762,2763],{},"數字來自 arXiv 2611.10649（v1 11-07、v2 11-11）與官方程式庫 README。作者是華為 Cloud & AI Lab；程式庫是 Apache 2.0。我們沒有獨立重跑，「我認為」的地方會標出來。MACaQ-R 的 R 是 refine。",[111,2765,2766,2767,2772,2773],{},"論文：",[118,2768,2771],{"href":2769,"rel":2770},"https:\u002F\u002Farxiv.org\u002Fabs\u002F2611.10649",[122],"arXiv 2611.10649","｜程式庫：",[118,2774,2777],{"href":2775,"rel":2776},"https:\u002F\u002Fgithub.com\u002Fhuawei-csl\u002FMACaQ",[122],"huawei-csl\u002FMACaQ",[148,2779,1949],{"id":1949},[111,2781,2782],{},"量化一個 122B 模型，64 分鐘、32.5 GB 顯示記憶體，一台單卡機就夠。就算你手上沒有 122B 也沒關係。同一套做法讓 MACaQ-R 能修好你已經下載的那個 GGUF。",[111,2784,2785],{},"這件事以前得先有「放得下 244 GB」的機器。",[111,2787,2788,2791],{},[126,2789,2790],{},"Qwen3.5-122B-A10B"," 的 FP16 權重是 244 GB。它是 96 GB 卡的 2.5 倍，兩張放不下，三張才勉強。",[111,2793,2794],{},"量化聽起來是「把模型變小」。但量化這個動作本身，得先有模型。旋轉、校準、算 Hessian，每一樣都吃記憶體。Hessian 用來估計「這個權重改一點，輸出會被影響多少」。",[111,2796,2797],{},"所以大模型量化卡住的地方，常常不是算力，是「你得先裝得下它」。",[111,2799,2800],{},"MACaQ 換了一個順序：一次只需要一層在 GPU 上。其餘的權重留在主機記憶體，用完就換下一層。",[111,2802,2803],{},"這篇講三件事。舊方法為什麼被記憶體卡住。它把哪個成本搬到推論時、代價多少。還有你手上那個 GGUF（llama.cpp 的模型檔格式）怎麼變好。",[148,2805,2807],{"id":2806},"量化-122b要先裝得下-122b","量化 122B，要先裝得下 122B",[111,2809,2810],{},"先講為什麼量化大模型要旋轉。",[111,2812,2813],{},"權重和激活裡總有幾個特別大的值。壓到 4-bit 時，一個離群值會把整組的尺度撐大。其他值就被壓成同一個格子。",[111,2815,2816],{},"（這裡的 4-bit 是 MXFP4，一種 4-bit 浮點。每 32 個值共用一個 2 的冪次尺度。）",[111,2818,2819],{},"做法是先把資料旋轉一下。旋轉不改變矩陣乘法的結果，但會把離群值攤開。每個座標看起來比較像鐘形分布，格點才夠用。",[111,2821,2822],{},"問題在「什麼時候旋轉」。",[111,2824,2825],{},"QuaRot、SpinQuant、DuQuant++ 都是這一類。它們把旋轉矩陣融進相鄰層的權重。推論時幾乎不用多做，旋轉已經變成權重的一部分。這是它們最漂亮的地方。",[111,2827,2828],{},"代價在量化時。旋轉要跨層傳遞，你得知道這個模型的層怎麼排。attention 的輸出投影在哪、residual 從哪裡加回來。架構不同，融法就不同。",[111,2830,2831],{},"而且層跟層之間有了依賴，量化時就沒辦法「只看一層」。",[111,2833,2834],{},"把成本放在量化時還是推論時，是這個領域主要的分岔。沒有誰比較笨。",[111,2836,2837],{},"表 1：四種做法的旋轉放在哪",[181,2839,2840,2859],{},[184,2841,2842],{},[187,2843,2844,2847,2850,2853,2856],{},[190,2845,2846],{},"方法",[190,2848,2849],{},"旋轉放哪",[190,2851,2852],{},"量化時跨層",[190,2854,2855],{},"只裝一層",[190,2857,2858],{},"推論成本",[206,2860,2861,2878,2892,2905],{},[187,2862,2863,2866,2869,2872,2875],{},[211,2864,2865],{},"QuaRot",[211,2867,2868],{},"融進相鄰層權重",[211,2870,2871],{},"要",[211,2873,2874],{},"不行",[211,2876,2877],{},"幾乎不另做",[187,2879,2880,2883,2886,2888,2890],{},[211,2881,2882],{},"SpinQuant",[211,2884,2885],{},"融進相鄰層權重（旋轉可學習）",[211,2887,2871],{},[211,2889,2874],{},[211,2891,2877],{},[187,2893,2894,2897,2899,2901,2903],{},[211,2895,2896],{},"DuQuant++",[211,2898,2868],{},[211,2900,2871],{},[211,2902,2874],{},[211,2904,2877],{},[187,2906,2907,2910,2913,2915,2918],{},[211,2908,2909],{},"MACaQ",[211,2911,2912],{},"推論時線上做",[211,2914,222],{},[211,2916,2917],{},"可以",[211,2919,2920],{},"多 2.3%",[111,2922,2923],{},"表 1 是概念對照，不是本文的實測名單。這篇只拿 DuQuant++ 與 MR-GPTQ 對照；論文另外也比了 QuaRot 與 FlatQuant。",[111,2925,2926],{},"它要講的只有一件事。MACaQ 不是更聰明的旋轉，是把旋轉換到另一個時間點。",[148,2928,2929],{"id":2929},"它把旋轉留在推論時做",[111,2931,2932],{},"MACaQ 選了另一邊：旋轉不融進權重，留在推論時算。",[111,2934,2935],{},"每一層的 activation 進來，先乘上一個 per-channel 尺度。接著做 block-Hadamard 轉換。Hadamard 是快速、可逆的線性變換，負責把離群值攤平。",[111,2937,2938],{},"權重那邊，預先把反轉換吸收掉。所以結果等價，只是把同一份乘法從量化時搬到推論時。",[111,2940,2941],{},"關鍵不是省不省，是誰依賴誰。",[111,2943,2944],{},"旋轉留線上之後，每一層只需要自己的權重、自己的 activation 統計。層與層之間沒有依賴了。",[111,2946,2947],{},"於是量化可以串流。搬一層進 GPU、算完、寫出去、釋放，再搬下一層。同一時間，GPU 上只有一層。",[111,2949,2950],{},"論文的做法是 lazy loading，其餘權重留在主機記憶體。原文的說法很直白：只有正在處理的那一層需要待在 GPU 上。",[111,2952,2953,2954,2956],{},"表 2：",[126,2955,2790],{}," 這次的數字（論文 §Large-Model Quantization）",[181,2958,2959,2968],{},[184,2960,2961],{},[187,2962,2963,2965],{},[190,2964,460],{},[190,2966,2967],{},"數字",[206,2969,2970,2978,2986,2994,3002,3010,3018],{},[187,2971,2972,2975],{},[211,2973,2974],{},"總參數",[211,2976,2977],{},"122B（MoE 混合專家，A10B 是每次啟用的參數）",[187,2979,2980,2983],{},[211,2981,2982],{},"FP16 權重",[211,2984,2985],{},"約 244 GB",[187,2987,2988,2991],{},[211,2989,2990],{},"機器",[211,2992,2993],{},"單張 96 GB GPU（只給 504 TFLOPS FP16、1.79 TB\u002Fs，不寫型號）",[187,2995,2996,2999],{},[211,2997,2998],{},"量化時 GPU 峰值",[211,3000,3001],{},"32.5 GB",[187,3003,3004,3007],{},[211,3005,3006],{},"量化時間",[211,3008,3009],{},"64 分鐘（32 flips、512K 校準 token）",[187,3011,3012,3015],{},[211,3013,3014],{},"WikiText-2 困惑度",[211,3016,3017],{},"5.14（FP16 是 5.06）",[187,3019,3020,3023],{},[211,3021,3022],{},"量化後推論需求",[211,3024,3025],{},"74 GB，同一張卡跑得起來",[111,3027,3028],{},"如圖 1，左邊是「旋轉跟著層走」，量化時兩層互相依賴。右邊是「旋轉留在線上」，同一時間只有一層在 GPU 裡。",[276,3030,280,3032,280,3037],{"className":3031},[279],[2177,3033],{"src":3034,"poster":3035,"autoPlay":1071,"loop":1071,"muted":1071,"playsInline":1071,"ariaLabel":3036},"\u002Fimages\u002Fblog\u002Fmacaq-one-layer-at-a-time\u002Fstreaming.mp4","\u002Fimages\u002Fblog\u002Fmacaq-one-layer-at-a-time\u002Fstreaming-poster.jpg","左邊是旋轉跨層傳播、量化時兩層依賴；右邊是每層獨立、一次只有一層進 GPU",[288,3038,3039],{},"圖 1：左邊的轉換跟著層走，量化時要跨層處理；右邊把轉換留到推論，一層進、一層出。",[111,3041,3042,3043,3046],{},"讀者最容易誤讀的一格是 32.5 GB。那是",[295,3044,3045],{},"顯示記憶體","的高峰，不是全部。那 244 GB 的 FP16 權重還在主機記憶體裡，只是不用同時進 GPU。",[111,3048,3049],{},"所以真正的門檻是「一張夠大的卡，加一台夠大的主機」。不是「32.5 GB 就夠」。這點很容易漏。",[111,3051,3052],{},"還有一件事：它不改架構。同一套流程拿去跑影像模型也行。程式庫列了三個範例。FLUX.2 Klein 4B 是影像，Wan2.2 是影片，stable-audio 是音訊。論文自己只示範了一個影像模型，說法是「不需要針對架構做修改」。",[111,3054,3055],{},"我認為對手上什麼模型都有的人，這個「模型無關」比 64 分鐘更有價值。",[148,3057,3059],{"id":3058},"代價多-23","代價：多 2.3%",[111,3061,3062],{},"線上做轉換不是免費的。相對純 MXFP4，Qwen3-32B 在 vLLM 上端到端多 2.3%。122B 那組，論文沒有量推論開銷。",[111,3064,3065],{},"論文另外用一張圖拆給你看。這個開銷在 decode 端量：batch 1、context 512。模型越大，占比越小，因為矩陣乘法越久，旋轉那幾個乘法相對越輕。",[111,3067,3068],{},"我認為這 2.3% 買到的是「不用理解架構」。這是整篇的樞紐。",[111,3070,3071],{},"另一組常被搞混的數字在表 3。模型是 Qwen3.8-27B，後端是 vLLM。相對 BF16，prefill 是 2.33×、decode 是 2.58×。",[111,3073,3074],{},"這是「相對 BF16 的吞吐量」。數字是 2.33×／2.58×，不是「相對 MXFP4 快 2.33 倍」。兩個基準差很遠，寫混了整段就報廢。",[111,3076,3077,3078,3081],{},"表 3：",[126,3079,3080],{},"Qwen3.8-27B"," 在 vLLM 上的品質與速度（官方 README，基準 BF16 = 1.00×）",[181,3083,3084,3100],{},[184,3085,3086],{},[187,3087,3088,3091,3094,3097],{},[190,3089,3090],{},"精度",[190,3092,3093],{},"困惑度 ↓（README 未寫資料集）",[190,3095,3096],{},"prefill",[190,3098,3099],{},"decode",[206,3101,3102,3115],{},[187,3103,3104,3107,3110,3113],{},[211,3105,3106],{},"BF16",[211,3108,3109],{},"2.8463",[211,3111,3112],{},"1.00×",[211,3114,3112],{},[187,3116,3117,3120,3123,3126],{},[211,3118,3119],{},"MACaQ W4A4",[211,3121,3122],{},"2.8994",[211,3124,3125],{},"2.33×",[211,3127,3128],{},"2.58×",[111,3130,3131],{},"W4A4 的意思是權重 4-bit、激活也 4-bit。困惑度從 2.8463 到 2.8994，是 +1.9%。這不是「幾乎無損」，是「有損但很便宜」。",[111,3133,3134],{},"表 3 的數字來自官方 README，跟表 2 不是同一組實驗。別跨表比。",[148,3136,3138],{"id":3137},"同樣的品質時間少一截","同樣的品質，時間少一截",[111,3140,3141],{},"4-bit 的格點有限。四捨五入（round-to-nearest，RTN）選最近的格子。它只看自己，不看別人。",[111,3143,3144],{},"MACaQ 多做一步：翻一個碼。",[111,3146,3147],{},"做法是把單一 FP4 碼挪到相鄰的可表示值。不是重新量化，只是換一格。",[111,3149,3150],{},"要不要翻，由整層的損失決定。用 Hessian 近似：這一格改了，輸出會被影響多少。然後貪心地翻，一次一個。",[111,3152,3153],{},"為什麼便宜？候選只有左邊那格和右邊那格。搜尋空間小，不用做連續最佳化。",[111,3155,3156],{},"有兩個旋鈕：翻幾輪（flips），和用多少校準 token。要快就少翻，要好就多翻。表 4 是論文附錄逐格往上爬的原始數字（Llama-3-8B）。",[111,3158,3159],{},"表 4：Llama-3-8B 的取捨（MXFP4 W4A4，WikiText-2 困惑度）",[181,3161,3162,3174],{},[184,3163,3164],{},[187,3165,3166,3169,3171],{},[190,3167,3168],{},"設定",[190,3170,3006],{},[190,3172,3173],{},"困惑度 ↓",[206,3175,3176,3186,3197,3208,3219,3230,3241,3251],{},[187,3177,3178,3181,3183],{},[211,3179,3180],{},"FP16（不量化，參考）",[211,3182,2373],{},[211,3184,3185],{},"6.14",[187,3187,3188,3191,3194],{},[211,3189,3190],{},"RTN：只四捨五入",[211,3192,3193],{},"2.2 秒",[211,3195,3196],{},"8.29",[187,3198,3199,3202,3205],{},[211,3200,3201],{},"MACaQ：0 flips（旋轉＋指數篩選）",[211,3203,3204],{},"5.5 秒",[211,3206,3207],{},"7.64",[187,3209,3210,3213,3216],{},[211,3211,3212],{},"MACaQ：1 塊校準（2048 token）",[211,3214,3215],{},"14.8 秒",[211,3217,3218],{},"7.11",[187,3220,3221,3224,3227],{},[211,3222,3223],{},"MACaQ：128 flips、31 塊",[211,3225,3226],{},"88.1 秒",[211,3228,3229],{},"6.91",[187,3231,3232,3235,3238],{},[211,3233,3234],{},"MACaQ：512 flips、977 塊",[211,3236,3237],{},"636.9 秒",[211,3239,3240],{},"6.85",[187,3242,3243,3246,3249],{},[211,3244,3245],{},"MR-GPTQ：128 塊",[211,3247,3248],{},"319.1 秒",[211,3250,3218],{},[187,3252,3253,3256,3259],{},[211,3254,3255],{},"DuQuant++（GPTQ）：128 塊",[211,3257,3258],{},"624.4 秒",[211,3260,3261],{},"7.16",[111,3263,3264],{},"MACaQ 那幾列是同一條曲線上的不同取捨，校準量不一樣。MR-GPTQ 與 DuQuant++ 那兩列是各自的 128 塊設定。別逐列比速度，那是不同預算下的單點。論文自己的公平對照是 128 flips、約 20 萬 token，Llama-3-8B 上約 150 秒，落在 6.90。",[111,3266,3267],{},"這張表比一個「快 11×」的標題有用。你可以直接挑自己的那一列。",[111,3269,3270],{},"摘要的說法是：在 Llama-3-8B 上打平對手最好的困惑度，時間只要 1\u002F11。我們不換算成一個比值放進文章。表 4 是逐格往上爬的單點，摘要那條是曲線。要選型，看表。",[111,3272,3273],{},"如圖 2，翻一個碼的意思：四捨五入選最近的格子，翻碼是換到隔壁一格。但那次換要不要做，看的是整層的損失。",[276,3275,280,3277,280,3281],{"className":3276},[279],[282,3278],{"src":3279,"alt":3280,"loading":286},"\u002Fimages\u002Fblog\u002Fmacaq-one-layer-at-a-time\u002Fflip-grid.svg","FP4 格點示意：四捨五入到最近的點，以及翻到相鄰點的候選，取捨由整層損失決定",[288,3282,3283],{},"圖 2：格點之間只有鄰居可選，所以「翻一個碼」很便宜；貴的是判斷要不要翻——那要算整層的損失。示意圖，位置不是論文實測值。",[111,3285,3286],{},"還有一件事要講清楚：這不是「4-bit 無損」。最好的設定也是 6.14 變 6.85，困惑度多了大約 12%。RTN 是 8.29。兩者都是「有損」，差別在損失多少、以及你願不願意付時間。",[148,3288,3290],{"id":3289},"你手上那個-gguf可以修","你手上那個 GGUF，可以修",[111,3292,3293],{},"上面講的是「重新量化一個模型」。多數人手上沒有那個情境，只有一堆下載好的 GGUF。",[111,3295,3296],{},"MACaQ-R 是給這個情境的。拿一個現成的 GGUF，配它的 FP16 原檔當 teacher。跑一次 refine。",[111,3298,3299],{},"碼重排，格式與 block scale 都不動。所以修完的檔案，用標準 llama.cpp 就能跑。",[111,3301,3302,3303,3306],{},"表 5：",[126,3304,3305],{},"Qwen3.6-35B-A3B"," 的 MACaQ-R 前後（官方 README 自測）",[181,3308,3309,3322],{},[184,3310,3311],{},[187,3312,3313,3316,3319],{},[190,3314,3315],{},"版本",[190,3317,3318],{},"GGUF 大小",[190,3320,3321],{},"對 FP16 的 KL 散度 ↓",[206,3323,3324,3335],{},[187,3325,3326,3329,3332],{},[211,3327,3328],{},"Unsloth UD-Q4_K_XL",[211,3330,3331],{},"22.36 GB",[211,3333,3334],{},"0.015731",[187,3336,3337,3340,3342],{},[211,3338,3339],{},"MACaQ-R Q4_K_XL",[211,3341,3331],{},[211,3343,3344],{},"0.013367",[111,3346,3347],{},"KL 散度是「兩個分布差多少」，越低越好。同一個大小，從 0.015731 降到 0.013367，低 15.0%。檔案沒變大，執行方式也沒變。換的只是每一格碼選哪個值。",[111,3349,3350],{},"指令是 README 原文，四行：",[3352,3353,3357],"pre",{"className":3354,"code":3355,"language":3356,"meta":1052,"style":1052},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight",".venv-llamacpp\u002Fbin\u002Fpython llamacpp\u002Fmacaq.py refine \\\n  --model models\u002Fmodel-q4.gguf --hf models\u002Foriginal \\\n  --teacher models\u002Foriginal-f16.gguf --calibration data\u002Fcalibration.txt \\\n  --output models\u002Fmodel-macaq-r.gguf --work-dir work\u002Frefinement\n","bash",[126,3358,3359,3379,3395,3412],{"__ignoreMap":1052},[3360,3361,3364,3368,3372,3375],"span",{"class":3362,"line":3363},"line",1,[3360,3365,3367],{"class":3366},"sBMFI",".venv-llamacpp\u002Fbin\u002Fpython",[3360,3369,3371],{"class":3370},"sfazB"," llamacpp\u002Fmacaq.py",[3360,3373,3374],{"class":3370}," refine",[3360,3376,3378],{"class":3377},"sTEyZ"," \\\n",[3360,3380,3381,3384,3387,3390,3393],{"class":3362,"line":1053},[3360,3382,3383],{"class":3370},"  --model",[3360,3385,3386],{"class":3370}," models\u002Fmodel-q4.gguf",[3360,3388,3389],{"class":3370}," --hf",[3360,3391,3392],{"class":3370}," models\u002Foriginal",[3360,3394,3378],{"class":3377},[3360,3396,3398,3401,3404,3407,3410],{"class":3362,"line":3397},3,[3360,3399,3400],{"class":3370},"  --teacher",[3360,3402,3403],{"class":3370}," models\u002Foriginal-f16.gguf",[3360,3405,3406],{"class":3370}," --calibration",[3360,3408,3409],{"class":3370}," data\u002Fcalibration.txt",[3360,3411,3378],{"class":3377},[3360,3413,3415,3418,3421,3424],{"class":3362,"line":3414},4,[3360,3416,3417],{"class":3370},"  --output",[3360,3419,3420],{"class":3370}," models\u002Fmodel-macaq-r.gguf",[3360,3422,3423],{"class":3370}," --work-dir",[3360,3425,3426],{"class":3370}," work\u002Frefinement\n",[111,3428,3429],{},"修完直接跑，後端不用換：",[3352,3431,3433],{"className":3354,"code":3432,"language":3356,"meta":1052,"style":1052},"llama cli -m models\u002Fmodel-macaq-r.gguf\n",[126,3434,3435],{"__ignoreMap":1052},[3360,3436,3437,3440,3443,3446],{"class":3362,"line":3363},[3360,3438,3439],{"class":3366},"llama",[3360,3441,3442],{"class":3370}," cli",[3360,3444,3445],{"class":3370}," -m",[3360,3447,3448],{"class":3370}," models\u002Fmodel-macaq-r.gguf\n",[111,3450,3451,3452,3455],{},"llama.cpp 不同版本的執行檔名稱不一樣。舊版是 ",[126,3453,3454],{},"llama-cli","，照你裝的那個用。",[111,3457,3458],{},"看起來簡單，前置條件不簡單。README 有寫的三條：",[954,3460,3461,3472,3478],{},[957,3462,3463,3464,3467,3468,3471],{},"要 ",[295,3465,3466],{},"Python 3.12","，而且每個 backend 一個獨立環境。不是 ",[126,3469,3470],{},"pip install"," 就結束",[957,3473,3463,3474,3477],{},[295,3475,3476],{},"FP16 原檔","當 teacher。只有 GGUF、沒有原檔的人，這一步就卡住",[957,3479,3480],{},"要一份校準文字檔，以及對應的原始權重目錄",[111,3482,3483,3484,3487],{},"還有一個限制。表 5 只有一組對照，單一模型、單一 baseline。",[295,3485,3486],{},"不能推廣成「所有 GGUF 都能改善 15%」。"," 你的模型可能進步更多，也可能沒差。要判斷，只能自己量 KL。",[111,3489,3490,3491,298],{},"修完之後跑多快，不是這篇的主題。那取決於位元寬與 kernel 怎麼寫。系列裡寫過：",[118,3492,3494],{"href":3493},"\u002Fblog\u002Fquantization-kernel-dispatch","量化會不會加速，取決於你怎麼寫 kernel",[148,3496,3497],{"id":3497},"別過度解讀",[111,3499,3500,3501,3504],{},"論文自己把代價寫在 Limitations 第一句。layer-local 的設計，意味著",[295,3502,3503],{},"跨層錯誤補償做不到","。要補，就得再加一趟跨層統計的 pass。那大概會退回其他方法的時間。",[111,3506,3507],{},"這是設計上的取捨，不是疏忽。",[111,3509,3510],{},"其他該知道的：",[954,3512,3513,3519,3525,3531,3537,3543,3553],{},[957,3514,3515,3518],{},[295,3516,3517],{},"沒有第三方複現。"," 11-07 首發，對照的 DuQuant++、MR-GPTQ 都是作者自己跑的",[957,3520,3521,3524],{},[295,3522,3523],{},"W4A4 的公開數字集中在少數模型。"," 別把 Qwen3.8-27B 的 +1.9% 當通則",[957,3526,3527,3530],{},[295,3528,3529],{},"MoE 只量化 expert 層。"," 另外 embeddings 與 lm-head 在所有模型上都不量化",[957,3532,3533,3536],{},[295,3534,3535],{},"122B 那組的預算跟其他實驗不同","：32 flips、512K 校準 token；公平對照時用的是 128 flips、約 20 萬 token",[957,3538,3539,3542],{},[295,3540,3541],{},"Qwen3.5／3.6／3.8 是不同世代","，數字不要互相對照",[957,3544,3545,3548,3549,3552],{},[295,3546,3547],{},"Ascend 不是開箱即用。"," 要 CANN 與 ",[126,3550,3551],{},"torch_npu","。官方只給 kernel PR，整模型還要接推理 runtime",[957,3554,3555,3558],{},[295,3556,3557],{},"32.5 GB 是顯示記憶體，不是全部。"," 你的主機要有地方放那 244 GB",[111,3560,3561],{},"還有那個 +2.3%：它是對「純 MXFP4」算的。如果你的比較基準是 BF16，MACaQ 還是快兩倍多（表 3）。同一個方法，換一個分母，結論就換一個方向。",[148,3563,1018],{"id":1018},[1020,3565,3566,3574,3580],{},[957,3567,3568,3571,3572,298],{},[295,3569,3570],{},"先量基準","。如果你手上已經有一個 GGUF，配 FP16 原檔算一次 KL，就有自己的一條線。README 沒有附量 KL 的腳本，得自己找。沒有基準，任何「低 15%」都是別人的數字。也先確認你手上那個不是壞的，見",[118,3573,2633],{"href":322},[957,3575,3576,3579],{},[295,3577,3578],{},"跑一次 refine","。有原檔就跑，跑完用你平常那支 llama.cpp 跑同一題，比輸出。沒變好，你只損失一次 refine 的時間。",[957,3581,3582,3585],{},[295,3583,3584],{},"要自己量化 100B 級模型的人，現在一台單卡機就夠。"," 前提是主機記憶體放得下 FP16 權重。",[111,3587,3588,3589,3592],{},"如果只是想在自己電腦上跑大模型，先看",[118,3590,3591],{"href":1045},"125B 模型怎麼跑在 12GB 顯卡上","。那是另一條路：不改權重，改誰在什麼時候被載入。",[111,3594,3595],{},"量化的門檻換了位置：從一張卡，搬到一台主機。",[3597,3598,3599],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":1052,"searchDepth":1053,"depth":1053,"links":3601},[3602,3603,3604,3605,3606,3607,3608,3609],{"id":1949,"depth":1053,"text":1949},{"id":2806,"depth":1053,"text":2807},{"id":2929,"depth":1053,"text":2929},{"id":3058,"depth":1053,"text":3059},{"id":3137,"depth":1053,"text":3138},{"id":3289,"depth":1053,"text":3290},{"id":3497,"depth":1053,"text":3497},{"id":1018,"depth":1053,"text":1018},"\u002Fimages\u002Fblog\u002Fmacaq-one-layer-at-a-time.svg","標題「量化 122B，一次只裝一層」的技術筆記封面","2026-11-19","量化一個 122B 模型只要 64 分鐘、32.5 GB 顯示記憶體——因為它不把旋轉矩陣跨層傳播，每層獨立，一次只裝一層。權重留在主機記憶體；在 32B 上量到的代價是推論多 2.3%。MACaQ-R 在一個 35B GGUF 上把 KL 修低 15%，前提是有 FP16 原檔。",{},"\u002Fimages\u002Fblog\u002Fmacaq-one-layer-at-a-time.jpg","\u002Fblog\u002Fzh-tw\u002Fmacaq-one-layer-at-a-time",{"title":2756,"description":3613},"macaq-one-layer-at-a-time","blog\u002Fzh-TW\u002Fmacaq-one-layer-at-a-time",[3621,1078,3622],"quantization","gguf","im6BNKmEd2jNobz5OpyhsjwIzUViuMdNqM7ywhcggCI",1795333223387]