koboldcpp/tests
Yuri Khrustalev 81aeaeb74b
gguf : align the data section relative to the GGUF start, not the file (#28993)
* gguf : align the data section relative to the GGUF start, not the file

gguf_init_from_file_ptr reads a GGUF from the current file position, but padded
the data section from file offset 0, so a GGUF embedded at an offset that is not
a multiple of the alignment loaded without error and returned wrong tensor data.

Also adds llama_adapter_lora_init_from_file_ptr, and disables mmap with a warning
when an embedded data section is not aligned, instead of asserting in ggml.

Assisted-by: Claude Opus 5

* llama : load lora from path through the FILE* variant

The test now checks that mmap is disabled only for an unaligned offset.

Assisted-by: Claude Fable 5.1

* Update ggml/src/gguf.cpp

Co-authored-by: Johannes Gäßler <johannesg@5d6.de>

* Update include/llama.h

Co-authored-by: Johannes Gäßler <johannesg@5d6.de>

* llama : error on unaligned mmap of an embedded GGUF, drop test-load-file-ptr

---------

Co-authored-by: Johannes Gäßler <johannesg@5d6.de>
2026-09-17 09:19:44 +02:00
..
fusion tests : add fusion baseline README and broaden fusion CI triggers (#28893) 2026-09-14 15:45:05 +03:00
peg-parser common: add json.h abstraction (#27511) 2026-08-22 16:28:28 +02:00
snapshots tests : fix typo in test-quant-type-selection for nemotron 3 nano (#28835) 2026-09-13 18:50:46 +02:00
.gitignore metal : single-source fusion table + fusion debug rework (#28164) 2026-09-11 12:41:54 +03:00
CMakeLists.txt cmake : use PROJECT_SOURCE_DIR instead of CMAKE_SOURCE_DIR (#28771) 2026-09-15 05:26:09 +02:00
gguf-model-data.cpp
gguf-model-data.h
test-alloc.cpp ggml: allow passing alloc dependencies in graph_optimize (#27301) 2026-08-30 11:34:20 +08:00
test-arg-parser.cpp spec: Add benchmark-only synthetic speculative acceptance options (#27711) 2026-08-27 13:53:42 +03:00
test-autorelease.cpp tests : avoid building get-model.cpp many times (#26317) 2026-07-30 19:34:04 +03:00
test-backend-ops.cpp qwen4exp: add hc ops (#28901) 2026-09-16 16:00:01 +08:00
test-backend-sampler.cpp tests : disable backend sampler hip multi output (#26878) 2026-08-11 07:21:32 +03:00
test-barrier.cpp
test-batch-alloc.cpp llama-batch: add unit test (#25471) 2026-07-10 11:04:31 +08:00
test-c.c
test-chat-analysis.cpp test: move tools/parser to tests (#27548) 2026-08-23 18:38:51 +02:00
test-chat-auto-parser.cpp test: move tools/parser to tests (#27548) 2026-08-23 18:38:51 +02:00
test-chat-peg-parser.cpp common : implement common_schema internal representation for JSON schemas (#28736) 2026-09-12 16:14:50 -05:00
test-chat-template.cpp test: move tools/parser to tests (#27548) 2026-08-23 18:38:51 +02:00
test-chat.cpp chat : improve parsing of complex types in qwen3-coder (#28742) 2026-09-12 19:08:52 -05:00
test-col2im-1d.cpp ggml : add GGML_OP_COL2IM_1D (#24206) 2026-06-09 12:01:37 +03:00
test-double-float.cpp
test-export-graph-ops.cpp tests: export-graph-ops: exit gracefully when called w/o arguments (#25619) 2026-07-14 13:15:41 +03:00
test-fusion.cpp metal : single-source fusion table + fusion debug rework (#28164) 2026-09-11 12:41:54 +03:00
test-gbnf-validator.cpp
test-gguf-model-data.cpp
test-gguf.cpp gguf : align the data section relative to the GGUF start, not the file (#28993) 2026-09-17 09:19:44 +02:00
test-grammar-integration.cpp common : implement common_schema internal representation for JSON schemas (#28736) 2026-09-12 16:14:50 -05:00
test-grammar-llguidance.cpp
test-grammar-parser.cpp grammar : degrade max repetition >= 2000 to unbounded (#26613) 2026-08-05 07:39:10 -05:00
test-jinja.cpp jinja : support dot property integer literals (#28817) 2026-09-12 23:49:53 +03:00
test-json-schema-to-grammar.cpp common : implement common_schema internal representation for JSON schemas (#28736) 2026-09-12 16:14:50 -05:00
test-json-schema.cpp common : implement common_schema internal representation for JSON schemas (#28736) 2026-09-12 16:14:50 -05:00
test-llama-archs.cpp model : add support for HrmTextForCausalLM (DFM Mimir 1B) (#27625) 2026-09-16 15:18:45 +02:00
test-llama-grammar.cpp
test-log.cpp
test-lora-conversion-inference.sh
test-model-load-cancel.cpp tests : avoid building get-model.cpp many times (#26317) 2026-07-30 19:34:04 +03:00
test-model-resolution.cpp common: add json.h abstraction (#27511) 2026-08-22 16:28:28 +02:00
test-mtmd-c-api.c mtmd: add mtmd_tokenize_from_parts() (#28250) 2026-09-02 21:20:10 +02:00
test-mtmd-impl.cpp mtmd: add mtmd_tokenize_from_parts() (#28250) 2026-09-02 21:20:10 +02:00
test-opt.cpp
test-peg-parser.cpp
test-quant-type-selection.cpp tests : fix typo in test-quant-type-selection for nemotron 3 nano (#28835) 2026-09-13 18:50:46 +02:00
test-quantize-fns.cpp tests: extend test-quantize-fns to test nrc=2 (i8mm) kernels (#16234) 2026-09-12 02:19:37 +08:00
test-quantize-perf.cpp
test-quantize-stats.cpp cmake : introduce semantic versioning (#26839) 2026-08-12 14:15:03 +02:00
test-reasoning-budget.cpp common : add support for multiple end sequences in the reasoning budget sampler (#25544) 2026-07-25 11:58:09 +02:00
test-recurrent-state-rollback.cpp model : support Kimi-K3 recurrent-state rollback (#28466) 2026-09-08 11:31:48 +08:00
test-rope.cpp
test-rpc-multi-server.cpp rpc: avoid serializing buffers from other servers (#26500) 2026-08-30 20:26:16 +03:00
test-rpc-multi-server.sh rpc: avoid serializing buffers from other servers (#26500) 2026-08-30 20:26:16 +03:00
test-rset-release.cpp tests : avoid building get-model.cpp many times (#26317) 2026-07-30 19:34:04 +03:00
test-sampling.cpp llama : add missing headers (#28566) 2026-09-08 12:59:53 +02:00
test-save-load-state.cpp metal : single-source fusion table + fusion debug rework (#28164) 2026-09-11 12:41:54 +03:00
test-state-restore-fragmented.cpp
test-thread-safety.cpp tests : synchronize contexts at end of test-thread-safety (#24935) 2026-06-25 09:22:51 +03:00
test-tokenizer-0.cpp
test-tokenizer-0.py
test-tokenizer-0.sh
test-tokenizer-1-bpe.cpp
test-tokenizer-1-spm.cpp
test-tokenizer-random.py
test-tokenizers-repo.sh
test-unicode.cpp unicode : include '~' in collapsed symbol class (#26972) 2026-08-18 15:15:22 +02:00
testing.h chat: refactor handling supports_string_content / supports_typed_content (#27130) 2026-08-16 12:45:33 +02:00