QuintinShaw and GitHub
ad8d821991
gguf : add tensor shape accessor ( #24405 )
...
* gguf : add tensor shape accessors
* gguf : return tensor shape as const int64_t *
* gguf : remove n_dims accessor, keep only gguf_get_tensor_ne
2026-07-13 13:55:15 +03:00
Rohit Mahesh and GitHub
d72bfa38f7
gguf : reject empty metadata keys ( #24917 )
2026-07-11 20:02:44 +02:00
66efd13375
ggml: gguf_init_from_callback and gguf_init_from_buffer ( #22341 )
...
* ggml: implement `gguf_init_from_buffer`
* test: `gguf_init_from_buffer`
* fix: memory breakdown for a model loaded with `no_alloc` from a file is consistent with being loaded from a buffer
* fix: use `GGML_UNUSED`
Co-authored-by: Copilot <copilot@github.com >
* fix: remove `total_size` from `gguf_reader`
* fix: file offset calculation, rename `offset` to `data_offset`
Co-authored-by: Copilot <copilot@github.com >
* refactor: extract model loader bug fixes to another PR
* feat: add `gguf_init_from_callback`
* fix: always require a max expected size
* fix: change `gguf_reader_callback_t`'s `output` type to `void *`, change `max_expected_size` and offsets to `uint64_t`
* fix: harden against offset overflow in buffer read
* fix: remove seek behavior from the callback
* feat: `max_chunk_read == 0` means `SIZE_MAX`
* fix: seeking in a gguf file with no tensors
---------
Co-authored-by: Copilot <copilot@github.com >
2026-05-25 11:33:29 +02:00
36dafba5c4
llama: fix llama-model-saver ( #20503 )
...
* llama : add fd-based model loading via llama_model_load_from_fd
* llama : address review feedback for fd-based model loading
* llama : use FILE pointer instead of fd in public API
* llama : use FILE pointer consistently, address review feedback
* fixup
* fix tensor names
* fix llama-model-saver
* roundtrip tests
* fixup
* refactor tests
* fix prints
* fix model saving
* fix CI, disable Chameleon
* print seed
---------
Co-authored-by: Siddhesh2377 <siddheshsonar2377@gmail.com >
2026-03-25 12:53:16 +02:00
418dea39ce
ggml/gguf : prevent integer overflows ( #19856 )
...
* gguf : prevent integer overflow for ggml_context mem size
* ggml : fix int overflows in ggml_new_object()
* gguf : prevent string exhaustion
* gguf : prevent array elements exhaustion
* ggml : fix negative tensor type oob
* py : assert that alignment is non-zero power of 2
* ggml : check int overflow in ggml_new_tensor_impl and ggml_new_object
* gguf-py : error on duplicate keys when reading
* py : restore tensor_fields
* enforce proper alignment in add_custom_alignment
* gguf : better name
* gguf : fix ctx size for no_alloc == true
* gguf : minor print fix
* ggml : print values when overflow
* ggml : remove deprecated ggml_type_sizef()
* ggml : relax ggml_type asserts to debug-only
* gguf : add mem_size overflow test
* gguf : add file size check for arrays
* ggml : relax asseerts for ggml_get_type_traits()
* flake8 fix
---------
Co-authored-by: Sigbjørn Skjæret <sigbjorn.skjaeret@scala.com >
2026-02-24 20:17:11 +02:00
Johannes Gäßler and GitHub
4e5b83b226
GGUF: check that tensor size is representable ( #19072 )
2026-01-24 21:57:51 +01:00
Johannes Gäßler and GitHub
7675c555a1
gguf: fix failure on version == 0 ( #13956 )
2025-06-01 18:08:05 +02:00
bandoti and GitHub
fef0cbeadf
cleanup: fix compile warnings associated with gnu_printf ( #11811 )
2025-02-12 10:06:53 -04:00
4dd34ff831
cmake : add sanitizer flags for llama.cpp ( #11279 )
...
* cmake : add sanitizer flags for llama.cpp
ggml-ci
* tests : fix compile warnings
ggml-ci
* cmake : move sanitizer flags to llama_add_compile_flags
ggml-ci
* cmake : move llama.cpp compile flags to top level lists
ggml-ci
* cmake : apply only sanitizer flags at top level
ggml-ci
* tests : fix gguf context use in same_tensor_data
* gguf-test: tensor data comparison
* dummy : trigger ggml-ci
* unicode : silence gcc warnings
ggml-ci
* ci : use sanitizer builds only in Debug mode
ggml-ci
* cmake : add status messages [no ci]
---------
Co-authored-by: Johannes Gäßler <johannesg@5d6.de >
2025-01-18 16:18:15 +02:00
Johannes Gäßler and GitHub
53ff6b9b9f
GGUF: C++ refactor, backend support, misc fixes ( #11030 )
...
* GGUF: C++ refactor, backend support, misc fixes
remove ggml_tensor.backend
update CODEOWNERS [no ci]
remove gguf_get_data from API
revise GGUF API data types
2025-01-07 18:01:58 +01:00
Johannes Gäßler and GitHub
cd920d0ac3
tests: disable GGUF test for bad value size ( #10886 )
2024-12-19 08:53:58 +01:00
Johannes Gäßler and GitHub
081b29bd2a
tests: add tests for GGUF ( #10830 )
2024-12-17 19:09:35 +01:00