AISpot

b12006: memory: refuse rollbacks past the snapshots of the last ubatch (#31368)

llama.cpp releases版本更新地端推論開源

llama.cpp 建置 b12006 讓 recurrent 快取與 DSV4 快取拒絕超出上一個 ubatch 所保證快照的回滾。此前 seq_rm 允許回滾到 n_rs_seq 內的任意位置,即使該快照並非由上一個 ubatch 寫入;新邏輯下,n 個 token 的 ubatch(n <= n_rs_seq+1)只保證回滾到 n-1,更長的 ubatch 只保證 0,DSV4 的上限則是 min(n, n_rs_seq),其快照由 ubatch 前的狀態重建。

原標題:b12006: memory: refuse rollbacks past the snapshots of the last ubatch (#31368)
閱讀原文

評分44 / 45(平均 44,門檻 60)
狀態未入選

原文

memory: refuse rollbacks past the snapshots of the last ubatch The recurrent memory and the DSV4 cache accepted any rollback up to n_rs_seq, whether or not the last ubatch wrote that snapshot. Each now records the deepest rollback its last ubatch guarantees and seq_rm refuses anything past it: recurrent: n - 1 for a ubatch of n <= n_rs_seq + 1 tokens, 0 for a longer one, which only guarantees the final state DSV4: min(n, n_rs_seq), the snapshots are rebuilt from the state before the ubatch The dead rollback block of the rollback test becomes the assertion it asked for, and rollback_bound checks the exact bound of each memory after ubatches of 1, 2, n_rs_seq + 1 and n_rs_seq + 2 tokens. tests: address review from ggerganov Detect architectures with llama_arch_from_string in comp_padding and arch_reserves_single_seq, as in rollback_bound.

相關報導

llama.cpp releasesAI 評分20

llama.cpp 修復 server 因 n_batch 超限導致的 abort

llama.cpp 合併 PR #29903,通過將 n_batch 限制為不超過 n_ubatch 來修復 server 崩潰問題,對應 issue #29902。該修復由 Claude 輔助完成,並移除了相關測試與 embeddings 條件。新版本已覆蓋 macOS、Linux、Windows、Android 等平台,包括 Apple Silicon、CUDA、ROCm、Vulkan 等後端。

llama.cpp releasesAI 評分36

llama.cpp b11922 修正多序列回放與 partial state 測試

llama.cpp 發布 b11922,主要修正是讓多序列 split replay 與 partial state 的測試在已訓練模型上成立。原測試中回滾快照與參考上下文的 batch 形狀不同,狀態末位差異會被模型逐 token 放大;現在只比較每條序列的首個重放 token,並在 seq-1 的 tail 前把回滾狀態載回參考上下文。

llama.cpp releasesAI 評分42

llama.cpp 修復圖重分配導致的 GGML_SCHED_NO_REALLOC 中止

llama.cpp 合併 PR #29856,將迴圈狀態改為一次 get_rows 收集,ubatch 狀態與額外狀態都作為其檢視,節點大小隻取決於 n_rs,而 reserve 已將其設為最大值。此前 build_rs 用獨立 get_rows 收集 n_rs - n_seqs 行額外狀態,最壞情況下該節點被設為 0 行,非連續 ubatch 會在節點數不變時觸發圖重分配,進而在 GGML_SCHED_NO_REALLOC 下中止。

llama.cpp releasesAI 評分43

b11965: llama : remove simple batch splitting for DSV4 (#31300)

llama.cpp 合入 PR #31300,移除 DeepSeek V4 的簡單批次拆分邏輯,改用已有的序列拆分,讓 n_seq_tokens 與 compressor padding 的計算保持一致。同時還修復了簡單批次下的 compressor padding:寫入時按每條序列的實際 token 數計算,避免奇數尺寸批次出錯。此次還新增 graph 複用迴歸測試,覆蓋單序列與雙序列在不同位置、固定 ubatch 形狀以及 6-token 批次的情況。

llama.cpp releasesAI 評分27

llama.cpp 修復 WebGPU 批長度分配崩潰併發布 b12034

llama.cpp 發布 b12034 建置,修復 WebGPU 後端 scratch 分配大小不隨批長度單調增長的問題:以往用 n_ubatch 或單 token 預留的圖,覆蓋不了 2 到 19 行 query 的批,GGML_SCHED_NO_REALLOC 建置會因意外重分配而中止。修法是把行數傳入 flash attention vec 與 MMVQ 兩條路徑的判定,並按短路徑支援的最長批長度限制 scratch 大小。