본문으로 건너뛰기
AI NEWS JOURNAL
llama.cpp releasesAI NEWS / JOURNAL

b12755

The latest update to llama.cpp adds support for the Tencent Hy4 flash model, including integration with the DSA iSWA cache, optimized KV caching, and improvements for long contexts. The update includes changes to handle sparse and sliding-window layers, Engram tables, and indexer operations, along with optimizations for CUDA, Metal, and CPU backends. Vision tower support and unified KV cache usage are also implemented, while redundant code was removed and comments cleaned up.

번역 서비스가 일시 중지되어 원문을 표시합니다.

<details open> model : add hy_v4_flash on the DSA iSWA cache (#32960) * model : add hy_v4_flash on the DSA iSWA cache Tencent Hy4 flash is a hy_v4 trunk (iHC, gated MLA, sinks) with sparse and sliding-window MLA layers, sandwich norms, latent routed experts and deepseek41 Engram tables. The sparse layers select their context with a pooled indexer: the keys of 4 consecutive tokens are pooled by a per-channel softmax of a gate plus a position bias, normed, and rotated at the position of the first token. A token attends to the best scored pools of its sequence plus its own pool. The model runs on llama_kv_cache_dsa_iswa as dots3note does. The indexer cache holds the projected value and gate of each token, and the pools are rebuilt from the cells for every ubatch by llama_kv_cache::set_input_kpool(), so there is no pooled state to keep in sync with sequence edits, checkpoints or state save/restore. The selection goes through ggml_top_k_mask with the pool members as blocks and the token's own pool as extra cells. Not covered yet: the MTP block (its tensors are skipped), the vision tower, multiple KV streams, and backends without GGML_OP_TOP_K_MASK. * convert : add hy_v4_flash The converter of the hy_v4_flash model, without the vision parts. The four Engram tables are written as one per_layer_token_embd tensor of about 127 GB in BF16. Concatenating them with torch.cat materializes the whole tensor at write time, so they are streamed one table at a time in row chunks through the _StreamedBytes path of deepseek41, which keeps the conversion within 100 GB of RAM. * tests : add hy_v4_flash to test-llama-archs A 4 layer fixture that alternates sparse and sliding-window layers, with hyper-connections, one Engram module, an indexer on the sparse layers and a latent width distinct from the expert width, so that a transposed routed_down or routed_up is caught. * kv-cache : do not shift the pooled indexer cache The pooled indexer of hy_v4_flash caches the value and the gate of each token, without a position: the pooled key is rotated in the graph. A K-shift rotated these rows as if they were roped keys, which broke the pooled keys after a context shift. * tests : add the hy_v4_flash Metal fusion baseline * model, mtmd : add hy_v4_flash vision The vision tower of hy_v4_flash, with its projector in mtmd and its converter. The published files carry M-RoPE sections, so the text model runs the interleaved M-RoPE path: the rope rows keep their reference order and are reordered to NeoX halves in the graph. The tokens of an image share their position, so the indexer pools now group consecutive tokens in sequence order instead of consecutive positions, and a pooled key is rotated at the four positions of its first member. Without a backend that runs GGML_OP_TOP_K_MASK, the picked pools are expanded to their cells and go through build_top_k_mask. * CUDA: lightning indexer for 16 heads hy_v4_flash scores its pools with 16 indexer heads, which the CUDA backend did not support, so the scheduler ran the 12 sparse layers' indexers on the CPU at every step. Both kernels already handle 16 heads: the mma kernel needs a multiple of 16 and the vector kernel splits the heads in 4 passes. * model : move the Hy4 flash Engram gathers before the token embeddings With the gathers after build_inp_embd, the mixed embedding DUP and SET_ROWS sat between two host nodes and stayed on the CPU. Those ops use every thread, so all the CPU workers woke up on each decoded token for a 12K copy. Gathering first lets the scheduler put them on the GPU, as in qwen4exp, and leaves only small single threaded lookups on the host. * llama : speed up the Hy4 flash pool inputs on long contexts set_input_kpool deduplicated the pools through a map keyed by vectors even with a single sequence, sorted cells that are already in order and scanned every pool owner for each token. Dedup only when the ubatch has several sequences, skip the sort when the cells are ordered and mark the earlier pools of the token's sequence directly. At 129k cells the host cost of a decode step drops from 4.0 ms to 0.5 ms, the logits are unchanged. * llama : use a unified KV cache for Hy4 flash The pools gather their members from a single KV stream, so a split cache with several sequences hit an assert in the graph. Switch to the unified cache with a warning, the sequences then share n_ctx. * rm redundant code in mtmd * clean up comments --------- Co-authored-by: Xuan Son Nguyen <son@huggingface.co> </details> **Website:** - <https://llama.app> **Attestations:** - <https://github.com/ggml-org/llama.cpp/attestations/72476322> **macOS/iOS:** - [macOS Apple Silicon (arm64)](https://github.com/ggml-org/llama.cpp/releases/download/b12755/llama-b12755-bin-macos-arm64.tar.gz) - macOS Apple Silicon (arm64, KleidiAI enabled) [DISABLED](https://github.com/ggml-org/llama.cpp/pull/23780) - [macOS Intel (x64)](https://github.com/ggml-org/llama.cpp/releases/download/b12755/llama-b12755-bin-macos-x64.tar.gz) - [iOS XCFramework](https://github.com/ggml-org/llama.cpp/releases/download/b12755/llama-b12755-xcframework.zip) **Linux:** - [Ubuntu x64 (CPU)](https://github.com/ggml-org/llama.cpp/releases/download/b12755/llama-b12755-bin-ubuntu-x64.tar.gz) - [Ubuntu arm64 (CPU)](https://github.com/ggml-org/llama.cpp/releases/download/b12755/llama-b12755-bin-ubuntu-arm64.tar.gz) - [Ubuntu 24.04 s390x (CPU)](https://github.com/ggml-org/llama.cpp/releases/download/b12755/llama-b12755-bin-ubuntu-s390x.tar.gz) - [Ubuntu 26.04 s390x (CPU)](https://github.com/ggml-org/llama.cpp/releases/download/b12755/llama-b12755-bin-ubuntu-26.04-s390x.tar.gz) - [Ubuntu 26.04 s390x (zDNN)](https://github.com/ggml-org/llama.cpp/releases/download/b12755/llama-b12755-bin-ubuntu-zdnn-s390x.tar.gz) - [Ubuntu x64 (Vulkan)](https://github.com/ggml-org/llama.cpp/releases/download/b12755/llama-b12755-bin-ubuntu-vulkan-x64.tar.gz) - [Ubuntu arm64 (Vulkan)](https://github.com/ggml-org/llama.cpp/releases/download/b12755/llama-b12755-bin-ubuntu-vulkan-arm64.tar.gz) - [Ubuntu x64 (CUDA 12)](https://github.com/ggml-org/llama.cpp/releases/download/b12755/llama-b12755-bin-ubuntu-cuda-12.8-x64.tar.gz) - [CUDA 12.8 libraries](https://github.com/ggml-org/llama.cpp/releases/download/b12755/cudart-llama-b12755-bin-ubuntu-cuda-12.8-x64.tar.gz) - [Ubuntu x64 (CUDA 13)](https://github.com/ggml-org/llama.cpp/releases/download/b12755/llama-b12755-bin-ubuntu-cuda-13.5-x64.tar.gz) - [CUDA 13.5 libraries](https://github.com/ggml-org/llama.cpp/releases/download/b12755/cudart-llama-b12755-bin-ubuntu-cuda-13.5-x64.tar.gz) - [Ubuntu arm64 (CUDA 13)](https://github.com/ggml-org/llama.cpp/releases/download/b12755/llama-b12755-bin-ubuntu-cuda-13.5-arm64.tar.gz) - [CUDA 13.5 libraries](https://github.com/ggml-org/llama.cpp/releases/download/b12755/cudart-llama-b12755-bin-ubuntu-cuda-13.5-arm64.tar.gz) - [Ubuntu x64 (ROCm 10.0)](https://github.com/ggml-org/llama.cpp/releases/download/b12755/llama-b12755-bin-ubuntu-rocm-10.0-x64.tar.gz) - [Ubuntu x64 (OpenVINO)](https://github.com/ggml-org/llama.cpp/releases/download/b12755/llama-b12755-bin-ubuntu-openvino-2026.4.1-x64.tar.gz) - [Ubuntu x64 (SYCL FP32)](https://github.com/ggml-org/llama.cpp/releases/download/b12755/llama-b12755-bin-ubuntu-sycl-fp32-x64.tar.gz) - [Ubuntu x64 (SYCL FP16)](https://github.com/ggml-org/llama.cpp/releases/download/b12755/llama-b12755-bin-ubuntu-sycl-fp16-x64.tar.gz) - [Linux arm64 (Snapdragon: CPU, Adreno GPU, Hexagon NPU)](https://github.com/ggml-org/llama.cpp/releases/download/b12755/llama-b12755-bin-linux-arm64-snapdragon.tar.gz) - [setup guide](https://github.com/ggml-org/llama.cpp/blob/master/docs/backend/snapdragon/linux.md) **Android:** - [Android arm64 (CPU)](https://github.com/ggml-org/llama.cpp/releases/download/b12755/llama-b12755-bin-android-arm64.tar.gz) - [Android arm64 (Snapdragon: CPU, Adreno GPU, Hexagon NPU)](https://github.com/ggml-org/llama.cpp/releases/download/b12755/llama-b12755-bin-android-arm64-snapdragon.tar.gz) - [setup guide](https://github.com/ggml-org/llama.cpp/blob/master/docs/backend/snapdragon/README.md) **Windows:** - [Windows x64 (CPU)](https://github.com/ggml-org/llama.cpp/releases/download/b12755/llama-b12755-bin-win-cpu-x64.zip) - [Windows arm64 (CPU)](https://github.com/ggml-org/llama.cpp/releases/download/b12755/llama-b12755-bin-win-cpu-arm64.zip) - [Windows arm64 (OpenCL Adreno)](https://github.com/ggml-org/llama.cpp/releases/download/b12755/llama-b12755-bin-win-opencl-adreno-arm64.zip) - [Windows x64 (CUDA 12)](https://github.com/ggml-org/llama.cpp/releases/download/b12755/llama-b12755-bin-win-cuda-12.4-x64.zip) - [CUDA 12.4 DLLs](https://github.com/ggml-org/llama.cpp/releases/download/b12755/cudart-llama-bin-win-cuda-12.4-x64.zip) - [Windows x64 (CUDA 13)](https://github.com/ggml-org/llama.cpp/releases/download/b12755/llama-b12755-bin-win-cuda-13.5-x64.zip) - [CUDA 13.5 DLLs](https://github.com/ggml-org/llama.cpp/releases/download/b12755/cudart-llama-bin-win-cuda-13.5-x64.zip) - [Windows arm64 (CUDA 13)](https://github.com/ggml-org/llama.cpp/releases/download/b12755/llama-b12755-bin-win-cuda-13.5-arm64.zip) - [CUDA 13.5 DLLs](https://github.com/ggml-org/llama.cpp/releases/download/b12755/cudart-llama-bin-win-cuda-13.5-arm64.zip) - [Windows x64 (Vulkan)](https://github.com/ggml-org/llama.cpp/releases/download/b12755/llama-b12755-bin-win-vulkan-x64.zip) - [Windows arm64 (Vulkan)](https://github.com/ggml-org/llama.cpp/releases/download/b12755/llama-b12755-bin-win-vulkan-arm64.zip) - [Windows x64 (OpenVINO)](https://github.com/ggml-org/llama.cpp/releases/download/b12755/llama-b12755-bin-win-openvino-2026.4.1-x64.zip) - [Windows x64 (SYCL)](https://github.com/ggml-org/llama.cpp/releases/download/b12755/llama-b12755-bin-win-sycl-x64.zip) - [Windows x64 (ROCm 10.0)](https://github.com/ggml-org/llama.cpp/releases/download/b12755/llama-b12755-bin-win-rocm-10.0-x64.zip) **openEuler:** - [DISABLED](https://github.com/ggml-org/llama.cpp/pull/23705) - openEuler x86 (310p) - openEuler x86 (910b, ACL Graph) - openEuler aarch64 (310p) - openEuler aarch64 (910b, ACL Graph) **UI:** - [UI](https://github.com/ggml-org/llama.cpp/releases/download/b12755/llama-b12755-ui.tar.gz)

자료 출처

원문 읽기 ↗

관련 주제

← 전체 소식 이어 읽기