llama.cpp
c4e308a1 - model : add hy_v4_flash on the DSA iSWA cache

Commit
4 hours ago
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.
Committer
Parents
Loading