llama_cpp_for_radxa_dragon_.../common
Daniel Bevenius 2b6dfe824d
llama : remove write/read of output ids/logits/embeddings (#18862)
* llama : remove write/read of output ids/logits/embeddings

This commit removes the write/read of output ids, logits and
embeddings from the llama context state.

Refs: https://github.com/ggml-org/llama.cpp/pull/18862#issuecomment-3756330941

* completion : add replying of session state

This commit updates the session handing in the completion tool to handle
the that logits are no longer stored in the session file. Instead, we
need to replay the last token to get the logits for sampling.

* common : add common_prompt_batch_decode function

This commit adds a new function which is responsible for decoding prompt
and optionally handle the saving for session data.

* update save-state.cpp to use llama_state_load_file

This commit updates the save-load-state example to utilize the new
llama_state_load_file function for loading the model state from a file.
And it also replays the last token after loading since this state is now
stored before the last token is processed.

* examples : set n_seq_max = 2 for ctx3

This commit updates the save-load-state example to set the n_seq_max
parameter to 2 when initializing the ctx3 context.

The motivation for this change is that using 1 as n_parallel/n_seq_max
the context only supports one sequence, but the test laster tries to
use a second sequence which results in the following error:
```console
main : loaded state with 4 tokens
main : seq 0 copied, 225760 bytes
main : kv cache cleared
find_slot: seq_id=1 >= n_seq_max=1 Try using a bigger --parallel value
state_read_meta: failed to find available cells in kv cache
```
This seems to only happen for recurrent/hybrid models.
2026-02-23 07:04:30 +01:00
..
jinja jinja: correct stats for tojson and string filters (#19785) 2026-02-22 21:08:23 +01:00
arg.cpp args : add -kvu to llama-parallel (#19577) 2026-02-12 21:52:41 +02:00
arg.h
base64.hpp
build-info.cpp.in
chat-parser-xml-toolcall.cpp common : fix improper trimming in XML parser on complete message (#19805) 2026-02-22 17:34:54 +01:00
chat-parser-xml-toolcall.h
chat-parser.cpp common : merge qwen3-coder and nemotron nano 3 parsers (#19765) 2026-02-20 23:22:22 +01:00
chat-parser.h
chat-peg-parser.cpp
chat-peg-parser.h
chat.cpp common : merge qwen3-coder and nemotron nano 3 parsers (#19765) 2026-02-20 23:22:22 +01:00
chat.h common : merge qwen3-coder and nemotron nano 3 parsers (#19765) 2026-02-20 23:22:22 +01:00
CMakeLists.txt build : cleanup library linking logic (#19665) 2026-02-17 08:36:45 +01:00
common.cpp llama : remove write/read of output ids/logits/embeddings (#18862) 2026-02-23 07:04:30 +01:00
common.h llama : remove write/read of output ids/logits/embeddings (#18862) 2026-02-23 07:04:30 +01:00
console.cpp
console.h
debug.cpp
debug.h
download.cpp build : remove LLAMA_HTTPLIB option (#19623) 2026-02-15 15:38:50 +01:00
download.h
http.h
json-partial.cpp
json-partial.h
json-schema-to-grammar.cpp
json-schema-to-grammar.h
llguidance.cpp
log.cpp
log.h
ngram-cache.cpp
ngram-cache.h
ngram-map.cpp
ngram-map.h
ngram-mod.cpp
ngram-mod.h
peg-parser.cpp
peg-parser.h
preset.cpp
preset.h
regex-partial.cpp
regex-partial.h
sampling.cpp
sampling.h
speculative.cpp
speculative.h
unicode.cpp
unicode.h