llama.cpp Adds Custom Operations to Support Experimental Qwen 4 Models
Pull Request #28901 to `llama.cpp` introduces new tensor operations (`hc ops`) tailored for the experimental `qwen4exp` architecture. This addition enables users to properly execute and benchmark Qwen's preview model variants, such as Qwen 3.8-Flash-Next. Early support for next-generation architectures in engines like `llama.cpp` allows developers to test upcoming model features before official wide release. It accelerates community benchmarking and optimization for Alibaba's future Qwen 4 model family. The pull request implements missing operations required by the experimental Qwen 4 architecture within the `ggml` backend. This ensures correct memory allocation and computation graphs for model variants like Qwen 3.8-Flash-Next.
## BACKGROUND
`llama.cpp` is a high-performance C++ framework designed for local LLM inference across CPU and GPU hardware. Qwen 3.8-Flash-Next serves as an early preview release of Alibaba's Qwen 4 architecture, published to let open-source developers prepare for the full model lineup. Custom tensor operations are frequently required in `llama.cpp` when novel architectures introduce non-standard mathematical ops or layer formats.