whisper.cpp/ggml/include
Aman Gupta 23f956de33 llama + spec: MTP Support (llama/22673)
* spec: support MTP

* fix batch size

* rename files

* cont : simplify (llama/7)

* MTP: clean-up (llama/9)

* MTP: clean-up

* review: use llama_context_type instead of llama_graph_type

* review: remove llama_model_has_mtp

* review: fix convert issues

* convert: fix pycheck

* review: formatting

* use `mtp-` for identifying mtp models

* convert: fix mtp conversion

* mtp -> draft-mtp

* remove unused llama_arch

* add need_embd in speculative

* llama: allow partial seq_rm for GDN models for speculative decoding

Currently speculative checkpoint needs to restart from a checkpoint
after some draft tokens are not accepted, this leads to some wastage in
running the target again. This PR adds the ability to rollback upto
`draft_max` by storing the GDN intermediates.

* fix pending state

* vulkan: add GDN partial rollback

* meta: extend check to axis 1

* metal: add GDN partial rollback

Extend the gated delta net kernel to store intermediate states for
partial rollback support on the Metal backend.

- Add K (snapshot slot count) as a function constant
- Read input state from slot 0 of the 3D state tensor
- Write intermediate states to different slots during token loop
- For K=1, maintain backward-compatible single-slot behavior

Ref: 8c05923630

Assisted-by: llama.cpp:local pi

* delta_net_base: use ggml_pad instead of new_tensor

* review: add need_rs_seq

* review: rename part_bounded to n_rs

* review: deslop comments

* review: rename, add asserts

* server : adjust checkpoint logic (llama/11)

* server : adjust checkpoint logic

* cont : rm asserts

* server-context: fix early exit

* spec : fix compatibility with n-gram and add TODOs (llama/13)

* metal : cleanup

* llama : fix faulty bitwise check in recurrent memory

* server : disable RS-based MTP in combination with other spec types

* spec : add TODOs

* cont : fix comment

* cont : update comment

* common : fix logic for ngram + mtp compat

* llama-memory: enable checkpointing with partial rollback

* cont: add test-case for loading into a dirty ctx

* llama-memory-recurrent: clear rs_idx in clear

* download: fix mtp path

* llama-arch: fix enorm op

* docs: update docs

* conversion: fix type annotations

---------

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
2026-05-25 12:26:07 +03:00
..
ggml-alloc.h llama: automatically set parameters not set by the user in such a way that maximizes GPU utilization (llama/16653) 2025-12-18 08:20:56 +02:00
ggml-backend.h CUDA: lower-case PCI bus id, standardize for ggml (llama/22820) 2026-05-14 21:26:48 +03:00
ggml-blas.h ggml : build backends as libraries (llama/10256) 2024-11-20 21:00:08 +02:00
ggml-cann.h docs : Minor cleanups (llama/19252) 2026-02-08 09:29:10 +02:00
ggml-cpp.h ggml : fix ggml_gallocr_ptr type (ggml/1205) 2025-05-01 13:29:02 +03:00
ggml-cpu.h ggml-cpu: FA split across kv for faster TG (llama/19209) 2026-02-08 09:29:10 +02:00
ggml-cuda.h ggml: backend-agnostic tensor parallelism (experimental) (llama/19378) 2026-04-30 11:29:05 +03:00
ggml-hexagon.h Add experimental ggml-hexagon backend for the Hexagon NPU (llama/16547) 2025-11-09 23:38:03 +02:00
ggml-metal.h metal : refactor + optimize v2 (llama/15995) 2025-09-20 13:46:10 +03:00
ggml-opencl.h Introducing experimental OpenCL backend with support for Qualcomm Adreno GPUs (llama/10693) 2024-12-18 12:52:16 +02:00
ggml-openvino.h ggml : add OpenVINO backend (llama/15307) 2026-03-16 13:10:15 +02:00
ggml-opt.h chore : correct typos [no ci] (llama/20041) 2026-03-16 13:10:15 +02:00
ggml-rpc.h rpc : add native RDMA transport for RPC backend (RoCEv2) (llama/20590) 2026-04-30 11:29:09 +03:00
ggml-sycl.h ggml : build backends as libraries (llama/10256) 2024-11-20 21:00:08 +02:00
ggml-virtgpu.h ggml-virtgpu: make the code thread safe (llama/19204) 2026-02-08 09:29:10 +02:00
ggml-vulkan.h vulkan: Make Vulkan optional at runtime (ggml/11493). (llama/11494) 2025-02-27 08:55:36 +02:00
ggml-webgpu.h ggml: Add initial WebGPU backend (llama/14521) 2025-07-20 00:23:50 +03:00
ggml-zdnn.h zdnn: refactor codebase + add docs (llama/16178) 2025-09-29 15:18:09 +03:00
ggml-zendnn.h ggml-zendnn : add ZenDNN backend for AMD CPUs (llama/17690) 2025-12-12 17:53:21 +02:00
ggml.h llama + spec: MTP Support (llama/22673) 2026-05-25 12:26:07 +03:00
gguf.h llama: fix llama-model-saver (llama/20503) 2026-03-29 15:04:36 +03:00