Skip to content

UPSTREAM PR #19796: Add model metadata loading from huggingface for use with tests requiring real model data#1201

Open
loci-dev wants to merge 5 commits into
mainfrom
loci/pr-19796-model-data
Open

UPSTREAM PR #19796: Add model metadata loading from huggingface for use with tests requiring real model data#1201
loci-dev wants to merge 5 commits into
mainfrom
loci/pr-19796-model-data

Conversation

@loci-dev

Copy link
Copy Markdown

Note

Source pull request: ggml-org/llama.cpp#19796

This is based on the work from huggingface here:

https://github.com/huggingface/huggingface.js/tree/main/packages/gguf

Idea is to partially load GGUF models from huggingface, just enough to get the metadata

The intention is to use this data with realistic unit tests for llama-quant.cpp, but it can be used for anyone needing real model data

To build:

cmake --build build --target test-gguf-model-data

To run the included test:

./build/bin/test-gguf-model-data
=== test-gguf-model-data ===
gguf_fetch: loaded from cache: /home/colin/.cache/llama.cpp/gguf-headers/ggml-org_Qwen3-0.6B-GGUF--Qwen3-0.6B-Q8_0.gguf.partial
Architecture: qwen3
n_embd:       1024
n_ff:         3072
n_vocab:      151936
n_layer:      28
n_head:       16
n_head_kv:    8
n_expert:     0
n_embd_head_k:128
n_embd_head_v:128
tensors:      311
gguf_fetch: loaded from cache: /home/colin/.cache/llama.cpp/gguf-headers/ggml-org_Qwen3-0.6B-GGUF--Qwen3-0.6B-Q8_0.gguf.partial
=== ALL TESTS PASSED ===

Caches the model locally for faster subsequent usages

Unit test provided as an example for usage in future tests

AI was used to help with the porting process and writing the unit tests

@loci-review

loci-review Bot commented Feb 23, 2026

Copy link
Copy Markdown

No meaningful performance changes were detected across 111671 analyzed functions in the following binaries: build.bin.llama-cvector-generator, build.bin.libmtmd.so, build.bin.libllama.so, build.bin.llama-tts, build.bin.llama-tokenize, build.bin.llama-bench, build.bin.llama-gguf-split, build.bin.llama-llava-cli, build.bin.llama-minicpmv-cli, build.bin.llama-quantize, build.bin.llama-qwen2vl-cli, build.bin.llama-gemma3-cli, build.bin.libggml-base.so, build.bin.libggml-cpu.so, build.bin.libggml.so.

🔎 Full breakdown: Loci Inspector.
💬 Questions? Tag @loci-dev.

@loci-dev loci-dev force-pushed the main branch 3 times, most recently from 45aacad to 6e8718a Compare February 24, 2026 02:17
@loci-review

loci-review Bot commented Feb 25, 2026

Copy link
Copy Markdown

No meaningful performance changes were detected across 111671 analyzed functions in the following binaries: build.bin.libllama.so, build.bin.llama-tts, build.bin.llama-cvector-generator, build.bin.libmtmd.so, build.bin.llama-tokenize, build.bin.libggml-base.so, build.bin.libggml-cpu.so, build.bin.libggml.so, build.bin.llama-bench, build.bin.llama-gemma3-cli, build.bin.llama-gguf-split, build.bin.llama-llava-cli, build.bin.llama-minicpmv-cli, build.bin.llama-quantize, build.bin.llama-qwen2vl-cli.

🔎 Full breakdown: Loci Inspector
💬 Questions? Tag @loci-dev

@loci-review

loci-review Bot commented Feb 26, 2026

Copy link
Copy Markdown

No meaningful performance changes were detected across 111671 analyzed functions in the following binaries: build.bin.libllama.so, build.bin.llama-tts, build.bin.llama-cvector-generator, build.bin.libmtmd.so, build.bin.llama-tokenize, build.bin.libggml-base.so, build.bin.libggml-cpu.so, build.bin.libggml.so, build.bin.llama-quantize, build.bin.llama-qwen2vl-cli, build.bin.llama-gemma3-cli, build.bin.llama-gguf-split, build.bin.llama-llava-cli, build.bin.llama-minicpmv-cli, build.bin.llama-bench.

🔎 Full breakdown: Loci Inspector
💬 Questions? Tag @loci-dev

@loci-dev loci-dev force-pushed the main branch 9 times, most recently from 9f4f332 to 4298c74 Compare March 6, 2026 02:17
@loci-dev loci-dev force-pushed the main branch 5 times, most recently from 551dfb5 to 55a969e Compare March 11, 2026 02:16
@loci-dev loci-dev force-pushed the main branch 9 times, most recently from 89a1190 to 8fec234 Compare March 30, 2026 02:18
@loci-dev loci-dev force-pushed the main branch 10 times, most recently from fd3ce9d to 1770118 Compare April 6, 2026 02:18
@loci-dev loci-dev force-pushed the main branch 7 times, most recently from ef0eff4 to 385b1fc Compare April 13, 2026 02:18
@loci-dev loci-dev force-pushed the main branch 4 times, most recently from 1254f75 to 245e873 Compare April 16, 2026 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants