koboldcpp/common
Ruixiang Wang 88a39274ec
Some checks failed
Check Pre-Tokenizer Hashes / pre-tokenizer-hashes (push) Has been cancelled
Python check requirements.txt / check-requirements (push) Has been cancelled
Python Type-Check / python type-check (push) Has been cancelled
spec: add EAGLE3 speculative decoding support (#18039)
* llama : enable layer input extraction

* spec: support eagle3

* eagle3: fix params bug

* eagle3: support Gemma4 eagle3 from RedHatAI

* eagle3: set sync when get features from target

Co-authored-by: tnhnyzc <115956684+tnhnyzc@users.noreply.github.com>

* eagle3 : fix ubatch handling in embd_layer_inp extraction and encoder

Co-authored-by: Doğaç Eldenk <dogacel@gmail.com>

* eagle3: adapt to upstream changes

* eagle3: fix rebase issues and adapt to upstream changes

* eagle3:exclude the eagle3 arch from test-llama-archs

* eagle3: fix editorconfig check failures

* eagle3: fix multi-seq issue in d2t vocab mapping

* cont : minor style / clean-up

* spec : remove `common_speculative_setup_draft_model()`

* llama : clean-up unused API

* eagle3: set d2t vocab mapping in decode graph

* cont : assert layer inputs are configured

* hparams : use n_embd_inp instead of n_embd_target_features

* eagle3: make output.weight optional and inherit from target model when needed

* haparams : generic norm-before-residual param

* llama-ext : consistent names

* cont : fix

* hparams : remove target_hidden_size

* cparams : rename output_layer_inp -> embeddings_layer_inp

* arch : reuse ATTN_NORM_2 instead of adding new hidden norm

* llama : clean-up names

* cont : add assert + comment

* Update conversion/llama.py

Co-authored-by: Sigbjørn Skjæret <sigbjorn.skjaeret@scala.com>

---------

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
Co-authored-by: tnhnyzc <115956684+tnhnyzc@users.noreply.github.com>
Co-authored-by: Doğaç Eldenk <dogacel@gmail.com>
Co-authored-by: Sigbjørn Skjæret <sigbjorn.skjaeret@scala.com>
2026-06-12 10:21:06 +03:00
..
jinja common : fix jinja warnings with clang 21 (#22313) 2026-04-24 12:36:02 +02:00
arg.cpp server: log prompts to directory (#22031) 2026-06-09 12:09:07 +02:00
arg.h download: add option to skip_download (#23059) 2026-05-29 16:30:55 +02:00
base64.hpp llava : expose as a shared library for downstream projects (#3613) 2023-11-07 00:36:23 +03:00
build-info.cpp.in libs : rename libcommon -> libllama-common (#21936) 2026-04-17 11:11:46 +03:00
build-info.h libs : rename libcommon -> libllama-common (#21936) 2026-04-17 11:11:46 +03:00
chat-auto-parser-generator.cpp common : delegate assistant continuation to underlying template handlers (#23089) 2026-05-17 13:36:05 +02:00
chat-auto-parser-helpers.cpp server: fix checkpoints creation (#22929) 2026-05-25 08:56:18 +03:00
chat-auto-parser-helpers.h chat : avoid including json in chat.h (#21306) 2026-04-03 09:07:59 +03:00
chat-auto-parser.h server: fix checkpoints creation (#22929) 2026-05-25 08:56:18 +03:00
chat-diff-analyzer.cpp server: fix checkpoints creation (#22929) 2026-05-25 08:56:18 +03:00
chat-peg-parser.cpp common/chat : unify and fix LFM2/LFM2.5 tool parser (#24178) 2026-06-05 14:31:56 -05:00
chat-peg-parser.h common/chat : unify and fix LFM2/LFM2.5 tool parser (#24178) 2026-06-05 14:31:56 -05:00
chat.cpp chat: fix LFM2/LFM2.5 ignoring json_schema (#24377) 2026-06-10 14:41:41 +02:00
chat.h server: fix checkpoints creation (#22929) 2026-05-25 08:56:18 +03:00
CMakeLists.txt Move duplicated imatrix code into single common imatrix-loader.cpp (#22445) 2026-06-04 17:45:40 +02:00
common.cpp common : relax sampler name matching (#23744) 2026-06-07 22:48:11 +02:00
common.h server: log prompts to directory (#22031) 2026-06-09 12:09:07 +02:00
console.cpp cli: fix stripping of \n in multiline input (#21485) 2026-04-06 20:54:06 +02:00
console.h cli : add command and file auto-completion (#19985) 2026-03-05 10:47:28 +01:00
debug.cpp common: fix missing exports in llama-common (#22340) 2026-04-27 08:06:39 +03:00
debug.h common: fix missing exports in llama-common (#22340) 2026-04-27 08:06:39 +03:00
download.cpp download: add option to skip_download (#23059) 2026-05-29 16:30:55 +02:00
download.h download: add option to skip_download (#23059) 2026-05-29 16:30:55 +02:00
fit.cpp server: add margin for draft model for fit (#23485) 2026-05-24 14:43:08 +08:00
fit.h server: add margin for draft model for fit (#23485) 2026-05-24 14:43:08 +08:00
hf-cache.cpp common : remove hf cache migration (#23266) 2026-05-18 17:11:47 +02:00
hf-cache.h common : remove hf cache migration (#23266) 2026-05-18 17:11:47 +02:00
http.h server: Parse port numbers from MCP server URLs in CORS proxy (#20208) 2026-03-09 17:47:54 +01:00
imatrix-loader.cpp Move duplicated imatrix code into single common imatrix-loader.cpp (#22445) 2026-06-04 17:45:40 +02:00
imatrix-loader.h Move duplicated imatrix code into single common imatrix-loader.cpp (#22445) 2026-06-04 17:45:40 +02:00
json-partial.cpp common : Generalized XML-style tool-call parsing with streaming support (GLM 4.5/4.6 + MiniMax M2 + SeedOSS + Kimi-K2 + Qwen3-Coder + Apriel-1.5 + Xiaomi-MiMo) (#16932) 2025-11-18 18:54:15 +01:00
json-partial.h cli : fix reasoning responses in CLI (#18961) 2026-01-20 18:23:25 +01:00
json-schema-to-grammar.cpp common/json-schema: fix: handle non-capturing groups (?:...) in JSON schema pattern converter (#21124) 2026-03-28 17:55:38 +01:00
json-schema-to-grammar.h common : add nemotron 3 parsing (#18077) 2025-12-16 04:05:23 -06:00
llguidance.cpp sampling : add support for backend sampling (#17004) 2026-01-04 22:22:16 +02:00
log.cpp logs : reduce (#23021) 2026-05-14 13:05:52 +03:00
log.h logs : reduce (#23021) 2026-05-14 13:05:52 +03:00
ngram-cache.cpp spec : add self‑speculative decoding (no draft model required) + refactor (#18471) 2026-01-28 19:42:42 +02:00
ngram-cache.h spec : add self‑speculative decoding (no draft model required) + refactor (#18471) 2026-01-28 19:42:42 +02:00
ngram-map.cpp llama : MTP clean-up (#23269) 2026-05-19 15:32:58 +03:00
ngram-map.h fix: correct misspellings in code comments (#21217) 2026-03-31 13:50:51 +02:00
ngram-mod.cpp ngram-mod : Add missing include (#23857) 2026-05-29 09:21:37 +03:00
ngram-mod.h ngram-mod : fix build [no ci] (#19216) 2026-01-30 21:27:27 +02:00
peg-parser.cpp common/gemma4 : handle parsing edge cases (#21760) 2026-04-13 18:18:18 -05:00
peg-parser.h common/gemma4 : handle parsing edge cases (#21760) 2026-04-13 18:18:18 -05:00
preset.cpp mtmd, server, common: expose modalities to /v1/models (#22952) 2026-05-12 19:08:07 +02:00
preset.h mtmd, server, common: expose modalities to /v1/models (#22952) 2026-05-12 19:08:07 +02:00
reasoning-budget.cpp common : support manually triggering the reasoning budget end sequence (#23949) 2026-06-01 11:37:11 +02:00
reasoning-budget.h common : support manually triggering the reasoning budget end sequence (#23949) 2026-06-01 11:37:11 +02:00
regex-partial.cpp common : fix iterator::end() dereference (#20445) 2026-03-16 08:50:38 +02:00
regex-partial.h common: add partial regex support (#12808) 2025-05-14 19:50:57 +01:00
sampling.cpp common : relax sampler name matching (#23744) 2026-06-07 22:48:11 +02:00
sampling.h common : relax sampler name matching (#23744) 2026-06-07 22:48:11 +02:00
speculative.cpp spec: add EAGLE3 speculative decoding support (#18039) 2026-06-12 10:21:06 +03:00
speculative.h qwen35: use post-norm hidden state for MTP (#24025) 2026-06-04 01:29:09 +08:00
unicode.cpp common/parser: handle reasoning budget (#20297) 2026-03-11 10:26:12 +01:00
unicode.h common/parser: handle reasoning budget (#20297) 2026-03-11 10:26:12 +01:00