Repository navigation
Update llama.cpp to v0.7.0 (adds EmbeddingGemma 2 support) - #1175
Open
willsheldon wants to merge 3 commits into
Open
willsheldon wants to merge 3 commits into
willsheldon wants to merge 3 commits into
Conversation
The submodule moves from v0.6.0 to v0.7.0. This range includes ggml-org/llama.cpp#30054, which adds the gemma-embedding2 architecture. Before this update, loading embeddinggemma-2-Q8_0.gguf fails with "unknown model architecture: 'gemma-embedding2'". The only breaking change that needed a port is in llama_perf_context_data. It gains two fields, n_reallocs_same and n_reallocs_diff. LlamaTimings::new keeps its signature and initialises both new fields to 0. Tested on macOS arm64 with the CI commands (clippy, fmt, build, test). The embeddings example loads embeddinggemma-2-Q8_0.gguf and returns 768-dim embeddings.
Author
|
Branch updated with current main (cc 1.8.0). This bumps llama.cpp to v0.7.0, which adds EmbeddingGemma 2 support. All CI targets passed on the previous head. Could a maintainer review when convenient? We are pinned to this rev downstream until a release includes it. |
madsmtm
reviewed
Oct 20, 2026
Addresses review feedback on utilityai#1175. LlamaTimings::new now takes the two fields that llama.cpp v0.7.0 added to llama_perf_context_data, instead of setting them to 0.
Author
|
Done in 424d1ff: |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves the
llama-cpp-sys-2/llama.cppsubmodule from v0.6.0 (d812350) to v0.7.0 (620d222).The range includes ggml-org/llama.cpp#30054 (
4fbc76d), which adds thegemma-embedding2architecture. Without it, loadingembeddinggemma-2-Q8_0.gguffails withunknown model architecture: 'gemma-embedding2'.4fbc76dis an ancestor of v0.7.0.API change ported
llama_perf_context_datagainsn_reallocs_sameandn_reallocs_diff.LlamaTimings::newbuilds the struct literal, so it now initialises both fields to 0. Its public signature does not change. The C++ wrappers compile unchanged.Behaviour change to note
ggml-org/llama.cpp#30445 and #30255 stop computing logits for pooled embedding contexts (embeddings enabled and a pooling type other than
None, set explicitly or taken from the GGUF metadata). On such a context, afterdecode,LlamaContext::get_logitsandget_logits_ithnow panic, andLlamaSampler::sampleaborts onGGML_ASSERT(logits != nullptr). With v0.6.0 these calls returned logits. The in-repoembeddingsandrerankerexamples read only embeddings and are not affected. This PR does not change the wrappers for this; it may be worth a note in thewith_embeddingsdocs.Testing
macOS arm64, Rust 1.98.0, with the commands from
llama-cpp-rs-check.yml:cargo fmt --check: passcargo clippy: pass (warnings only, none from this change)cargo build --features sampler,mtmd,llguidance: passcargo test --features sampler,mtmd,llguidance: pass (23 unit, 4 integration, 94 doc tests; 3 doc tests ignored)cargo publish --workspace --dry-run: passFunctional check with
ggml-org/embeddinggemma-2-GGUFembeddinggemma-2-Q8_0.gguf(sha2562188ac1deca4b77dffefd603c2776a9d76d9d74ec01841392982ebb840b09135), usingcargo run --release -p embeddings -- local <model>:arch = gemma-embedding2) and the example returns a 768-dim embedding (n_embd_out = 768,n_embd = 512).unknown model architecture: 'gemma-embedding2'.Linux, Windows, CUDA and Emscripten builds were not run locally; CI covers them. The
dynamic-linkfeature was not built locally and is not in CI. ggml-org/llama.cpp#30014 hides non-GGML_APIsymbols in sharedggmlbuilds; every ggml function the crate calls isGGML_API, so no break is expected.🤖 Generated with Claude Code