llama_cpp_for_radxa_dragon_.../common
Christian Fillion 7ee953a64a
llama : add llama_sampler_init for safe usage of llama_sampler_free (#11727)
The C API in llama.h claims users can implement `llama_sampler_i` to
create custom `llama_sampler`. The sampler chain takes ownership and
calls `llama_sampler_free` on them. However, `llama_sampler_free` is
hard-coded to use `delete`. This is undefined behavior if the object
wasn't also allocated via `new` from libllama's C++ runtime. Callers
in C and C-compatible languages do not use C++'s `new` operator. C++
callers may not be sharing the same heap as libllama.
2025-02-07 11:33:27 +02:00
..
cmake
arg.cpp
arg.h
base64.hpp
build-info.cpp.in
chat-template.hpp
chat.cpp
chat.hpp
CMakeLists.txt
common.cpp
common.h
console.cpp
console.h
json-schema-to-grammar.cpp
json-schema-to-grammar.h
json.hpp
llguidance.cpp
log.cpp
log.h
minja.hpp
ngram-cache.cpp
ngram-cache.h
sampling.cpp
sampling.h
speculative.cpp
speculative.h
stb_image.h